def _setUp(self): ip_wrapper = ip_lib.IPWrapper() self.ip_dev = common_base.create_resource( self.prefix, ip_wrapper.add_macvtap, self.src_dev, mode=self.mode) self.addCleanup(self.destroy)
def setUp(self): super(LinuxBridgeFixture, self).setUp() self.namespace = self.useFixture(NamespaceFixture()).name self.bridge = common_base.create_resource(BR_PREFIX, bridge_lib.BridgeDevice.addbr, namespace=self.namespace) self.addCleanup(self.bridge.delbr) self.bridge.link.set_up() self.addCleanup(self.bridge.link.set_down)
def _setUp(self): ip_wrapper = ip_lib.IPWrapper() self.ports = common_base.create_resource( VETH0_PREFIX, lambda name: ip_wrapper.add_veth(name, self.get_peer_name(name))) self.addCleanup(self.destroy)
def _setUp(self): self.namespace = self.useFixture(NamespaceFixture()).name self.bridge = common_base.create_resource( self.prefix, bridge_lib.BridgeDevice.addbr, namespace=self.namespace) self.addCleanup(self.bridge.delbr) self.bridge.link.set_up() self.addCleanup(self.bridge.link.set_down)
def setUp(self): super(OVSPortFixture, self).setUp() port_name = common_base.create_resource(PORT_PREFIX, self.create_port) self.addCleanup(self.bridge.delete_port, port_name) self.port = ip_lib.IPDevice(port_name) ns_ip_wrapper = ip_lib.IPWrapper(self.namespace) ns_ip_wrapper.add_device_to_namespace(self.port) self.port.link.set_up()
def setUp(self): super(VethFixture, self).setUp() ip_wrapper = ip_lib.IPWrapper() def _create_veth(name0): name1 = name0.replace(VETH0_PREFIX, VETH1_PREFIX) return ip_wrapper.add_veth(name0, name1) self.ports = common_base.create_resource(VETH0_PREFIX, _create_veth) self.addCleanup(self.destroy)
def _create_bridge(self): if self.prefix_is_full_name: return bridge_lib.BridgeDevice.addbr( name=self.prefix, namespace=self.namespace ) else: return common_base.create_resource( self.prefix, bridge_lib.BridgeDevice.addbr, namespace=self.namespace)
def setUp(self): super(OVSBridgeFixture, self).setUp() ovs = ovs_lib.BaseOVS() self.bridge = common_base.create_resource(self.prefix, ovs.add_bridge) self.addCleanup(self.bridge.destroy)
def _setUp(self): ovs = ovs_lib.BaseOVS() self.bridge = common_base.create_resource(self.prefix, ovs.add_bridge) self.addCleanup(self.bridge.destroy)
def setUp(self): super(OVSBridgeFixture, self).setUp() ovs = ovs_lib.BaseOVS() self.bridge = common_base.create_resource(BR_PREFIX, ovs.add_bridge) self.addCleanup(self.bridge.destroy)