move the correct veth into the netns for the LB
bug 1035649 This fix moves the correct device into the namespace and improves the test to ensure the proper device was moved. The previous generic check failed to catch an error during refactoring. Change-Id: Ifa2e2bb97dc923549d00b1750c61a22e139647d7
This commit is contained in:
parent
a8d9ed9181
commit
ce8f2bd61d
@ -165,7 +165,7 @@ class BridgeInterfaceDriver(LinuxInterfaceDriver):
|
||||
root_veth.link.set_address(mac_address)
|
||||
|
||||
namespace = ip.ensure_namespace(network_id)
|
||||
namespace.add_device_to_namespace(root_veth)
|
||||
namespace.add_device_to_namespace(dhcp_veth)
|
||||
|
||||
root_veth.link.set_up()
|
||||
dhcp_veth.link.set_up()
|
||||
|
@ -178,7 +178,7 @@ class TestBridgeInterfaceDriver(TestBase):
|
||||
[mock.call('sudo'),
|
||||
mock.call().add_veth('tap0', 'dhc0'),
|
||||
mock.call().ensure_namespace('01234567-1234-1234-99'),
|
||||
mock.call().ensure_namespace().add_device_to_namespace(mock.ANY)])
|
||||
mock.call().ensure_namespace().add_device_to_namespace(ns_veth)])
|
||||
|
||||
root_veth.assert_has_calls([mock.call.link.set_up()])
|
||||
ns_veth.assert_has_calls([mock.call.link.set_up()])
|
||||
|
Loading…
x
Reference in New Issue
Block a user