Loading validateInventory.py +4 −2 Original line number Diff line number Diff line Loading @@ -256,6 +256,8 @@ def check_LLDP_inventory(xml_reply): actual_params = actual_params + 2 portID = port.findall(".//ns1:port-id", namespaces={"ns1": "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"}) portIDSubtype = port.findall(".//ns1:port-id-subtype", namespaces={"ns1": "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"}) adminstatus = port.findall(".//ns1:admin-status", namespaces={"ns1": "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"}) #HW if adminstatus[0].text != "disabled": #HW if len(portID)==0 or len(portIDSubtype)==0: actual_params = actual_params -2+ len(portID) + len(portIDSubtype) #return "port data incomplete" Loading Loading
validateInventory.py +4 −2 Original line number Diff line number Diff line Loading @@ -256,6 +256,8 @@ def check_LLDP_inventory(xml_reply): actual_params = actual_params + 2 portID = port.findall(".//ns1:port-id", namespaces={"ns1": "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"}) portIDSubtype = port.findall(".//ns1:port-id-subtype", namespaces={"ns1": "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"}) adminstatus = port.findall(".//ns1:admin-status", namespaces={"ns1": "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"}) #HW if adminstatus[0].text != "disabled": #HW if len(portID)==0 or len(portIDSubtype)==0: actual_params = actual_params -2+ len(portID) + len(portIDSubtype) #return "port data incomplete" Loading