Commit 81acc8fa authored by douomo's avatar douomo
Browse files

added filter in verification of VLAN in provisioning test

parent 2fa63e3c
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -78,7 +78,10 @@ class NetconfLibrary:
        for ne in self.network:
        for ne in self.network:
            m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename)
            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)
            #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password)
            config = m.get_config(source='running').data_xml
            tree = ET.parse('filters/ServiceFilter/bridge_filter.xml')
            root = tree.getroot()
            xmlstr = ET.tostring(root, encoding='unicode', method='xml')
            config = m.get_config(source='running', filter=("subtree", xmlstr)).data_xml
            m.close_session()
            m.close_session()
            assert bool(vlan_exists(config, vlan_id))
            assert bool(vlan_exists(config, vlan_id))
            
            
@@ -105,7 +108,11 @@ class NetconfLibrary:
        for ne in self.network:
        for ne in self.network:
            m = connect_with_key(ne.address, ne.mgmt_port, ne.username, ne.key_filename)
            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)
            #m = connect_with_credentials(ne.address, ne.mgmt_port, ne.username, ne.password)
            config = m.get_config(source='running').data_xml
            tree = ET.parse('filters/ServiceFilter/bridge_filter.xml')
            root = tree.getroot()
            xmlstr = ET.tostring(root, encoding='unicode', method='xml')
            config = m.get_config(source='running', filter=("subtree", xmlstr)).data_xml
            m.close_session()
            assert bool(not(vlan_exists(config, vlan_id)))
            assert bool(not(vlan_exists(config, vlan_id)))


    @keyword("the controller deploys VLANs ${start} to ${stop} by step of ${step}")
    @keyword("the controller deploys VLANs ${start} to ${stop} by step of ${step}")