Merge "Add virtualization metadata and move kernel to software"

This commit is contained in:
Zuul 2018-07-13 19:56:23 +00:00 committed by Gerrit Code Review
commit 73f25482b8
1 changed files with 8 additions and 1 deletions

View File

@ -40,7 +40,8 @@ class Metadata(object):
hard_dict['hardware_details'] = []
hardware_dict = {}
hardware_dict['label'] = item['inventory_hostname']
hardware_dict['kernel'] = item['ansible_kernel']
hardware_dict['virtualization_role'] = item['ansible_virtualization_role']
hardware_dict['virtualization_type'] = item['ansible_virtualization_type']
hardware_dict['total_mem'] = item[
'ansible_memory_mb']['real']['total']
hardware_dict['total_logical_cores'] = item[
@ -102,6 +103,12 @@ class Metadata(object):
software_dict[service_name][section] = {}
software_dict[service_name][section][key] = item[soft]
node = item['inventory_hostname']
software_dict['kernel'] = {}
software_dict['kernel']['version'] = item['ansible_kernel']
software_dict['kernel']['architecture'] = item['ansible_architecture']
software_dict['kernel']['node_name'] = node
soft_all_dict.append(software_dict)
return soft_all_dict