Loading __pycache__/validateInventory.cpython-312.pyc +1 B (14.8 KiB) File changed.No diff preview for this file type. View original file View changed file validateInventory.py +2 −2 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ def check_hardware_inventory(xml_reply): name = comp.findall(".//ns0:name", namespaces={"ns0" :"urn:ietf:params:xml:ns:yang:ietf-hardware"}) if len(name)==0: print("name not found") return "compoent name not found" return "Component name not found" cls = comp.findall(".//ns0:class", namespaces={"ns0" :"urn:ietf:params:xml:ns:yang:ietf-hardware"}) if len(cls)==0: return "component class not found" return "Component class not found" hw_rev = comp.findall(".//ns0:hardware-rev", namespaces={"ns0" :"urn:ietf:params:xml:ns:yang:ietf-hardware"}) if len(hw_rev)>0: Loading Loading
__pycache__/validateInventory.cpython-312.pyc +1 B (14.8 KiB) File changed.No diff preview for this file type. View original file View changed file
validateInventory.py +2 −2 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ def check_hardware_inventory(xml_reply): name = comp.findall(".//ns0:name", namespaces={"ns0" :"urn:ietf:params:xml:ns:yang:ietf-hardware"}) if len(name)==0: print("name not found") return "compoent name not found" return "Component name not found" cls = comp.findall(".//ns0:class", namespaces={"ns0" :"urn:ietf:params:xml:ns:yang:ietf-hardware"}) if len(cls)==0: return "component class not found" return "Component class not found" hw_rev = comp.findall(".//ns0:hardware-rev", namespaces={"ns0" :"urn:ietf:params:xml:ns:yang:ietf-hardware"}) if len(hw_rev)>0: Loading