Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list installed products #36

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sat6Inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@
'virtual_guests': 'Virtual Guests',
'num_virtual_guests': 'Virtual Guest Count',
'activation_keys': 'Activation Keys',
'installed_products': 'Installed Products',
'installed_products_ids': 'Installed Product IDs',
'errata_out_of_date': 'Errata out of date',
'packages_out_of_date': 'Packages out of date',
'biosvendor': 'BIOS Vendor',
Expand Down Expand Up @@ -412,6 +414,9 @@ def report_sysdata():
host_info['num_virtual_guests'] = len(sysdata['subscription_facet_attributes']['virtual_guests'])
if 'subscription_facet_attributes' in sysdata and sysdata['subscription_facet_attributes'] and 'activation_keys' in sysdata['subscription_facet_attributes'] and sysdata['subscription_facet_attributes']['activation_keys']:
host_info['activation_keys'] = ','.join([x['name'] for x in sysdata['subscription_facet_attributes']['activation_keys']])
if 'subscription_facet_attributes' in sysdata and sysdata['subscription_facet_attributes'] and 'installed_products' in sysdata['subscription_facet_attributes'] and sysdata['subscription_facet_attributes']['installed_products']:
host_info['installed_products'] = ','.join([x['productName'] for x in sysdata['subscription_facet_attributes']['installed_products']])
host_info['installed_products_ids'] = ','.join([x['productId'] for x in sysdata['subscription_facet_attributes']['installed_products']])
if 'errata_counts' in sysdata and sysdata['errata_counts']:
for key in _sysdata_errata_mapping.keys():
if _sysdata_errata_mapping[key] in sysdata['errata_counts']:
Expand Down Expand Up @@ -496,7 +501,7 @@ def report_sysdata():
print "Error - %s" % (e)

host_info = {}
fake = ['software_channel', 'configuration_channel', 'system_group', 'amount', 'entitlement', 'entitlements', 'organization', 'account_number', 'contract_number', 'start_date', 'end_date', 'hypervisor', 'virtual', 'compliant', 'ip_addresses', 'ipv6_addresses', 'num_virtual_guests', 'virtual_guests', 'activation_keys', 'derived_entitlement']
fake = ['software_channel', 'configuration_channel', 'system_group', 'amount', 'entitlement', 'entitlements', 'organization', 'account_number', 'contract_number', 'start_date', 'end_date', 'hypervisor', 'virtual', 'compliant', 'ip_addresses', 'ipv6_addresses', 'num_virtual_guests', 'virtual_guests', 'activation_keys', 'installed_products', 'installed_products_ids', 'derived_entitlement']
for key in _sysdata_mapping.keys() + _sysdata_facts_mapping.keys() + _sysdata_virtual_host_mapping.keys() + _sysdata_errata_mapping.keys() + _facts_mapping.keys() + fake:
host_info[key] = 'unknown'

Expand Down