Loading .gitignore +2 −1 Original line number Diff line number Diff line lib lib64 pyvenv.cfg bin lib lib64 pyvenv.cfg bin tmp.py features/steps/NetconfLibrary.py +43 −54 Original line number Diff line number Diff line Loading @@ -128,69 +128,58 @@ class NetconfLibrary: """Deploy a S_VLAN in PEB mode and register two CVLAN """ for ne in self.network: if ne.edgeIface!=None: m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename) #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password) xml = create_VLAN_xml(ne,svid) m.edit_config(target="candidate", config=xml) m.commit() env = Environment( loader=FileSystemLoader("."), autoescape=False) xml = create_VLAN_xml(ne,cvid1) target = "candidate" m.edit_config(target=target, config=xml) m.commit() xml = create_VLAN_xml(ne,cvid2) target = "candidate" m.edit_config(target=target, config=xml) m.commit() context = { "port1_name":ne.edgeIface, "cvid1":cvid1, "cvid2":cvid2, "port1_name" : ne.port_1 "svid":svid } xml = env.get_template("features/steps/svlan_2_registration_creation.xml.pyformat").render(context) m.edit_config(target="candidate", config=xml) m.commit() m.close_session() @keyword("the controller register the CVLAN ${cvid1} and ${cvid1} to the VLAN ${svid}") def register_CVLAN_in_SVLAN( @keyword("the controller unregister the CVLAN ${cvid1} and ${cvid1} to the VLAN ${svid}") def unregister_CVLAN_in_SVLAN( self, cvid1: int, cvid2: int, svid: int ) -> None: """Deploy a S_VLAN in PEB mode and register two CVLAN """ for ne in self.network: if ne.edgeIface!=None: m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename) #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password) xml = create_VLAN_xml(ne,svid) m.edit_config(target="candidate", config=xml) m.commit() env = Environment( loader=FileSystemLoader("."), autoescape=False) context = { "cvid1":cvid1, "cvid2":cvid2, "svid" : svid, "port1_name" : ne.port_1 } xml = env.get_template("features/steps/svlan_2_registration_deletion.xml.pyformat").render(context) m.edit_config(target="candidate", config=xml) m.commit() m.close_session() @keyword("the controller unregister the CVLAN ${cvid1} and ${cvid1} to the VLAN ${svid}") def unregister_CVLAN_in_SVLAN( self, cvid1: int, cvid2: int, svid: int ) -> None: """Deploy a S_VLAN in PEB mode and register two CVLAN """ for ne in self.network: m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename) #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password) xml = create_VLAN_xml(ne,svid) xml = delete_VLAN_xml(ne, cvid1) m.edit_config(target="candidate", config=xml) m.commit() env = Environment( loader=FileSystemLoader("."), autoescape=False) context = { "cvid1":cvid1, "cvid2":cvid2, "port1_name" : ne.port_1 } xml = env.get_template(vlan_delation_xml).render(context) xml = delete_VLAN_xml(ne, cvid2) m.edit_config(target="candidate", config=xml) m.commit() m.close_session() def connect_with_key(host, port, username, key_file): return manager.connect( host=host, Loading features/steps/__pycache__/NetconfLibrary.cpython-312.pyc +129 B (12.8 KiB) File changed.No diff preview for this file type. View original file View changed file network.csv +2 −2 Original line number Diff line number Diff line name,address,username,password,bridgeName,componentName,port_1,port_2,mgmt_port,key_filename ne1,192.168.13.134,domenico,domenico,Bridge-1,Component-1,1,2,830 name,address,username,password,key_filename,bridgeName,componentName,port_1,port_2,mgmt_port,edgeIface ne1,192.168.13.134,domenico,domenico,,Bridge-1,Component-1,1,2,830,eth0 tmp.pydeleted 100644 → 0 +0 −306 Original line number Diff line number Diff line from ncclient import manager from jinja2 import Environment, FileSystemLoader import xml.etree.ElementTree as ET from ncclient import manager import validateInventory if __name__=="__main__": xml_reply = """<?xml version="1.0" encoding="UTF-8"?><data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge" xmlns:dot1q-pb="urn:ieee:std:802.1Q:yang:ieee802-dot1q-pb"> <interface> <name>ETH-7-255-7</name> <dot1q:bridge-port> <dot1q:bridge-name>Bridge-301</dot1q:bridge-name> <dot1q-pb:cvid-registration> <dot1q-pb:cvid>302</dot1q-pb:cvid> <dot1q-pb:svid>301</dot1q-pb:svid> <dot1q-pb:untagged-pep>false</dot1q-pb:untagged-pep> <dot1q-pb:untagged-cep>false</dot1q-pb:untagged-cep> </dot1q-pb:cvid-registration> <dot1q-pb:cvid-registration> <dot1q-pb:cvid>303</dot1q-pb:cvid> <dot1q-pb:svid>301</dot1q-pb:svid> <dot1q-pb:untagged-pep>false</dot1q-pb:untagged-pep> <dot1q-pb:untagged-cep>false</dot1q-pb:untagged-cep> </dot1q-pb:cvid-registration> </dot1q:bridge-port> </interface> <interface> <name>eth2</name> <description>XGLAN 2</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>2</if-index> <phys-address>00:B0:AC:0D:13:4C</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>1.000</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>2</port-number> </bridge-port> </interface> <interface> <name>eth3</name> <description>ODU C</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>3</if-index> <phys-address>00:B0:AC:0D:13:4D</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>3</port-number> </bridge-port> </interface> <interface> <name>eth4</name> <description>LAN 1</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>up</admin-status> <oper-status>up</oper-status> <if-index>4</if-index> <phys-address>00:B0:AC:0D:13:4E</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>1.000</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>4</port-number> </bridge-port> </interface> <interface> <name>eth5</name> <description>LAN 2</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>5</if-index> <phys-address>00:B0:AC:0D:13:4F</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>1.000</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>5</port-number> </bridge-port> </interface> <interface> <name>eth6</name> <description>LAN 3</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>up</admin-status> <oper-status>up</oper-status> <if-index>6</if-index> <phys-address>00:B0:AC:0D:13:50</phys-address> <speed>100000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>0.100</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>6</port-number> </bridge-port> </interface> <interface> <name>eth7</name> <description>LAN 4</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>7</if-index> <phys-address>00:B0:AC:0D:13:51</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>half</duplex> <speed>0.010</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>7</port-number> </bridge-port> </interface> <interface> <name>eth8</name> <description>ODU D</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>8</if-index> <phys-address>00:B0:AC:0D:13:52</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>8</port-number> </bridge-port> </interface> <interface> <name>eth9</name> <description>ODU A</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>up</admin-status> <oper-status>up</oper-status> <if-index>9</if-index> <phys-address>00:B0:AC:0D:13:53</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>9</port-number> </bridge-port> </interface> <interface> <name>eth10</name> <description>ODU B</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>10</if-index> <phys-address>00:B0:AC:0D:13:54</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>10</port-number> </bridge-port> </interface> </interfaces> </data> """ print(validateInventory.check_SVC_PEB_inventory(xml_reply)) Loading
.gitignore +2 −1 Original line number Diff line number Diff line lib lib64 pyvenv.cfg bin lib lib64 pyvenv.cfg bin tmp.py
features/steps/NetconfLibrary.py +43 −54 Original line number Diff line number Diff line Loading @@ -128,69 +128,58 @@ class NetconfLibrary: """Deploy a S_VLAN in PEB mode and register two CVLAN """ for ne in self.network: if ne.edgeIface!=None: m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename) #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password) xml = create_VLAN_xml(ne,svid) m.edit_config(target="candidate", config=xml) m.commit() env = Environment( loader=FileSystemLoader("."), autoescape=False) xml = create_VLAN_xml(ne,cvid1) target = "candidate" m.edit_config(target=target, config=xml) m.commit() xml = create_VLAN_xml(ne,cvid2) target = "candidate" m.edit_config(target=target, config=xml) m.commit() context = { "port1_name":ne.edgeIface, "cvid1":cvid1, "cvid2":cvid2, "port1_name" : ne.port_1 "svid":svid } xml = env.get_template("features/steps/svlan_2_registration_creation.xml.pyformat").render(context) m.edit_config(target="candidate", config=xml) m.commit() m.close_session() @keyword("the controller register the CVLAN ${cvid1} and ${cvid1} to the VLAN ${svid}") def register_CVLAN_in_SVLAN( @keyword("the controller unregister the CVLAN ${cvid1} and ${cvid1} to the VLAN ${svid}") def unregister_CVLAN_in_SVLAN( self, cvid1: int, cvid2: int, svid: int ) -> None: """Deploy a S_VLAN in PEB mode and register two CVLAN """ for ne in self.network: if ne.edgeIface!=None: m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename) #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password) xml = create_VLAN_xml(ne,svid) m.edit_config(target="candidate", config=xml) m.commit() env = Environment( loader=FileSystemLoader("."), autoescape=False) context = { "cvid1":cvid1, "cvid2":cvid2, "svid" : svid, "port1_name" : ne.port_1 } xml = env.get_template("features/steps/svlan_2_registration_deletion.xml.pyformat").render(context) m.edit_config(target="candidate", config=xml) m.commit() m.close_session() @keyword("the controller unregister the CVLAN ${cvid1} and ${cvid1} to the VLAN ${svid}") def unregister_CVLAN_in_SVLAN( self, cvid1: int, cvid2: int, svid: int ) -> None: """Deploy a S_VLAN in PEB mode and register two CVLAN """ for ne in self.network: m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename) #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password) xml = create_VLAN_xml(ne,svid) xml = delete_VLAN_xml(ne, cvid1) m.edit_config(target="candidate", config=xml) m.commit() env = Environment( loader=FileSystemLoader("."), autoescape=False) context = { "cvid1":cvid1, "cvid2":cvid2, "port1_name" : ne.port_1 } xml = env.get_template(vlan_delation_xml).render(context) xml = delete_VLAN_xml(ne, cvid2) m.edit_config(target="candidate", config=xml) m.commit() m.close_session() def connect_with_key(host, port, username, key_file): return manager.connect( host=host, Loading
features/steps/__pycache__/NetconfLibrary.cpython-312.pyc +129 B (12.8 KiB) File changed.No diff preview for this file type. View original file View changed file
network.csv +2 −2 Original line number Diff line number Diff line name,address,username,password,bridgeName,componentName,port_1,port_2,mgmt_port,key_filename ne1,192.168.13.134,domenico,domenico,Bridge-1,Component-1,1,2,830 name,address,username,password,key_filename,bridgeName,componentName,port_1,port_2,mgmt_port,edgeIface ne1,192.168.13.134,domenico,domenico,,Bridge-1,Component-1,1,2,830,eth0
tmp.pydeleted 100644 → 0 +0 −306 Original line number Diff line number Diff line from ncclient import manager from jinja2 import Environment, FileSystemLoader import xml.etree.ElementTree as ET from ncclient import manager import validateInventory if __name__=="__main__": xml_reply = """<?xml version="1.0" encoding="UTF-8"?><data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge" xmlns:dot1q-pb="urn:ieee:std:802.1Q:yang:ieee802-dot1q-pb"> <interface> <name>ETH-7-255-7</name> <dot1q:bridge-port> <dot1q:bridge-name>Bridge-301</dot1q:bridge-name> <dot1q-pb:cvid-registration> <dot1q-pb:cvid>302</dot1q-pb:cvid> <dot1q-pb:svid>301</dot1q-pb:svid> <dot1q-pb:untagged-pep>false</dot1q-pb:untagged-pep> <dot1q-pb:untagged-cep>false</dot1q-pb:untagged-cep> </dot1q-pb:cvid-registration> <dot1q-pb:cvid-registration> <dot1q-pb:cvid>303</dot1q-pb:cvid> <dot1q-pb:svid>301</dot1q-pb:svid> <dot1q-pb:untagged-pep>false</dot1q-pb:untagged-pep> <dot1q-pb:untagged-cep>false</dot1q-pb:untagged-cep> </dot1q-pb:cvid-registration> </dot1q:bridge-port> </interface> <interface> <name>eth2</name> <description>XGLAN 2</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>2</if-index> <phys-address>00:B0:AC:0D:13:4C</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>1.000</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>2</port-number> </bridge-port> </interface> <interface> <name>eth3</name> <description>ODU C</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>3</if-index> <phys-address>00:B0:AC:0D:13:4D</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>3</port-number> </bridge-port> </interface> <interface> <name>eth4</name> <description>LAN 1</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>up</admin-status> <oper-status>up</oper-status> <if-index>4</if-index> <phys-address>00:B0:AC:0D:13:4E</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>1.000</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>4</port-number> </bridge-port> </interface> <interface> <name>eth5</name> <description>LAN 2</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>5</if-index> <phys-address>00:B0:AC:0D:13:4F</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>1.000</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>5</port-number> </bridge-port> </interface> <interface> <name>eth6</name> <description>LAN 3</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>up</admin-status> <oper-status>up</oper-status> <if-index>6</if-index> <phys-address>00:B0:AC:0D:13:50</phys-address> <speed>100000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>full</duplex> <speed>0.100</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>6</port-number> </bridge-port> </interface> <interface> <name>eth7</name> <description>LAN 4</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>7</if-index> <phys-address>00:B0:AC:0D:13:51</phys-address> <speed>1000000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>true</enable> <negotiation-status>complete</negotiation-status> </auto-negotiation> <duplex>half</duplex> <speed>0.010</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>7</port-number> </bridge-port> </interface> <interface> <name>eth8</name> <description>ODU D</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>8</if-index> <phys-address>00:B0:AC:0D:13:52</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>8</port-number> </bridge-port> </interface> <interface> <name>eth9</name> <description>ODU A</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>up</admin-status> <oper-status>up</oper-status> <if-index>9</if-index> <phys-address>00:B0:AC:0D:13:53</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>9</port-number> </bridge-port> </interface> <interface> <name>eth10</name> <description>ODU B</description> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <link-up-down-trap-enable>enabled</link-up-down-trap-enable> <admin-status>down</admin-status> <oper-status>down</oper-status> <if-index>10</if-index> <phys-address>00:B0:AC:0D:13:54</phys-address> <speed>2500000000</speed> <ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface"> <auto-negotiation> <enable>false</enable> </auto-negotiation> <duplex>full</duplex> <speed>2.500</speed> <flow-control> <force-flow-control>false</force-flow-control> </flow-control> <frame-limit-slow-protocol>10</frame-limit-slow-protocol> </ethernet> <bridge-port xmlns="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge"> <bridge-name>Bridge-1</bridge-name> <component-name>Component-1</component-name> <port-type xmlns:dot1q="urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge">dot1q:c-vlan-bridge-port</port-type> <default-priority>0</default-priority> <port-number>10</port-number> </bridge-port> </interface> </interfaces> </data> """ print(validateInventory.check_SVC_PEB_inventory(xml_reply))