Esempio n. 1
0
    def cleanup(self):
        """
        Delete all remaining bridges and ports if ovs-test client did not had
        a chance to remove them. It is necessary to call this function if
        ovs-test server is abruptly terminated when doing the tests.
        """
        for port in self.ports:
            # Remove ports that were added to existing bridges
            vswitch.ovs_vsctl_del_port_from_bridge(port)

        for bridge in self.bridges:
            # Remove bridges that were added for L3 tests
            vswitch.ovs_vsctl_del_bridge(bridge)

        for pbridge in self.pbridges:
            # Remove bridges that were added for VLAN tests
            vswitch.ovs_vsctl_del_pbridge(pbridge[0], pbridge[1])
Esempio n. 2
0
    def cleanup(self):
        """
        Delete all remaining bridges and ports if ovs-test client did not had
        a chance to remove them. It is necessary to call this function if
        ovs-test server is abruptly terminated when doing the tests.
        """
        for port in self.ports:
            # Remove ports that were added to existing bridges
            vswitch.ovs_vsctl_del_port_from_bridge(port)

        for bridge in self.bridges:
            # Remove bridges that were added for L3 tests
            vswitch.ovs_vsctl_del_bridge(bridge)

        for pbridge in self.pbridges:
            # Remove bridges that were added for VLAN tests
            vswitch.ovs_vsctl_del_pbridge(pbridge[0], pbridge[1])
Esempio n. 3
0
 def xmlrpc_del_test_bridge(self, bridge, iface):
     """
     This function deletes the test bridge and moves its IP configuration
     back to the physical interface.
     """
     ret = vswitch.ovs_vsctl_del_pbridge(bridge, iface)
     self.pbridges.discard((bridge, iface))
     return ret
Esempio n. 4
0
 def xmlrpc_del_test_bridge(self, bridge, iface):
     """
     This function deletes the test bridge and moves its IP configuration
     back to the physical interface.
     """
     ret = vswitch.ovs_vsctl_del_pbridge(bridge, iface)
     self.pbridges.discard((bridge, iface))
     return ret