seperate checks for aggregate id and port state

This commit is contained in:
Yoshi Kadokawa
2020-05-07 12:25:06 +09:00
parent fd95e4fb8b
commit a29818d81e

View File

@@ -283,9 +283,11 @@ def check_bond(bond, lldp=None):
return "vlan mismatch"
else:
vlan = lldp.get_interface_vlan(slave)
if get_bond_mode(bond) == "lacp":
if get_bond_mode(bond) == "lacp":
for slave in content.split():
if check_aggregator_id(bond, slave):
return "Aggregator ID mismatch"
for slave in content.split():
if check_lacp_port_state(slave):
return "LACP port state mismatch"
return None