Bug 1020423 - help message for attach --servicelevel should be changed to be in sync with other modules
help message for attach --servicelevel should be changed to be in sync with o...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jesus M. Rodriguez
John Sefler
:
Depends On:
Blocks: rhsm-rhel70
  Show dependency treegraph
 
Reported: 2013-10-17 12:00 EDT by Shwetha Kallesh
Modified: 2014-06-17 20:27 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:26:43 EDT
Type: Bug
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 Shwetha Kallesh 2013-10-17 12:00:09 EDT
Description of problem:
help message for attach --servicelevel should be changed to be in sync with other modules

Version-Release number of selected component (if applicable):
[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.29-1
subscription-manager: 1.10.3-1.git.3.d610508.el7
python-rhsm: 1.10.3-1.git.0.6ac2883.el7


How reproducible:


Steps to Reproduce:
1.[root@localhost ~]# subscription-manager attach --help | grep 'servicelevel' -A1
  --servicelevel=SERVICE_LEVEL
                        service level to apply to this system

2.[root@localhost ~]# subscription-manager attach --pool 8ac6a3a241bae96a0141baea35901305 --servicelevel premium
Error: Must use --auto with --servicelevel.

3.

Actual results:
--servicelevel=SERVICE_LEVEL
                        service level to apply to this system


Expected results:

--servicelevel=SERVICE_LEVEL
                        service level to apply to this system, only used
                        with --auto


Additional info:
Comment 2 Shwetha Kallesh 2013-10-17 12:35:56 EDT
[root@localhost ~]# subscription-manager register --servicelevel premium --force
Error: Must use --auto-attach with --servicelevel.

Actual:

[root@localhost ~]# subscription-manager register --help | grep servicelevel -A1
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically

Expected: 

[root@localhost ~]# subscription-manager register --help | grep servicelevel -A1
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically, only used with --auto-attach


[root@localhost ~]# subscription-manager service-level --org=admin
Error: --org is only supported with the --list option

Actual:

[root@localhost ~]# subscription-manager service-level --help | grep org -A1
  --org=ORG_KEY         specify an organization when listing available service
                        levels using the organization key

Expected:

[root@localhost ~]# subscription-manager service-level --help | grep org -A1
  --org=ORG_KEY         specify an organization when listing available service
                        levels using the organization key, only used with --list
Comment 3 Jesus M. Rodriguez 2014-01-30 14:48:10 EST
PR posted

https://github.com/candlepin/subscription-manager/pull/889
Comment 4 Jesus M. Rodriguez 2014-01-30 16:28:21 EST
fixed by 02181b3ee4878e5c1475fd6acfaf71e076a2405d
Comment 6 Rehana 2014-02-04 11:15:17 EST
Retested,i see that only 2 out of 3 issues mentioned in the bug are fixed.

1. help for --servie-level ( as per bug description)

subscription-manager attach --help | grep 'servicelevel' -A1
  --servicelevel=SERVICE_LEVEL
                        service level to apply to this system, requires --auto

result:
Observed that now it displayed the usage details


2.help for service-level --org

 subscription-manager service-level --org=admin
Error: --org is only supported with the --list option

[root@hp-ml350egen8-01 ~]#  subscription-manager service-level --help | grep org -A1
  --org=ORG_KEY         specify an organization when listing available service
                        levels using the organization key, only used with
                        --list
result:
Observed that now it displayed the usage details

3.BUT the fix is not in for the regsiter --service-level help

[root@hp-ml350egen8-01 ~]# subscription-manager register --servicelevel premium --force
Error: Must use --auto-attach with --servicelevel.

Actual results:
--------------
[root@hp-ml350egen8-01 ~]# 
[root@hp-ml350egen8-01 ~]# subscription-manager register --help | grep servicelevel -A1
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically,

here the usage help text is missing

Expected result:
# subscription-manager register --help | grep servicelevel -A1
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically, only used with --auto-attach

tested version:
subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.13-1.el7
python-rhsm: 1.10.12-1.el7


Hence Moving this bug to New
Comment 7 Jesus M. Rodriguez 2014-02-07 11:14:01 EST
Try using -A2 on your grep command. The help line is wrapping.

Using -A1 fails as you state:


# subscription-manager register --help | grep servicelevel -A1
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically,

but using -A2 you see the rest of the line.

# subscription-manager register --help | grep servicelevel -A2
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically,
                        requires --auto-attach
Comment 8 Sharath Dwaral 2014-02-07 12:29:23 EST
Version:

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.13-1.el7
python-rhsm: 1.10.12-1.el7


Verification:

# subscription-manager attach --help | grep 'servicelevel' -A3
  --servicelevel=SERVICE_LEVEL
                        service level to apply to this system, requires --auto

# subscription-manager attach --pool 8ac6a3a241bae96a0141baea35901305 --servicelevel premium
Error: Must use --auto with --servicelevel.

# subscription-manager register --help | grep servicelevel -A3
  --servicelevel=SERVICE_LEVEL
                        system preference used when subscribing automatically,
                        requires --auto-attach

# subscription-manager service-level --org=admin
Error: --org is only supported with the --list option

#  subscription-manager service-level --help | grep org -A3
  --org=ORG_KEY         specify an organization when listing available service
                        levels using the organization key, only used with
                        --list

VERIFIED
Comment 9 Ludek Smid 2014-06-13 05:26:43 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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