Bug 876340

Summary: String Update: Update option in register module from '--autoattach' to '--auto-attach'
Product: Red Hat Enterprise Linux 6 Reporter: Matt Reid <mreid>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: bkearney, jsefler
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:00:35 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: 771481, 840993    

Description Matt Reid 2012-11-13 21:39:14 UTC
Description of problem:

Adding the hyphen to our option here allows us to stay consistent with our hyphenation throughout the gui and cli, as some strings directly reference the option (which when it was --autosubscribe, was also not hyphenated) and led us to flip between hyphenating and not hyphenating.

It would be awesome if we could update '--autoattach' to be '--auto-attach'.

Also, is it possible to still have --auto work here since they're really the same command? I get an 'ambiguous option message' when I try that now, since it wants me to pick between --autosubscribe and --autoattach. Not sure if there's anything fancy we can do there, like give precedence to --auto-attach, or have a hidden alias for --auto or something?

Version-Release number of selected component (if applicable):
subscription-manager-1.1.7-1

Additional info:
subscription-manager: error: ambiguous option: --auto (--autoattach, --autosubscribe?)

Comment 2 Bryan Kearney 2012-11-16 15:16:33 UTC
commit dd95b5f11db1d63fe4f4cdcec9a5719f199c59e4
Author: Bryan Kearney <bkearney>
Date:   Thu Nov 15 16:29:51 2012 -0500

    876340: Move the last of the commands and help string to --auto-attach
    
    Most of these were already done by prior bugs. This was more clean up.

Comment 5 John Sefler 2012-12-10 21:03:00 UTC
Verifying version...

[root@jsefler-6 ~]# rpm -q subscription-manager subscription-manager-migration
subscription-manager-1.1.11-1.el6.x86_64
subscription-manager-migration-1.1.11-1.el6.x86_64


[root@jsefler-6 ~]# rhn-migrate-classic-to-rhsm --help
Usage: rhn-migrate-classic-to-rhsm [OPTIONS]

Options:
  -f, --force           ignore channels not available on RHSM
  -g, --gui             launch the GUI tool to attach subscriptions, instead
                        of auto-attaching
  -n, --no-auto         don't execute the auto-attach option while registering
                        with subscription manager
  -s SERVICELEVEL, --servicelevel=SERVICELEVEL
                        service level to follow when attaching subscriptions,
                        for no service level use --servicelevel=""
  --serverurl=SERVERURL
                        specify the subscription management server to migrate
                        to
  -h, --help            show this help message and exit

VERIFIED comment2 fixed the descriptions for -g and -n above

Also....
[root@jsefler-6 ~]# subscription-manager register --help | grep -- --auto
  --autosubscribe       Deprecated, see --auto-attach
  --auto-attach         automatically attach this system to

^^^ VERIFIED that both --autosubscribe and --auto-attach are register options

Moving this bugzilla to VERIFIED.



Additional Info...
[root@jsefler-6 ~]# subscription-manager register --auto
Usage: subscription-manager register [OPTIONS]

subscription-manager: error: ambiguous option: --auto (--auto-attach, --autosubscribe?)

^^^ To my knowledge, using the "--auto" option abreviation will always be blocked by the python parser who is nice enough to complete the option when possible.  The ambiguity error will not get changed.

Comment 7 errata-xmlrpc 2013-02-21 09:00:35 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-0350.html