Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1666693

Summary: Command "hammer subscription list" is not correctly showing the comment "Guests of " in the "Type" field in the output.
Product: Red Hat Satellite Reporter: Gauravi <gapatil>
Component: Subscription ManagementAssignee: Andrew Kofink <akofink>
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: apatel, dhlavacd, kgaikwad, ltran, mbacovsk, mhulan, mshira, rabajaj, tbrisker
Target Milestone: 6.8.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:58:15 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 Gauravi 2019-01-16 11:32:32 UTC
Description of problem:
Command "hammer subscription list" is not correctly showing the comment "Guests of ..." in the "Type" field in the output for VDC subscription.

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

How reproducible:
Always

Steps to Reproduce:
1. Have hypervisor subscribed to the Red Hat Satellite server
2. List the subscriptions: # hammer -d subscription list --organization organization_name
3. Check the column "Type" of the output, it will not show the type as Guests of <hypervisor>"

Actual results:
Type is : Virtual

Expected results:
Type would be : Guests of <Hypervisor>

Additional info:

Comment 3 Gauravi 2019-01-21 12:15:19 UTC
Output from my test systems:

Before:

# hammer -d subscription list --organization redhat
----|----------------------------------|----------------------------------------------------------------------------------|----------|----------|---------|--------------|---------------------|-----------|---------
ID  | UUID                             | NAME                                                                             | TYPE     | CONTRACT | ACCOUNT | SUPPORT      | END DATE            | QUANTITY  | CONSUMED
----|----------------------------------|----------------------------------------------------------------------------------|----------|----------|---------|--------------|---------------------|-----------|---------     
100 | 4028fb836856094a0168563fefcf1117 | Red Hat Enterprise Linux for Virtual Datacenters with Smart Management, Standard | Virtual  | 11111111 | 123456  | Standard     | 2021/12/31 23:59:59 | Unlimited | 0   

----|----------------------------------|----------------------------------------------------------------------------------|----------------------------------------------------------|----------|---------|------------

After: Adding below lines in the file - /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.13.4.3/lib/hammer_cli_katello/subscription.rb at line #36 & #37 as per https://github.com/Katello/hammer-cli-katello/pull/614/files
   __________________________________________________________
        elsif data["hypervisor"]
          _("Guests of %s" % data['hypervisor']['name'])
   __________________________________________________________

# hammer -d subscription list --organization redhat
----|----------------------------------|----------------------------------------------------------------------------------|----------|----------|---------|--------------|---------------------|-----------|---------
ID  | UUID                             | NAME                                                                             | TYPE     | CONTRACT | ACCOUNT | SUPPORT      | END DATE            | QUANTITY  | CONSUMED
----|----------------------------------|----------------------------------------------------------------------------------|----------|----------|---------|--------------|---------------------|-----------|--------- 
100 | 4028fb836856094a0168563fefcf1117 | Red Hat Enterprise Linux for Virtual Datacenters with Smart Management, Standard | Guests of virt-who-example.redhat.com-1 | 11111111 | 123456  | Standard     | 2021/12/31 23:59:59 | Unlimited | 0

Comment 7 Tasos Papaioannou 2020-09-28 20:34:43 UTC
Verified on 6.8.0_17.0:

1.) Register and subscribe a VM running under VMWare ESX / vCenter.
2.) Enable virt-who on the VM, verify that the hypervisor is reported as a content host on the Satellite, and attach the subscription to it.
3.) Verify that 'hammer subscription list' shows the expected info under the 'type' column:

# hammer subscription list
---|----------------------------------|-------------------------------------------------------------------------|------------------------------------------------------------------|----------|---------|--------------|---------------------|---------------------|-----------|---------
ID | UUID                             | NAME                                                                    | TYPE                                                             | CONTRACT | ACCOUNT | SUPPORT      | START DATE          | END DATE            | QUANTITY  | CONSUMED
---|----------------------------------|-------------------------------------------------------------------------|------------------------------------------------------------------|----------|---------|--------------|---------------------|---------------------|-----------|---------
42 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | Red Hat Enterprise Linux for Virtual Datacenters, Premium               | Guests of virt-who-esx-host.example.com-1 | xxxxx | xxxxx | Premium      | 2020/04/03 04:00:00 | 2021/04/03 03:59:59 | Unlimited | 1

Comment 10 errata-xmlrpc 2020-10-27 12:58:15 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 (Important: Satellite 6.8 release), 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:4366