Process yum_packages data

yum_pacakges data is captured by stockpile but is not currently
beging procssed by prescribe. This patch fixes that.

Change-Id: I3ac6c08d6e9ba462fe924498241f5b300d8cec15
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
This commit is contained in:
Sai Sindhur Malleni 2020-02-03 13:53:34 -05:00
parent a5e626b716
commit 6af0a98f3d

View File

@ -96,6 +96,13 @@ class Metadata(object):
if repo['state'] in 'enabled':
software_dict['repos_enabled']['repos'].append(repo['repoid'])
software_dict['repos_enabled']['node_name'] = node
if 'stockpile_yum_packages' in key and output not in bad_output_list:
software_dict['packages'] = {}
software_dict['packages']['installed'] = []
for package in output:
software_dict['packages']['installed'].append(
{'name': package['name'], 'version': package['version']})
software_dict['packages']['node_name'] = node
if 'stockpile_cpu_vuln' in key and output not in bad_output_list:
if 'vulnerability' not in sample_vuln_dict.keys():
sample_vuln_dict['vulnerability'] = {}