diff --git a/quantum/agent/linux/interface.py b/quantum/agent/linux/interface.py index 03ed071dfe..b622d1e96a 100644 --- a/quantum/agent/linux/interface.py +++ b/quantum/agent/linux/interface.py @@ -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() diff --git a/quantum/tests/unit/test_linux_interface.py b/quantum/tests/unit/test_linux_interface.py index a9d9cd6387..8de30e28ae 100644 --- a/quantum/tests/unit/test_linux_interface.py +++ b/quantum/tests/unit/test_linux_interface.py @@ -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()])