Bug 801187 - collapse list of provided products for subscription-manager list --consumed
collapse list of provided products for subscription-manager list --consumed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.8
Unspecified Unspecified
medium Severity medium
: rc
: 5.9
Assigned To: Bryan Kearney
Entitlement Bugs
:
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-03-07 16:15 EST by Chris Duryee
Modified: 2013-01-10 05:59 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:49:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Duryee 2012-03-07 16:15:47 EST
Description of problem:

While debugging an unrelated issue for #800798, we had a difficult time determining which products matched up with which entitlements on a system. We were using "subscription-manager list --consumed", which lists all products consumed. This can be problematic for entitlements with multiple provided products; the user has to ensure that the contract number and serial number match up for each entry in the list.

It would be more helpful if multiple entries for provided products were collapsed like so:

[root@72162 ~]# subscription-manager  list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


ProductName:         Red Hat Enterprise Linux Server
Provides:            Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
Provides:            Red Hat Enterprise Linux Load Balancer (for RHEL Server)
Provides:            Red Hat Enterprise Linux High Availability (for RHEL Server)
ContractNumber:      2635105
AccountNumber:       1508153
SerialNumber:        3690836645444544505
Active:              True
QuantityUsed:        1
Begins:              11/21/2011
Expires:             11/21/2012
Comment 1 Chris Duryee 2012-03-13 15:56:23 EDT
jsefler counterproposal:

ProductName:         Red Hat Enterprise Linux Server
Provides:            Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL Server)
ContractNumber:      2635105
AccountNumber:       1508153
SerialNumber:        3690836645444544505
Active:              True
QuantityUsed:        1
Begins:              11/21/2011
Expires:             11/21/2012
Comment 2 Chris Duryee 2012-03-13 16:19:50 EDT
sorry, I moved the component by mistake. Fixing now.
Comment 3 James Bowes 2012-05-25 08:56:48 EDT
Oops, I also moved the component by mistake :(
Comment 4 James Bowes 2012-05-29 11:26:45 EDT
Fixed in 1.0.2, 3aac156
Comment 5 Sharath Dwaral 2012-06-18 10:37:13 EDT
Problem description : 

Multiple entries for provided products were not collapsed

How to reproduce:

RHEL 5.9 Server
# rpm -qa | grep subscription-manager
subscription-manager-gui-1.0.3-1.git.44.dec01b0.el5
subscription-manager-migration-data-1.11.1.1-1.git.2.c7fbafe.el5
subscription-manager-1.0.3-1.git.44.dec01b0.el5
subscription-manager-firstboot-1.0.3-1.git.44.dec01b0.el5
subscription-manager-migration-1.0.3-1.git.44.dec01b0.el5

# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Product Subscriptions
+-------------------------------------------+

Subscription Name:    	Awesome OS Server Bundled
Provides:             	Load Balancing Bits
                      	Clustering Bits
                      	Awesome OS Server Bits
                      	Shared Storage Bits
                      	Management Bits
                      	Large File Support Bits
Contract:             	9
Account:              	12331131231
Serial Number:        	1870599011245303326
Active:               	True
Quantity Used:        	1
Service Level:        	Premium
Service Type:         	Level 3
Starts:               	06/13/2012
Ends:                 	06/13/2013

Actual Results:
As shown above

Expected Results:
As shown above

Multiple entries are collapsed and other signifcant issues are fixed.
Moving bug to Verified.
Comment 6 John Sefler 2012-07-05 13:00:27 EDT
Moving back to NEW to accomodate the following request....

WHEN A SUBSCRIPTION IS CONSUMED THAT DOES NOT PROVIDE ANY PRODUCTS, THE CURRENT IMPLEMENTATION IS TO HIDE THE Provides FIELD.  PLEASE DON'T DO THIS.  IT'S MORE INFORMATIVE TO THE USER TO EXPLICITLY LEAVE THE FIELD BLANK...

[root@jsefler-59server ~]# rpm -q subscription-manager
subscription-manager-1.0.8-1.git.0.1810c19.el5

[root@jsefler-59server ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Product Subscriptions
+-------------------------------------------+

Subscription Name:    	Management Add-On
Contract:             	120
Account:              	12331131231
Serial Number:        	4603991552222521593
Active:               	True
Quantity Used:        	1
Service Level:        	None
Service Type:         	None
Starts:               	06/02/2012
Ends:                 	08/02/2013


PREFERRED list --consumed:

Subscription Name:    	Management Add-On
Provides:
Contract:             	120
Account:              	12331131231
Serial Number:        	4603991552222521593
Active:               	True
Quantity Used:        	1
Service Level:        	None
Service Type:         	None
Starts:               	06/02/2012
Ends:                 	08/02/2013
Comment 7 James Bowes 2012-07-06 06:28:00 EDT
New output format is now in master, b51785
Comment 9 Sharath Dwaral 2012-07-09 12:05:04 EDT
Version:
# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-gui-1.0.8-1.git.14.dfc8438.el5
python-rhsm-1.0.3-1.git.0.583d26c.el5
subscription-manager-firstboot-1.0.8-1.git.14.dfc8438.el5
subscription-manager-1.0.8-1.git.14.dfc8438.el5
subscription-manager-migration-data-1.11.2.2-1.git.0.2eea155.el5
subscription-manager-migration-1.0.8-1.git.14.dfc8438.el5

Steps:
1. # subscription-manager register --org admin
Username: testuser1
Password: 
The system has been registered with id: 7f04f151-3082-413f-97d3-18719308f6fb 

2. # subscription-manager subscribe --pool 8a90f824386bfa3001386bfb068504eb
Successfully consumed a subscription for: Management Add-On

3. # subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Management Add-On
Provides:             	
SKU:                  	management-100
Contract:             	121
Account:              	12331131231
Serial Number:        	8966038966451671757
Active:               	True
Quantity Used:        	1
Service Level:        	None
Service Type:         	None
Starts:               	07/08/2012
Ends:                 	07/08/2013


Moving bug to VERIFIED
Comment 11 errata-xmlrpc 2013-01-07 22:49:12 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0033.html

Note You need to log in before you can comment on or make changes to this bug.