Bug 727092 - [RFE]: Enhance subscription-manager to prompt the user for an Org Name.
Summary: [RFE]: Enhance subscription-manager to prompt the user for an Org Name.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: 5.10
Assignee: Alex Wood
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510 871581 rhsm-2013
TreeView+ depends on / blocked
 
Reported: 2011-08-01 10:08 UTC by Shwetha Kallesh
Modified: 2013-10-01 13:50 UTC (History)
6 users (show)

Fixed In Version: 1.8.2
Doc Type: Release Note
Doc Text:
When used against Subscription Asset Manager or Red Hat Network Satellite, Subscription Manager does not prompt the user for the Organization if it is required to complete registration.
Clone Of:
Environment:
Last Closed: 2013-10-01 13:50:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shwetha Kallesh 2011-08-01 10:08:55 UTC
Description of problem:
subscription-manager register  and subscription-manager register --autosubscribefails saying "You must specify an organization/owner for new consumers."


Version-Release number of selected component (if applicable):

subscription-manager-firstboot-0.96.4-1.git.70.a18d152.el6.x86_64
subscription-manager-gnome-0.96.4-1.git.70.a18d152.el6.x86_64
subscription-manager-0.96.4-1.git.70.a18d152.el6.x86_64


How reproducible:
Steps to Reproduce:
1.subscription-manager register
2.Username: testuser1
Password: 

3.
  
Actual results:
You must specify an organization/owner for new consumers.


Expected results:
It should ask for the owner/org and then get registered

Additional info:

Comment 2 Bryan Kearney 2011-08-01 12:26:06 UTC
Moving this to a 5.8 RFE.

Comment 6 RHEL Program Management 2012-07-10 08:49:22 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 7 RHEL Program Management 2012-07-11 02:07:35 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 8 Tom Lavigne 2012-09-07 15:19:21 UTC
This request was evaluated by Red Hat Product Management for 
inclusion in the current release of Red Hat Enterprise Linux.
Since we are unable to provide this feature at this time,  
it has been proposed for the next release of 
Red Hat Enterprise Linux.

Comment 9 Matt Reid 2012-09-28 19:35:49 UTC
It would be great if we could prompt interactively for org when needed. Right now if I type "# subscription-manager register", enter in my username and then my password, I get booted out with "You must specify an organization for new consumers."

Since we prompt for username and password if they don't specify, if they need an org, could we display the list of available orgs as a numbered list in the terminal and let them enter 1/2/3/etc to select an org? 

For Example:
# subscription-manager register
Username: admin
Password:

Select an Organization:
1. Snow White (snowwhite)
2. Donald Duck (donaldduck)
3. Admin Owner (admin)

Enter the number of your desired org: 1
The system has been registered with id: blah-blah-blah
#

Current process is not ideal, and the current string doesn't mention that they can check orgs with subscription-manager orgs or that they can manually specify one with register --org.

Is it possible to prompt interactively for org during registration through cli?

Comment 10 Matt Reid 2012-10-25 17:45:43 UTC
Once we figure this out, it should also be used for "subscription-manager environments".

Current Functionality:
# subscription-manager environments
Error: This command requires that you specify an organization with --org
# subscription-manager environments --org=ACME_Corporation
Username: admin
Password:
ENVIRONMENT INFO OUTPUT

Desired Functionality:
# subscription-manager environments
Username:
Password:

Select an Organization:
1. Snow White (snowwhite)
2. Donald Duck (donaldduck)
3. Admin Owner (admin)

Enter the number of your desired org: 1
ENVIRONMENT INFO OUTPUT


I can file a bz separately if desired.

Comment 11 Matt Reid 2012-12-13 19:48:54 UTC
At this point, we're just going to implement a prompt like asking for their username/password, as comment 1 describes, for when users are trying to register through the CLI. 

Down the road, we may want to investigate making it org key/name agnostic, as I think that can be a point of confusion.

Comment 13 Alex Wood 2012-12-14 15:33:46 UTC
commit bfe381405afcb0e7d748a52923b49b307a8e4c97
Author: Alex Wood <awood>
Date:   Wed Dec 12 11:03:56 2012 -0500

    727092: Read in the org key during registration if none is given.

commit b6f4324f6e3b6a04aaf65c6e879bbd92c94f2442
Author: Alex Wood <awood>
Date:   Thu Dec 13 16:44:52 2012 -0500

    Ask for the org in environments and service-level modules.

The register, service-level, and environments modules should all now ask for an organization if necessary.  Note that in the service-level module, an org is only required when performing a list when the client is unregistered.

Comment 14 Bryan Kearney 2013-02-08 17:18:37 UTC
Fixed in the 1.8.2 version of subscription-manager or python-rhsm

Comment 15 Sharath Dwaral 2013-02-20 20:35:23 UTC
# rpm -qa | egrep "subscription-manager|python-rhsm"
python-rhsm-1.8.3-1.el7.x86_64
subscription-manager-gui-1.8.3-1.el7.x86_64
subscription-manager-migration-1.8.3-1.el7.x86_64
subscription-manager-debuginfo-1.8.3-1.el7.x86_64
subscription-manager-1.8.3-1.el7.x86_64
subscription-manager-firstboot-1.8.3-1.el7.x86_64
python-rhsm-debuginfo-1.8.3-1.el7.x86_64


# subscription-manager register
Username: testuser1
Password: 
Organization: snowwhite
The system has been registered with id: 5e2a70e1-16d7-4b2f-b4d9-548a5f0838b8 

VERIFIED

Comment 16 Sharath Dwaral 2013-02-28 00:00:42 UTC
# subscription-manager register --autosubscribe
Username: testuser1
Password: 
Organization: snowwhite
The system has been registered with id: 89d07c23-c19a-4811-b0d1-757b9550142c 
Installed Product Current Status:
Product Name: Awesome OS for S390 Bits
Status:       Not Subscribed

Product Name: Stackable with Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS Developer Basic
Status:       Not Subscribed

Product Name: Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits
Status:       Subscribed

Product Name: Awesome OS Workstation Bits
Status:       Subscribed

Product Name: Red Hat Enterprise Linux Server
Status:       Not Subscribed

Product Name: Awesome OS Developer Bits
Status:       Not Subscribed

Product Name: Management Bits
Status:       Subscribed

Product Name: Large File Support Bits
Status:       Subscribed

Product Name: Awesome OS Modifier Bits
Status:       Subscribed

Product Name: Clustering Bits
Status:       Subscribed

Product Name: Shared Storage Bits
Status:       Subscribed

Product Name: Awesome OS Server Bits
Status:       Subscribed

Product Name: Awesome OS Premium Architecture Bits
Status:       Not Subscribed

Product Name: Awesome OS for ia64 Bits
Status:       Not Subscribed

Product Name: Awesome OS for i686 Bits
Status:       Not Subscribed

Product Name: Awesome OS for x86_64 Bits
Status:       Subscribed

Product Name: Awesome OS for ppc64 Bits
Status:       Not Subscribed

Product Name: Awesome OS for S390X Bits
Status:       Not Subscribed

Product Name: Awesome OS for i386 Bits
Status:       Not Subscribed

Product Name: Awesome OS for x86 Bits
Status:       Not Subscribed

Product Name: Shared File System Bits
Status:       Subscribed

Product Name: Multiplier Product Bits
Status:       Not Subscribed

Product Name: RAM Limiting Product
Status:       Not Subscribed

Product Name: Load Balancing Bits
Status:       Subscribed


VERIFIED for --autosubscribe option as well


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