Bug 696676 - pulp-admin auth login should use --username/passowrd from pulp-admin command
Summary: pulp-admin auth login should use --username/passowrd from pulp-admin command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: Sprint 23
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-04-14 15:33 UTC by Pradeep Kilambi
Modified: 2014-03-31 01:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:06:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Pradeep Kilambi 2011-04-14 15:33:11 UTC
Description of problem:

Our auth login module has a --username and --password options. But so does our pulp-admin command.

$ sudo pulp-admin --help
Usage: pulp-admin <options> <command>
<snip>
Options:
  -h, --help            show this help message and exit

  Pulp User Account Credentials:
    -u USERNAME, --username=USERNAME
                        account username
    -p PASSWORD, --password=PASSWORD
                        account password

  Pulp Server Information:
    --host=HOST         pulp server host name (default: localhost.localdomain)
</snip>

$ sudo pulp-admin auth login --help

Usage: pulp-admin <options> auth login <options>

Options:
  -h, --help            show this help message and exit
  -u USERNAME, --username=USERNAME
                        pulp account username
  -p PASSWORD, --password=PASSWORD
                        pulp account password


Ideally since the -u/-p on pulp-admin command is common to all commands; auth login should just use those instead of having its own --username/--password options.

So this is expected to work:

pulp-admin -u admin -p admin auth login

vs

pulp-admin -u admin -p admin auth login --username admin -password admin

Comment 1 Jason Connor 2011-05-11 23:53:49 UTC
The pulp-admin auth login command has been fixed to use either of the following:
pulp-admin -u <user> -p <password> auth login
pulp-admin auth login -u <user> -p <password>

Fix pushed in: 749069bfdd5ad60d7b3f48791edfe920b82613ef

Comment 2 Jeff Ortel 2011-05-12 18:45:38 UTC
build: 0.176

Comment 3 Preethi Thomas 2011-05-25 13:46:04 UTC
verified

[root@preethi ~]# pulp-admin -u admin -p admin auth login
User credentials successfully stored at [/root/.pulp]

[root@preethi ~]# pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	f15                      
Name               	f15                      
Feed URL           	http://download.devel.redhat.com/released/F-15/Beta/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R2/2011-05-24T22:00:00-04:00/P1D
Packages           	2937                     
Files              	0                        
Distributions      	ks-f15-noarch            
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       


Id                 	f14                      
Name               	f14                      
Feed URL           	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R10/2011-05-25T02:00:00-04:00/PT1H
Packages           	2766                     
Files              	0                        
Distributions      	ks-f14-noarch            
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       


[root@preethi ~]# pulp-admin auth logout
User credentials removed from [/root/.pulp]

[root@preethi ~]# pulp-admin repo list
error: operation failed: No valid authorization credentials found, please see: pulp-admin --help
[root@preethi ~]# pulp-admin auth login -u admin -p admin
User credentials successfully stored at [/root/.pulp]

[root@preethi ~]# pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	f15                      
Name               	f15                      
Feed URL           	http://download.devel.redhat.com/released/F-15/Beta/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R2/2011-05-24T22:00:00-04:00/P1D
Packages           	2937                     
Files              	0                        
Distributions      	ks-f15-noarch            
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       


Id                 	f14                      
Name               	f14                      
Feed URL           	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R10/2011-05-25T02:00:00-04:00/PT1H
Packages           	2766                     
Files              	0                        
Distributions      	ks-f14-noarch            
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       




[root@preethi ~]# pulp-admin auth logout
User credentials removed from [/root/.pulp]

[root@preethi ~]# pulp-admin repo list
error: operation failed: No valid authorization credentials found, please see: pulp-admin --help
[root@preethi ~]# pulp-admin auth login --username admin -password admin
error: operation failed: Invalid username or password
[root@preethi ~]# pulp-admin auth login --username admin --password admin
User credentials successfully stored at [/root/.pulp]

[root@preethi ~]# pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	f15                      
Name               	f15                      
Feed URL           	http://download.devel.redhat.com/released/F-15/Beta/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R2/2011-05-24T22:00:00-04:00/P1D
Packages           	2937                     
Files              	0                        
Distributions      	ks-f15-noarch            
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       


Id                 	f14                      
Name               	f14                      
Feed URL           	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R10/2011-05-25T02:00:00-04:00/PT1H
Packages           	2766                     
Files              	0                        
Distributions      	ks-f14-noarch            
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}

Comment 4 Preethi Thomas 2011-08-16 12:06:37 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:20:39 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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