]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
ip-lib : use "ip neigh replace" instead of "ip neigh add"
authormathieu-rohon <mathieu.rohon@gmail.com>
Tue, 22 Apr 2014 09:44:35 +0000 (11:44 +0200)
committermathieu-rohon <mathieu.rohon@gmail.com>
Tue, 22 Apr 2014 13:37:24 +0000 (15:37 +0200)
Closes bug #1311002

Change-Id: Ie50bc0bff32b7f97ac317ccc2521bbea52d59ca3

neutron/agent/linux/ip_lib.py
neutron/tests/unit/test_linux_ip_lib.py

index c040362fd4ceda3c44a294a14c9e2c69025402ef..40acb4c1840cbadb2e9ec3b2781b2cfbb20ae928 100644 (file)
@@ -444,7 +444,7 @@ class IpNeighCommand(IpDeviceCommandBase):
     COMMAND = 'neigh'
 
     def add(self, ip_version, ip_address, mac_address):
-        self._as_root('add',
+        self._as_root('replace',
                       ip_address,
                       'lladdr',
                       mac_address,
index 59fe4223c88be6289d66770018a8e470ee6c0b3f..f8f4d54a242d33e2b00c03088b6cb68969c3878b 100644 (file)
@@ -810,7 +810,7 @@ class TestIpNeighCommand(TestIPCmdBase):
 
     def test_add_entry(self):
         self.neigh_cmd.add(4, '192.168.45.100', 'cc:dd:ee:ff:ab:cd')
-        self._assert_sudo([4], ('add', '192.168.45.100', 'lladdr',
+        self._assert_sudo([4], ('replace', '192.168.45.100', 'lladdr',
                                 'cc:dd:ee:ff:ab:cd', 'nud', 'permanent',
                                 'dev', 'tap0'))