From: Gary Kotton Date: Sun, 24 Feb 2013 10:30:08 +0000 (+0000) Subject: Enabled add gateway to refrain from checking exit code X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=063b7ee3a35a266eaf6548c30c697e3d55748288;p=openstack-build%2Fneutron-build.git Enabled add gateway to refrain from checking exit code Fixes bug 1129741 Change-Id: Ibb9a0e1c0f0e5ad610c4f45ae65eb82e25a57b94 --- diff --git a/quantum/agent/linux/ip_lib.py b/quantum/agent/linux/ip_lib.py index 4065b44ff..31337087e 100644 --- a/quantum/agent/linux/ip_lib.py +++ b/quantum/agent/linux/ip_lib.py @@ -297,7 +297,7 @@ class IpRouteCommand(IpDeviceCommandBase): COMMAND = 'route' def add_gateway(self, gateway, metric=None): - args = ['add', 'default', 'via', gateway] + args = ['replace', 'default', 'via', gateway] if metric: args += ['metric', metric] args += ['dev', self.name] diff --git a/quantum/tests/unit/test_linux_ip_lib.py b/quantum/tests/unit/test_linux_ip_lib.py index f4a67dec1..cc54ff23c 100644 --- a/quantum/tests/unit/test_linux_ip_lib.py +++ b/quantum/tests/unit/test_linux_ip_lib.py @@ -548,7 +548,7 @@ class TestIpRouteCommand(TestIPCmdBase): metric = 100 self.route_cmd.add_gateway(gateway, metric) self._assert_sudo([], - ('add', 'default', 'via', gateway, + ('replace', 'default', 'via', gateway, 'metric', metric, 'dev', self.parent.name))