summaryrefslogtreecommitdiffstats
path: root/deploy/tempest.py
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/tempest.py')
-rw-r--r--deploy/tempest.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/deploy/tempest.py b/deploy/tempest.py
index ebd040ba..3c1a6c7d 100644
--- a/deploy/tempest.py
+++ b/deploy/tempest.py
@@ -68,7 +68,7 @@ def prepare_install():
print("get config...")
conf = cfg.ConfigOpts()
parse(conf, sys.argv[1:])
- host_interface_map, hosts_name, network_map, vip, ceph_disk_name = \
+ host_interface_map, hosts_name, network_map, vip, ceph_disk_name, mac_address_map = \
get_conf.config(conf['dha'], conf['network'])
if conf['cluster'] and conf['cluster'] == 'yes':
print("add cluster...")
@@ -90,7 +90,7 @@ def prepare_install():
hosts_info = get_hosts()
cluster_info = get_cluster()
cluster_id = cluster_info.id
- add_hosts_interface(cluster_id, hosts_info, hosts_name,
+ add_hosts_interface(cluster_id, hosts_info, hosts_name, mac_address_map,
host_interface_map, vip, isbare)
if len(hosts_name) == 1:
protocol_type = 'LVM'
@@ -183,7 +183,8 @@ def get_cluster():
return cluster_info
-def add_hosts_interface(cluster_id, hosts_info, hosts_name, host_interface_map,
+def add_hosts_interface(cluster_id, hosts_info, hosts_name, mac_address_map,
+ host_interface_map,
vip, isbare):
for host_name, host in zip(hosts_name, hosts_info):
host = host.to_dict()
@@ -196,6 +197,10 @@ def add_hosts_interface(cluster_id, hosts_info, hosts_name, host_interface_map,
if interface_name in host_interface_map:
interface['assigned_networks'] = \
host_interface_map[interface_name]
+ if mac_address_map:
+ for nodename in mac_address_map:
+ if interface['mac'] in mac_address_map[nodename]:
+ host_name = nodename
pathlist = os.listdir(iso_path)
for filename in pathlist:
if filename.endswith('iso'):