Bug 800530

Summary: RFE: As a sysadmin I would like to manage a user's org from the CLI
Product: [Retired] Subscription Asset Manager Reporter: Eric Sammons <esammons>
Component: katelloAssignee: Tom McKay <tomckay>
Status: CLOSED CURRENTRELEASE QA Contact: SAM QE List <sam-qe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0.0CC: bkearney, jomara, tkolhar
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: 1.X   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 800529 Environment:
katello-headpin-all-0.1.141-1.el6.noarch katello-cli-headpin-0.1.15-2.el6.noarch
Last Closed: 2012-08-22 13:25:06 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: 800529    
Bug Blocks: 803375    

Description Eric Sammons 2012-03-06 16:37:05 UTC
+++ This bug was initially created as a clone of Bug #800529 +++

Description of problem:
Currently the headpin and katello Command Line Interfaces do not appear to support setting or listing a user's default organization / environment via the user command.

headpin> user info --username=testuser
--------------------------------------------------------------------------------
                                User Information
--------------------------------------------------------------------------------

Id:       16
Username: testuser
Email:    testuser
Disabled: False


headpin> user create --help
Usage: headpin [options]

Options:
  -h, --help           show this help message and exit
  -g                   grep friendly output
  -v                   verbose, more structured output
  -d DELIMITER         grep friendly output column delimiter
  --username=USERNAME  user name (required)
  --password=PASSWORD  initial password (required)
  --email=EMAIL        email (required)
  --disabled=DISABLED  disabled account (default is 'false')

Comment 2 Tazim Kolhar 2012-04-30 08:12:05 UTC
VERIFIED with the latest build :

[root@tyan-gt24-12 ~]# rpm -qa | grep katello
katello-configure-0.3.1-2.el6_2.noarch
katello-selinux-0.1.10-1.el6.noarch
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-upgrade-0.3.1-2.el6_2.noarch
katello-cli-common-0.3.1-1.el6_2.noarch
katello-glue-candlepin-0.3.0-2.el6_2.noarch
katello-certs-tools-1.0.6-1.el6.noarch
katello-headpin-0.2.4-3.el6_2.noarch
katello-common-0.3.0-2.el6_2.noarch
katello-headpin-all-0.2.4-3.el6_2.noarch


[root@tyan-gt24-12 ~]# headpin -u admin -p admin user info --username admin
------------------------------------------------------------------------------
                              User Information
------------------------------------------------------------------------------

Id:                   1
Username:             admin
Email:                root@localhost
Disabled:             False
Default Organization: ACME_Corporation
Default Environment:  DEV

Comment 3 Tazim Kolhar 2012-04-30 08:13:10 UTC
[root@tyan-gt24-12 ~]# headpin -u admin -p admin user create --help
Usage: headpin [options]

Options:
  -h, --help            show this help message and exit
  -g                    grep friendly output
  -v                    verbose, more structured output
  -d DELIMITER          column delimiter in grep friendly output, works only
                        with option -g
  --username=USERNAME   user name (required)
  --password=PASSWORD   initial password (required)
  --email=EMAIL         email (required)
  --disabled=DISABLED   disabled account (default is 'false')
  --default_organization=DEFAULT_ORGANIZATION
                        user's default organization name
  --default_environment=DEFAULT_ENVIRONMENT
                        user's default environment name