diff options
author | zhouya <zhou.ya@zte.com.cn> | 2017-04-10 16:45:48 +0800 |
---|---|---|
committer | zhouya <zhou.ya@zte.com.cn> | 2017-04-10 16:45:48 +0800 |
commit | 5a2adab12b54474d5f10f178b69775cc7411260f (patch) | |
tree | 05b9d03bffac8601e9d6ffc1d97d7808628779f1 | |
parent | 8ff715be927f6637764c99700606b3d1baba0cf8 (diff) |
modify service name in service disk table
Change-Id: Ic33381ef3339bdcec82cba7afbfc2d32f6e88be4
Signed-off-by: zhouya <zhou.ya@zte.com.cn>
-rw-r--r-- | deploy/tempest.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/deploy/tempest.py b/deploy/tempest.py index 3bf0ccc7..bd1bc04f 100644 --- a/deploy/tempest.py +++ b/deploy/tempest.py @@ -90,12 +90,15 @@ def prepare_install(): host_interface_map, vip) if len(hosts_name) == 1: protocol_type = 'LVM' + service_name = 'cinder' elif len(hosts_name) > 2: - protocol_type = 'CEPH' + protocol_type = 'RAW' + service_name = 'ceph' else: print('hosts_num is %s' % len(hosts_name)) protocol_type = None - enable_cinder_backend(cluster_id, ceph_disk_name, protocol_type) + enable_cinder_backend(cluster_id, service_name, + ceph_disk_name, protocol_type) if 'isbare' in conf and conf['isbare'] == 0: install_os_for_vm_step1(cluster_id) else: @@ -223,13 +226,13 @@ def add_host_role(cluster_id, host_id, host_exp_name, host_real_name, vip): client.roles.update(computer_role_id, **role_computer_update_meta) -def enable_cinder_backend(cluster_id, disk_name, protocol_type): +def enable_cinder_backend(cluster_id, service_name, disk_name, protocol_type): 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 role.name == "CONTROLLER_LB"][0] - service_disk_meta = {'service': 'cinder', + service_disk_meta = {'service': service_name, 'disk_location': 'local', 'partition': disk_name, 'protocol_type': protocol_type, |