summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2017-07-28 15:45:45 +0800
committerAlex Yang <yangyang1@zte.com.cn>2017-07-28 15:45:45 +0800
commitd0b28ef6d7cb12e1b70841991ff321cd6e7c1edf (patch)
tree2d149f28b1b9cb9b093dc339ec93da7f91028f77
parent2be3f7850dedaa885dd4f6957b53a541045ec4ed (diff)
Do not provide ipmi user and password in virtual deployment
Change-Id: Ib7989bed237a03cdab01fea89aba4e2038815e5f Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
-rw-r--r--deploy/tempest.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/deploy/tempest.py b/deploy/tempest.py
index b1e02763..ebd040ba 100644
--- a/deploy/tempest.py
+++ b/deploy/tempest.py
@@ -82,6 +82,7 @@ def prepare_install():
print("build pxe...")
build_pxe_for_discover(cluster_id)
elif conf['host'] and conf['host'] == 'yes':
+ isbare = False if 'isbare' in conf and conf['isbare'] == 0 else True
print("discover host...")
discover_host(hosts_name)
time.sleep(10)
@@ -90,7 +91,7 @@ def prepare_install():
cluster_info = get_cluster()
cluster_id = cluster_info.id
add_hosts_interface(cluster_id, hosts_info, hosts_name,
- host_interface_map, vip)
+ host_interface_map, vip, isbare)
if len(hosts_name) == 1:
protocol_type = 'LVM'
service_name = 'cinder'
@@ -106,7 +107,7 @@ def prepare_install():
enable_opendaylight(cluster_id, 'odl_l3')
elif 'scenario' in conf and 'odl_l2' in conf['scenario']:
enable_opendaylight(cluster_id, 'odl_l2')
- if 'isbare' in conf and conf['isbare'] == 0:
+ if not isbare:
install_os_for_vm_step1(cluster_id)
else:
print("daisy baremetal deploy start")
@@ -183,12 +184,13 @@ def get_cluster():
def add_hosts_interface(cluster_id, hosts_info, hosts_name, host_interface_map,
- vip):
+ vip, isbare):
for host_name, host in zip(hosts_name, hosts_info):
host = host.to_dict()
host['cluster'] = cluster_id
- host['ipmi_user'] = 'zteroot'
- host['ipmi_passwd'] = 'superuser'
+ if isbare:
+ host['ipmi_user'] = 'zteroot'
+ host['ipmi_passwd'] = 'superuser'
for interface in host['interfaces']:
interface_name = interface['name']
if interface_name in host_interface_map: