aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2015-10-27 10:29:44 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-27 10:29:44 +0000
commitba4bf5c48ec04ae70ef97443f8adb23f3e86b290 (patch)
treef129bc252f792639dcf3034b4d8473aa4508544e /deploy/adapters/ansible
parent7a0abbfd97c24635e160799f1a819b7dc257cb30 (diff)
parentf1f1d77286b6e261dd82bd74e5aca2adc9b1f244 (diff)
Merge "delete default route via compass ip"
Diffstat (limited to 'deploy/adapters/ansible')
-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)