Example #1
0
 def get_all_devices(self):
     devices = set()
     # Wow nice reuse of getting a list of BRIDGE names
     for device in bridge_lib.get_bridge_names():
         if device.startswith(constants.TAP_DEVICE_PREFIX):
             devices.add(device)
     return devices
 def get_all_devices(self):
     devices = set()
     # Wow nice reuse of getting a list of BRIDGE names
     for device in bridge_lib.get_bridge_names():
         if device.startswith(constants.TAP_DEVICE_PREFIX):
             devices.add(device)
     return devices
    def get_all_neutron_bridges(self):
        neutron_bridge_list = []
        bridge_list = bridge_lib.get_bridge_names()
        for bridge in bridge_list:
            if bridge.startswith(BRIDGE_NAME_PREFIX):
                neutron_bridge_list.append(bridge)

        # NOTE(nick-ma-z): Add pre-existing user-defined bridges
        for bridge_name in self.bridge_mappings.values():
            if bridge_name not in neutron_bridge_list:
                neutron_bridge_list.append(bridge_name)
        return neutron_bridge_list
 def get_all_devices(self):
     devices = set()
     for device in bridge_lib.get_bridge_names():
         if device.startswith(constants.TAP_DEVICE_PREFIX):
             devices.add(device)
     return devices
 def get_deletable_bridges(self):
     bridge_list = bridge_lib.get_bridge_names()
     bridges = {b for b in bridge_list if b.startswith(BRIDGE_NAME_PREFIX)}
     bridges.difference_update(self.bridge_mappings.values())
     return bridges
 def get_all_devices(self):
     devices = set()
     for device in bridge_lib.get_bridge_names():
         if device.startswith(constants.TAP_DEVICE_PREFIX):
             devices.add(device)
     return devices
 def get_deletable_bridges(self):
     bridge_list = bridge_lib.get_bridge_names()
     bridges = {b for b in bridge_list if b.startswith(BRIDGE_NAME_PREFIX)}
     bridges.difference_update(self.bridge_mappings.values())
     return bridges
 def test_get_bridge_names(self):
     self.assertIn(self.bridge.name, bridge_lib.get_bridge_names())
Example #9
0
 def test_get_bridge_names(self):
     self.assertIn(self.bridge.name, bridge_lib.get_bridge_names())
Example #10
0
 def prune_known_bridges(self):
     self.known_bridges.intersection_update(bridge_lib.get_bridge_names())
 def prune_known_bridges(self):
     self.known_bridges.intersection_update(bridge_lib.get_bridge_names())