Bug 661130

Summary: register with --name is getting ignored when --type=person
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: bkearney
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: 2010-12-22 18:00:22 UTC Type: ---
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: 639436    

Description John Sefler 2010-12-07 21:05:50 UTC
Description of problem:
The --name option is ignored when registering with --type=person

Version-Release number of selected component (if applicable):
[root@jsefler-onprem01 ~]# rpm -q subscription-manager
subscription-manager-0.93.2-1.git.91.7f89664.fc14.x86_64


Steps to Reproduce:
[root@jsefler-onprem01 ~]# subscription-manager register --force --password=password --username=testuser1 --type=system --name=SYSTEM
fd69a677-5e0c-4bcb-8ec2-73fb3dc40c6a SYSTEM
[root@jsefler-onprem01 ~]# subscription-manager register --force --password=password --username=testuser1 --type=domain --name=DOMAIN
The system with UUID fd69a677-5e0c-4bcb-8ec2-73fb3dc40c6a has been unregistered
8ea3c836-8426-49ba-8423-87d970b505b5 DOMAIN
[root@jsefler-onprem01 ~]# subscription-manager register --force --password=password --username=testuser1 --type=candlepin --name=CANDLEPIN
The system with UUID 8ea3c836-8426-49ba-8423-87d970b505b5 has been unregistered
aaa53474-ade8-4b21-bc5c-102f6e948258 CANDLEPIN
[root@jsefler-onprem01 ~]# subscription-manager register --force --password=password --username=testuser1 --type=person --name=PERSON
The system with UUID aaa53474-ade8-4b21-bc5c-102f6e948258 has been unregistered
5849f32b-44a2-4f8b-ab2d-4f310e7b7459 testuser1
                                     ^^^^^^^^^
REGISTERING WITH --name works with all types except --type=person

[root@jsefler-onprem01 ~]# curl -k -u admin:admin -X GET https://jsefler-f12-candlepin.usersys.redhat.com:8443/candlepin/consumers/5849f32b-44a2-4f8b-ab2d-4f310e7b7459 2>/dev/null | grep \"name\"
  "name" : "testuser1",

THE REST API ALSO SHOWS THE NAME AS 'testuser1' WHEN IT SHOULD BE 'PERSON'

Comment 2 Bryan Kearney 2010-12-21 18:27:42 UTC
This is by design. We use the name to look up personal subscriptions.

Comment 3 John Sefler 2010-12-22 14:20:24 UTC
Since the register --name option is ignored by design when registering with --type=person, can we get some user feedback in stdout stating something like this:

The name option value will be ignored when registering as type person.


Note this feedback would only be seen if the cli register options included both --name and --type=person.

Moving back to ASSIGNED

Comment 4 Bryan Kearney 2010-12-22 16:06:44 UTC
The cli tool is more for machines. It is a nice to have for personal subscription. I would like to avoid unique business logic such as this in the cli. So, I will politely say "WONTFIX"

:)

Comment 5 John Sefler 2010-12-22 18:00:22 UTC
moving to CLOSED WONTFIX