Bug 1662492

Summary: [RFE] Generate the complete report about Entitlement Information (hypervisors versus Content Hosts)
Product: Red Hat Satellite Reporter: Waldirio M Pinheiro <wpinheir>
Component: Subscription ManagementAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: bkearney, dsinglet, gscarbor, mhulan, pcreech, rjerrido, therman, wclark
Target Milestone: 6.7.0Keywords: FutureFeature, SubscriptionExperience, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
You can use the new Entitlements report template to monitor which entitlements are consumed by hosts that you manage with Satellite.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:23:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Waldirio M Pinheiro 2018-12-28 22:26:32 UTC
Description of problem:
Currently, for a different reason, the Content Host consume the wrong entitlement. For example, CH running on top of the hypervisor subscribed (by VDC) is consuming one (Physical or Virtual Node). That said, the customer would like to generate a report that should be able to present the complete and actual scenario.

Version-Release number of selected component (if applicable):
6.4

How reproducible:
100%

Steps to Reproduce:
1. Attach some entitlement to the Content Host and Hypervisors (virt-who-*)
2. Generate a report that should show this info.
3. Currently, there is the hammer call (hammer csv content-hosts) but this is not working on Satellite 6.3 or Satellite 6.4

Actual results:
No way to generate this report/information.

Expected results:
See the report with the information like below
"hypervisor_name,hypervisor_entitlement,content_host_name,content_host_entitlement"

Additional info:

Comment 6 Waldirio M Pinheiro 2019-01-09 22:19:13 UTC
*** Bug 1661333 has been marked as a duplicate of this bug. ***

Comment 7 Bryan Kearney 2019-01-10 13:37:05 UTC
This can be done with hammer csv. Keeping this bug around to ensure that we can do this with the reporting framework.

Comment 10 Marek Hulan 2019-09-24 04:55:59 UTC
Created redmine issue https://projects.theforeman.org/issues/27923 from this bug

Comment 15 Ondřej Pražák 2019-10-03 10:20:42 UTC
Connecting redmine issue https://projects.theforeman.org/issues/27995 from this bug

Comment 22 jcallaha 2019-12-11 16:42:07 UTC
Verified in Satellite 6.7 Snap 4.

The entitlements report template has been added to Satellite as of this snap.

The report generates correctly, with the following information.
          'Name': host.name,
          'Organization': host.organization,
          'Lifecycle Environment': host.lifecycle_environment,
          'Content View': host.content_view,
          'Host Collections': host.host_collections,
          'Virtual': host.virtual,
          'Guest of Host': host.hypervisor_host,
          'OS': host.operatingsystem,
          'Arch': host.architecture,
          'Sockets': host.sockets,
          'RAM': host.ram,
          'Cores': host.cores,
          'SLA': host_sla(host),
          'Products': host_products(host),
          'Subscription Name': sub_name(pool),
          'Subscription Type': pool.type,
          'Subscription Quantity': pool.quantity,
          'Subscription SKU': sub_sku(pool),
          'Subscription Contract': pool.contract_number,
          'Subscription Account': pool.account_number,
          'Subscription Start': pool.start_date,
          'Subscription End': pool.end_date,
          'Subscription Guest': registered_through(host)

See attached recording for verification.

Comment 30 errata-xmlrpc 2020-04-14 13:23:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454