Fix hardcoded references to hostnames

When dumping software metadata we expect undercloud, controller and
compute in the hostnames. We should instead be looking for the group
names as the group names remain constant irrespective of the hostnames.

Change-Id: Ic010ce31dec79c0d66e22991cab239a50b321e9a
This commit is contained in:
Sai Sindhur Malleni 2017-06-12 17:45:15 -04:00
parent c2654c826b
commit ca054d3fdc

View File

@ -68,7 +68,7 @@ class Metadata(object):
soft_all_dict = []
for item in sys_data['system_data']:
nodes = ['controller', 'undercloud', 'compute']
if any(node in item['inventory_hostname'] for node in nodes):
if any(node in item['group_names'] for node in nodes):
software_dict = {}
for soft in item:
if 'openstack' in soft: