summaryrefslogtreecommitdiffstats
path: root/deploy/get_conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/get_conf.py')
-rwxr-xr-xdeploy/get_conf.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/deploy/get_conf.py b/deploy/get_conf.py
index eaac8b17..a2d7bf6a 100755
--- a/deploy/get_conf.py
+++ b/deploy/get_conf.py
@@ -23,8 +23,9 @@ def decorator_mk(types):
result = {}
for item in item_list:
ret = func(item)
- if ret.keys()[0] in result:
- result[ret.keys()[0]].append(ret.values()[0][0])
+ item_name = ret.keys().pop()
+ if result is not None and item_name in result:
+ result[item_name] = result[item_name] + ret[item_name]
else:
result.update(ret)
return result
@@ -93,10 +94,4 @@ def config(dha_file, network_file):
hosts_name = dha_config_parse(data, dha_file)
data = init(network_file)
network_map, vip, interface_map = network_config_parse(data, network_file)
- for interface_name in interface_map:
- for name in interface_map[interface_name]:
- if name.get('name', None) == 'MANAGEMENT':
- name['ip'] = network_map.get(
- 'MANAGEMENT', None).get(
- 'ip_ranges', None)[0].get('start', None)
return interface_map, hosts_name, network_map, vip