summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy/get_conf.py28
-rw-r--r--deploy/tempest.py5
2 files changed, 16 insertions, 17 deletions
diff --git a/deploy/get_conf.py b/deploy/get_conf.py
index 1f4500a4..4d112589 100755
--- a/deploy/get_conf.py
+++ b/deploy/get_conf.py
@@ -25,8 +25,8 @@ def init(file):
def decorator_mk(types):
def decorator(func):
- def wrapter(s):
- item_list = s.get(types, [])
+ def wrapter(data):
+ item_list = data.get(types, [])
result = {}
for item in item_list:
ret = func(item)
@@ -88,15 +88,15 @@ def mac_address(host=None):
return map
-def network_config_parse(s, dha_file):
- network_map = network(s)
- vip = s.get('internal_vip')
- interface_map = interface(s)
+def network_config_parse(network_data):
+ network_map = network(network_data)
+ vip = network_data.get('internal_vip')
+ interface_map = interface(network_data)
return network_map, vip, interface_map
-def dha_config_parse(s, dha_file):
- host_role_map = role(s)
+def dha_config_parse(dha_data):
+ host_role_map = role(dha_data)
hosts_name = []
for name in host_role_map:
hosts_name.append(name)
@@ -104,12 +104,12 @@ def dha_config_parse(s, dha_file):
def config(dha_file, network_file):
- data = init(dha_file)
- ceph_disk_name = data.get('ceph_disk_name')
- hosts_name = dha_config_parse(data, dha_file)
- mac_address_map = mac_address(data)
- data = init(network_file)
- network_map, vip, interface_map = network_config_parse(data, network_file)
+ dha_data = init(dha_file)
+ ceph_disk_name = dha_data.get('ceph_disk_name')
+ hosts_name = dha_config_parse(dha_data)
+ mac_address_map = mac_address(dha_data)
+ network_data = init(network_file)
+ network_map, vip, interface_map = network_config_parse(network_data)
return interface_map, hosts_name, network_map, vip, ceph_disk_name, mac_address_map
diff --git a/deploy/tempest.py b/deploy/tempest.py
index b154e72d..f9f9e978 100644
--- a/deploy/tempest.py
+++ b/deploy/tempest.py
@@ -219,10 +219,9 @@ def add_hosts_interface(cluster_id, hosts_info, hosts_name, mac_address_map,
def add_host_role(cluster_id, host_id, host_exp_name, host_real_name, vip):
role_meta = {'filters': {'cluster_id': cluster_id}}
role_list_generator = client.roles.list(**role_meta)
- role_list = [role for role in role_list_generator]
- lb_role_id = [role.id for role in role_list if
+ lb_role_id = [role.id for role in role_list_generator if
role.name == "CONTROLLER_LB"][0]
- computer_role_id = [role.id for role in role_list if
+ computer_role_id = [role.id for role in role_list_generator if
role.name == "COMPUTER"][0]
if host_exp_name in ['all_in_one']:
role_lb_update_meta = {'nodes': [host_id],