Bug 1008557

Summary: [RFE] CLI list --available should include a "Quantity Needed" field to facilitate compliance and provide parity with GUI
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.5CC: bkearney, ckozak, fsharath, jesusr, mreid
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
Updates of subscription-manager list Among the list of available subscription, the output of the subscription-manager list --available command now contains a new field, Provides. This field shows the names of the products that the system is eligible for. In addition, a new field, Suggested, has been added to facilitate compliance and provide parity with the graphical user interface (GUI). (BZ#996993, BZ#1008557)
Story Points: ---
Clone Of:
: 1088372 (view as bug list) Environment:
Last Closed: 2013-11-21 21:29:21 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:
Bug Depends On:    
Bug Blocks: 862910, 1088372    

Description John Sefler 2013-09-16 15:11:47 UTC
Description of problem:
With the introduction of instance based subscription pools as well as core, ram, and socket based subscriptions, attaching a subscription from the CLI is frequently leaving the CLI consumer partially subscribed.  This is because a quantity of 1 is used by default when the CLI consumer does not explicitly specify a quantity.  Moreover, it is increasingly more complicated to know what quantity is needed.

The subscription-manager GUI quantity spinners already provide the user with a suggested quantity needed to achieve compliance.  It would be good to have the CLI list --available report also provide a suggested quantity.

Taking this one step farther, it would also be helpful for the candlepin server to automatically give a CLI consumer the quantity needed to achieve compliance when the --quantity option is not explicitly specified by the CLI consumer.  However, this functionality would be a candlepin RFE Bugzilla.

Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.9.6-1.el6.x86_64


Steps to Reproduce:
[root@jsefler-6 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Instance Based (Standard Support)
SKU:               awesomeos-instancebased
Pool ID:           8a9086d340d0ae7d0140d0afe443051d
Available:         20
Quantity Needed:   4    <============== NEW FIELD REQUESTED
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              08/29/2014
System Type:       Physical



Additional info:
Including mreid on this bug to help with the verbage of this new field.  Here are some possibilities:

  Suggested Quantity:
  Quantity Suggested:
  Suggested:
  Quantity Needed:
  Needed Quantity:
  Needed:
  Required Quantity:
  Quantity Required:
  Required:

Comment 1 Carter Kozak 2013-09-16 15:13:00 UTC
commit 411764095e1f3468381b0b27448e849876f0da66
Author: ckozak <ckozak>
Date:   Fri Sep 13 17:30:05 2013 -0400

    suggested quantity in list available

Comment 4 Sharath Dwaral 2013-10-08 00:23:23 UTC
Version:

Tested on stage

# subscription-manager version 
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.9.9-1.el6
python-rhsm: 1.9.6-1.el6

# subscription-manager list --available 
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
                   Red Hat Software Collections Beta (for RHEL Server)
SKU:               RH0103708
Pool ID:           8a99f983417b061b01417f426a3a7eb5
Available:         1000
Suggested:         1    <<=============  NEW ITEM
Service Level:     PREMIUM
Service Type:      L1-L3
Multi-Entitlement: No
Ends:              07/24/2014
System Type:       Physical


VERIFIED

Comment 5 errata-xmlrpc 2013-11-21 21:29:21 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.

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