]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
move the correct veth into the netns for the LB
authorMark McClain <mark.mcclain@dreamhost.com>
Sat, 11 Aug 2012 15:29:14 +0000 (11:29 -0400)
committerMark McClain <mark.mcclain@dreamhost.com>
Sat, 11 Aug 2012 15:33:21 +0000 (11:33 -0400)
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

quantum/agent/linux/interface.py
quantum/tests/unit/test_linux_interface.py

index 03ed071dfe545c59df61c299626a383fac215e6f..b622d1e96ac52ad7dc0638e30931005b0b1ccae1 100644 (file)
@@ -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()
index a9d9cd63878b82a99164b5cf02e2279e5438ce1e..8de30e28ae1caeaa564d5d6895a1c83f88a5cb1e 100644 (file)
@@ -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()])