summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-10-26 23:00:47 +0800
committerbaigk <baiguoku@huawei.com>2015-10-26 23:00:47 +0800
commitf1f1d77286b6e261dd82bd74e5aca2adc9b1f244 (patch)
tree5482a87eedeaba9229a6194a5c2a4b8b0e940177 /deploy/adapters/ansible/roles
parent4d2673fbf7dc77113309c2ce50eaa2b850c7825e (diff)
delete default route via compass ip
JIRA: COMPASS-114 Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r--deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
index 5e6520af..bf784bb3 100644
--- a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
+++ b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
@@ -56,6 +56,7 @@ def setup_ips(ip_settings, sys_intf_mappings):
cmd = "ip addr add %s/%s brd %s dev %s;" \
% (intf_info["ip"], intf_info["netmask"], str(network.broadcast),intf_name)
if "gw" in intf_info:
+ cmd += "route del default;"
cmd += "ip route add default via %s dev %s" % (intf_info["gw"], intf_name)
LOG.info("setup_ips: cmd=%s" % cmd)
os.system(cmd)