Bug 980523 - it is impossible to modify default org for user with cli
it is impossible to modify default org for user with cli
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Tom McKay
Tazim Kolhar
:
Depends On:
Blocks: sam13-tracker 974961
  Show dependency treegraph
 
Reported: 2013-07-02 11:27 EDT by Vitaly Kuznetsov
Modified: 2016-04-25 20:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 07:01:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vitaly Kuznetsov 2013-07-02 11:27:45 EDT
Description of problem:

user has no default org:

[root@ec2-54-216-130-111 ~]# katello --path /sam -u admin -p admin user info --username admin
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                 User Information
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ID                   : 1
Username             : admin
Email                : root@localhost
Disabled             : False
Default Organization : None
Default Environment  : None
Default Locale       : None

Trying to set it up with cli:

[root@ec2-54-216-130-111 ~]# katello --path /sam -u admin -p admin user update --default_organization "Red Hat (Internal Use Only)" --username admin --default_environment "Library"
Successfully updated user [ admin ]

Looks like we succeeded. Checking...

[root@ec2-54-216-130-111 ~]# katello --path /sam -u admin -p admin user info --username admin
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                 User Information
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ID                   : 1
Username             : admin
Email                : root@localhost
Disabled             : False
Default Organization : None
Default Environment  : None
Default Locale       : None

Default Organization is still empty.

Version-Release number of selected component (if applicable):
katello-cli-1.4.2-8.el6sat
katello-headpin-1.4.2-17.el6sam_splice

How reproducible:
always

Steps to Reproduce:
1. Try modifying default org with cli

Actual results:
Default org is not modified

Expected results:
Default org is modified

Additional info:
Comment 1 Tom McKay 2013-07-02 11:41:37 EDT
This is likely working as intended behind the scenes since Headpin only has a single valid environment (Library). The options for default env should be hidden both in update and info.
Comment 2 Vitaly Kuznetsov 2013-07-03 05:07:47 EDT
(In reply to Tom McKay from comment #1)
> This is likely working as intended behind the scenes since Headpin only has
> a single valid environment (Library). The options for default env should be
> hidden both in update and info.

I'm interested in default org only. But when I try to set it without setting default env I got the following:

# katello --path /sam -u admin -p admin user update --default_organization "Red Hat (Internal Use Only)" --username admin
Usage:  katello <options> user update <options>

katello: error: Option --default_environment is required; please see --help
Comment 3 Tom McKay 2013-07-03 17:27:37 EDT
Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 4861578f8fc776b8cf0da295fad12f44925459a2
      https://github.com/Katello/katello/commit/4861578f8fc776b8cf0da295fad12f44925459a2
  Author: Tom McKay <thomasmckay@redhat.com>
  Date:   2013-07-03 (Wed, 03 Jul 2013)


Branch: refs/heads/master
  Home:   https://github.com/Katello/katello-cli
  Commit: fb524b44149290adbf159b316a707c7e48383e63
      https://github.com/Katello/katello-cli/commit/fb524b44149290adbf159b316a707c7e48383e63
  Author: Tom McKay <thomasmckay@redhat.com>
  Date:   2013-07-03 (Wed, 03 Jul 2013)
Comment 4 Bryan Kearney 2013-08-02 14:51:39 EDT
SNAP0 contains these bug fixes. Moving to ON_QA.
Comment 5 Tazim Kolhar 2013-08-06 03:55:01 EDT
VERIFIED :

# rpm -qa | grep katello
katello-selinux-1.4.4-2.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-common-1.4.3-5.el6sam_splice.noarch
katello-configure-1.4.4-2.el6sat.noarch
katello-cli-common-1.4.3-4.el6sat.noarch
katello-glue-elasticsearch-1.4.3-5.el6sam_splice.noarch
katello-headpin-all-1.4.3-5.el6sam_splice.noarch
katello-cli-1.4.3-4.el6sat.noarch
katello-glue-candlepin-1.4.3-5.el6sam_splice.noarch
signo-katello-0.0.10-2.el6sat.noarch
katello-headpin-1.4.3-5.el6sam_splice.noarch


# headpin --path /sam -u admin -p admin user info --username admin
--------------------------------------------------------------------------------
                                User Information
--------------------------------------------------------------------------------

ID                   : 1
Username             : admin
Email                : root@localhost
Disabled             : False
Default Organization : None
Default Environment  : None
Default Locale       : None

# headpin --path /sam -u admin -p admin user update --default_organization "test" --username admin
Successfully updated user [ admin ]

# headpin --path /sam -u admin -p admin user info --username admin
--------------------------------------------------------------------------------
                                User Information
--------------------------------------------------------------------------------

ID                   : 1
Username             : admin
Email                : root@localhost
Disabled             : False
Default Organization : test
Default Environment  : Library
Default Locale       : None
Comment 7 errata-xmlrpc 2013-10-01 07:01:10 EDT
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/RHEA-2013-1390.html

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