summaryrefslogtreecommitdiffstats
path: root/deploy/get_conf.py
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2016-12-20 06:17:59 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-20 06:17:59 +0000
commita5e3706c114f43224056fa222276491445ddcf55 (patch)
tree58a0eb74fcb671462f729243d56d847d698bcc72 /deploy/get_conf.py
parentb4dc59fc0817e1ceb7b08952a1ddfae13e990acf (diff)
parentfa88d5974878a0cbe8ea03bae14a8714bafac624 (diff)
Merge "fix interface definition in yml"
Diffstat (limited to 'deploy/get_conf.py')
-rwxr-xr-xdeploy/get_conf.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/deploy/get_conf.py b/deploy/get_conf.py
index 309b331b..5ce9806b 100755
--- a/deploy/get_conf.py
+++ b/deploy/get_conf.py
@@ -41,10 +41,11 @@ def network(network=None):
@decorator_mk('hosts')
def interface(host=None):
- hostname = host.get('name', '')
interface = host.get('interface', '')
map = {}
- map[hostname] = interface
+ for k in interface:
+ for v in k['logic']:
+ map[v['name']] = {'ip': v['ip'], 'phynic': k['phynic']}
return map
@@ -85,5 +86,7 @@ def config(dha_file, network_file):
dha_config_parse(data, dha_file)
data = init(network_file)
network_map, vip = network_config_parse(data, network_file)
+ for k in host_interface_map:
+ host_interface_map[k].update(network_map[k])
return host_interface_map, host_role_map, \
host_ip_passwd_map, network_map, vip