Bug 1011234 - subscription-manager list --avail should catch nil service-levels and report the absense of a service-level rather than "None"
subscription-manager list --avail should catch nil service-levels and report ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Carter Kozak
John Sefler
:
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-09-23 16:38 EDT by John Sefler
Modified: 2013-11-21 16:30 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Consequence: When there is no service level, the user sees the word, None. Fix: Display an empty string when there is no service level. Result:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 16:30:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2013-09-23 16:38:34 EDT
Description of problem:
Looks like a python null value is being reported as "None" in the Service Level field reported by subscription-manager list --available.  Because "None" can also be regarded as a valid service level, subscription-manager should report an empty string for subscription pools whose Service Level has not been set.  This is a regression.

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


How reproducible:


Steps to Reproduce:
Using the candlepin TESTDATA...

[root@jsefler-6 ~]# subscription-manager list --avail | grep awesomeos-all-no-86_64-cont -B1 -A9
Subscription Name: Awesome OS for All Arch (excpt for x86_64 content)
SKU:               awesomeos-all-no-86_64-cont
Pool ID:           8a9086d3414bd57701414bd724570609
Available:         8
Suggested:         2
Service Level:     None           <============== WRONG (SHOULD BE BLANK)
Service Type:      
Multi-Entitlement: Yes
Ends:              09/22/2014
System Type:       Physical

[root@jsefler-6 ~]# subscription-manager attach --pool 8a9086d3414bd57701414bd724570609
Successfully attached a subscription for: Awesome OS for All Arch (excpt for x86_64 content)
[root@jsefler-6 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS for All Arch (excpt for x86_64 content)
Provides:          Awesome OS for All Arch (excpt for x86_64 content) Bits
SKU:               awesomeos-all-no-86_64-cont
Contract:          85
Account:           12331131231
Serial:            8472276835796622586
Pool ID:           8a9086d3414bd57701414bd724570609
Active:            True
Quantity Used:     2
Service Level:                     <============== CORRECT
Service Type:      
Status Details:    
Starts:            09/22/2013
Ends:              09/22/2014

[root@jsefler-6 ~]#
Comment 1 Carter Kozak 2013-09-23 16:49:45 EDT
commit 93708d265dda982dd583adacfdbebfb1ffc2b869
Author: ckozak <ckozak@redhat.com>
Date:   Mon Sep 23 16:44:42 2013 -0400

    1011234: no service level displays empty string
Comment 4 John Sefler 2013-10-03 17:48:14 EDT
Verifying Version using a candlepin server loaded with TESTDATA...

[root@jsefler-6 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.28-1
subscription-manager: 1.9.8-1.el6
python-rhsm: 1.9.6-1.el6

[root@jsefler-6 ~]# subscription-manager list --avail | grep awesomeos-all-no-86_64-cont -B1 -A9
Provides:          Awesome OS for All Arch (excpt for x86_64 content) Bits
SKU:               awesomeos-all-no-86_64-cont
Pool ID:           8a9087404175311a01417531e93b0f20
Available:         5
Suggested:         2
Service Level:                       <============== VERIFIED
Service Type:      
Multi-Entitlement: Yes
Ends:              09/30/2014
System Type:       Physical

[root@jsefler-6 ~]# subscription-manager list --avail | grep Service
Service Level:     Premium
Service Type:      Level 3
Service Level:     Super
Service Type:      Level 3
Service Level:     Premium
Service Type:      Level 3
Service Level:     Super
Service Type:      Level 3
Service Level:     Super
Service Type:      Level 3
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     Premium
Service Type:      Level 3
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     Premium
Service Type:      Level 3
Service Level:     Premium
Service Type:      Level 3
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     Layered
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     
Service Type:      
Service Level:     Standard
Service Type:      L1-L3
Service Level:     None
Service Type:      Self-Support
Service Level:     Standard
Service Type:      L1-L3
Service Level:     Standard
Service Type:      L1-L3
Service Level:     None
Service Type:      Self-Support
Service Level:     None
Service Type:      Self-Support
Service Level:     None
Service Type:      Self-Support
Service Level:     Premium
Service Type:      Level 3
Service Level:     Standard
Service Type:      L1-L3
Service Level:     None
Service Type:      Self-Support
Service Level:     
Service Type:      
[root@jsefler-6 ~]# 

VERIFIED: Notice in the grep above that subscriptions with a null/nil/None Service Level are being reported with a blank value while subscriptions with a "None" value are actually being reported as "None".

This regression bug has been fixed.
Comment 5 errata-xmlrpc 2013-11-21 16:30:03 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-1659.html

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