Bug 851160

Summary: default_locale is useless for "user <action>" cli calls
Product: Red Hat Satellite Reporter: Garik Khachikyan <gkhachik>
Component: katello-agentAssignee: Bryan Kearney <bkearney>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: mkoci, omaciel
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-23 15:01:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Garik Khachikyan 2012-08-23 11:44:49 UTC
Description of problem:
doing `user {create|update}` with specifying default_locale fails.

Version-Release number of selected component (if applicable):
pulp-common-1.1.12-1.el6.noarch
katello-common-1.0.6-1.el6.noarch
qpid-cpp-server-0.14-14.el6_2.x86_64
katello-selinux-1.1.0-1.git.18.d10e8a3.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.1.2-1.git.162.09c0162.el6.noarch
katello-repos-1.1.2-1.el6.noarch
katello-glue-foreman-1.0.6-1.el6.noarch
qpid-cpp-client-0.14-14.el6_2.x86_64
pulp-1.1.12-1.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-glue-candlepin-1.0.6-1.el6.noarch
qpid-cpp-server-ssl-0.14-14.el6_2.x86_64
candlepin-tomcat6-0.7.6.2-1.el6.noarch
pulp-selinux-server-1.1.12-1.el6.noarch
katello-configure-1.0.2-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-agent-1.1.0-1.git.22.d10e8a3.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
python-qpid-0.14-7.el6_2.noarch
candlepin-0.7.6.2-1.el6.noarch
katello-glue-pulp-1.0.6-1.el6.noarch
qpid-cpp-client-ssl-0.14-14.el6_2.x86_64
katello-1.0.6-1.el6.noarch
katello-certs-tools-1.1.8-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-1.1.2-1.git.162.09c0162.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. `user create --default_environment=dev --default_organization=ACME_Corporation --email=<your_email> --username=user1 --password=<password> --default_locale ru`
2. OR
3. `user update --username <existing_one> --default_locale es`
  
Actual results:
(1)
Wrong/Invalid parameters sent for api/users/create.
 Wrong Parameters: 
["default_locale"]

(2)
Wrong/Invalid parameters sent for api/users/update.
 Wrong Parameters: 
[{"user"=>["default_locale"]}]
 Parameters Received:
 {"user"=>{"default_locale"=>"en"}, "id"=>"22", "action"=>"update", "controller"=>"api/users"}

Expected results:
nothing like this, should accept inserting/updating locale for the user.

Additional info:

Comment 1 Og Maciel 2012-08-23 14:04:57 UTC
I'm wondering if this version of katello-common has the new code in it. Unfortunately that system is not available anymore :/

Comment 2 Og Maciel 2012-08-23 15:01:32 UTC
Tested with latest katello code and the same command above worked as expected. I believe you have an old version of the katello cli code in that box.

katello> user create --default_environment=dev --default_organization=ACME_Corporation --email=<your_email> --username=user1 --password=<password> --default_locale ru

Successfully created user [ user1 ]

katello> user info --username user1
--------------------------------------------------------------------------------
                               User Information
--------------------------------------------------------------------------------
Id:                   3
Username:             user1
Email:                bbuckingham
Disabled:             False
Default Organization: ACME_Corporation
Default Environment:  dev
Default Locale:       ru

Comment 3 Garik Khachikyan 2012-08-23 15:03:58 UTC
mm, your version of *-cli pls ?

Comment 4 Og Maciel 2012-08-24 14:01:41 UTC
katello-cli-1.1.2-1.git.162.09c0162.el6.noarch

Comment 5 Garik Khachikyan 2012-08-27 07:44:21 UTC
confirm: notabug.

having latest cli code it creates the user with correct default_locale

Comment 6 Garik Khachikyan 2012-08-27 07:45:51 UTC
katello-common-1.1.6-1.git.19.0c0be49.el6.noarch
katello-selinux-1.1.1-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-glue-foreman-1.1.6-1.git.19.0c0be49.el6.noarch
pulp-1.1.12-1.el6.noarch
katello-repos-1.1.2-1.el6.noarch
qpid-cpp-client-0.14-16.el6.x86_64
m2crypto-0.21.1.pulp-7.el6.x86_64
python-qpid-0.14-8.el6.noarch
candlepin-selinux-0.7.6.2-1.el6.noarch
pulp-common-1.1.12-1.el6.noarch
katello-glue-candlepin-1.1.6-1.git.19.0c0be49.el6.noarch
pulp-selinux-server-1.1.12-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-common-1.1.3-1.git.35.dcffe00.el6.noarch
katello-cli-1.1.3-1.git.35.dcffe00.el6.noarch
qpid-cpp-client-ssl-0.14-16.el6.x86_64
candlepin-0.7.6.2-1.el6.noarch
katello-certs-tools-1.1.8-1.el6.noarch
katello-glue-pulp-1.1.6-1.git.19.0c0be49.el6.noarch
katello-configure-1.1.4-1.git.171.3114d81.el6.noarch
katello-1.1.6-1.git.19.0c0be49.el6.noarch
candlepin-tomcat6-0.7.6.2-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-agent-1.1.2-1.el6.noarch
qpid-cpp-server-0.14-16.el6.x86_64
qpid-cpp-server-ssl-0.14-16.el6.x86_64

Comment 7 Mike McCune 2013-08-16 17:51:21 UTC
getting rid of 6.0.0 version since that doesn't exist