Bug 1131911
| Summary: | hammer user create --admin help output not intuitive | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Clifford Perry <cperry> |
| Component: | Hammer | Assignee: | Mike McCune <mmccune> |
| Status: | CLOSED ERRATA | QA Contact: | Tazim Kolhar <tkolhar> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 6.0.4 | CC: | cwelton, dcleal, mmccune, tkolhar, xdmoon |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/7284 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-12 05:14:54 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1115190 | ||
Created redmine issue http://projects.theforeman.org/issues/7284 from this bug Moving to POST since upstream bug http://projects.theforeman.org/issues/7284 has been closed FAILEDQA
*** This bug failed in upstream ***
Version Tested:
# rpm -qa | grep foreman
foreman-compute-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_discovery-1.4.1-1.el7.noarch
foreman-selinux-1.8.0-0.develop.201411281557gitf4a857f.el7.noarch
foreman-libvirt-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el7.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch
foreman-ovirt-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el7.noarch
foreman-postgresql-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-gce-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-vmware-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.el7.noarch
foreman-proxy-1.8.0-0.develop.201411261259git6ddd00d.el7.noarch
ibm-x3550m3-07.lab.eng.brq.redhat.com-foreman-proxy-1.0-1.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el7.noarch
rubygem-hammer_cli_foreman-0.1.3-1.201411121216git9381fc5.el7.noarch
foreman-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ibm-x3550m3-07.lab.eng.brq.redhat.com-foreman-client-1.0-1.noarch
foreman-release-1.8.0-0.develop.201412040955git563fa28.el7.noarch
# hammer shell
Welcome to the hammer interactive shell
Type 'help' for usage information
hammer> user create --admin true --firstname Example --lastname User --login example --mail root@localhost --password redhat --auth-source-id 1
[Foreman] Username: admin
[Foreman] Password for admin:
User created
hammer> user create --help
Usage:
user create [OPTIONS]
Options:
--admin ADMIN is an admin account
One of true/false, yes/no, 1/0.
--auth-source-id AUTH_SOURCE_ID
--default-location-id DEFAULT_LOCATION_ID
--default-organization-id DEFAULT_ORGANIZATION_ID
--firstname FIRSTNAME
--lastname LASTNAME
--location-ids LOCATION_IDS REPLACE locations with given ids
Comma separated list of values.
--login LOGIN
--mail MAIL
--organization-ids ORGANIZATION_IDS REPLACE organizations with given ids.
Comma separated list of values.
--password PASSWORD
-h, --help print help
For, admin it provides : One of true/false, yes/no, 1/0.
As, said it should indicate what Auth_source_ID is, but putting '1' worked. The help output doesn't indicate to me what I should put there nor why '1' worked for me.
Moving to POST since upstream bug http://projects.theforeman.org/issues/7284 has been closed VERIFIED:
# rpm -q | grep foreman
rpm: no arguments given for query
[root@qe-sat6-rhel7 ~]# rpm -qa | grep foreman
foreman-postgresql-1.7.2.4-1.el7sat.noarch
foreman-vmware-1.7.2.4-1.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.4-1.el7.noarch
foreman-compute-1.7.2.4-1.el7sat.noarch
ruby193-rubygem-foreman_docker-1.1.0.2-1.el7sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.1-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.1-1.el7.noarch
ruby193-rubygem-foreman_openscap-0.3.0-1.el7sat.noarch
foreman-1.7.2.4-1.el7sat.noarch
foreman-gce-1.7.2.4-1.el7sat.noarch
ruby193-rubygem-foreman_abrt-0.0.5-2.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.3-1.el7sat.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-selinux-1.7.2.8-1.el7sat.noarch
foreman-ovirt-1.7.2.4-1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.7-2.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.4-1.el7.noarch
foreman-proxy-1.7.2.1-1.el7sat.noarch
foreman-libvirt-1.7.2.4-1.el7sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.4-1.el7sat.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-proxy-1.0-1.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch
hammer> user create --help
Usage:
user create [OPTIONS]
Options:
--admin ADMIN is an admin account
One of true/false, yes/no, 1/0.
--auth-source-id AUTH_SOURCE_ID
--default-location-id DEFAULT_LOCATION_ID
--default-organization-id DEFAULT_ORGANIZATION_ID
--firstname FIRSTNAME
--lastname LASTNAME
--location-ids LOCATION_IDS REPLACE locations with given ids
Comma separated list of values.
--locations LOCATION_NAMES Comma separated list of values.
--login LOGIN
--mail MAIL
--organization-ids ORGANIZATION_IDS REPLACE organizations with given ids.
Comma separated list of values.
--organizations ORGANIZATION_NAMES Comma separated list of values.
--password PASSWORD
-h, --help print help
This bug is slated to be released with Satellite 6.1. 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. https://access.redhat.com/errata/RHSA-2015:1592 |
Description of problem: Creating this as a usability bug with the hammer command line. I had to ask on IRC to find out the correct flag to pass to hammer to actually create a user as an administrator. It was not obvious or intuitive to me by reading the --help output as to what I should put. We should improve the --help output to let someone know when it is a true/false, vs string input or what is optional or not. Version-Release number of selected component (if applicable): [root@smqa-x3550m3-03 ~]# rpm -qa | grep -i hamm rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch rubygem-hammer_cli_katello-0.0.4-12.el6sat.noarch rubygem-hammer_cli-0.1.1-11.el6sat.noarch rubygem-hammer_cli_foreman-0.1.1-15.el6sat.noarch How reproducible: Always (in this compose) Steps to Reproduce: 1. hammer shell 2. user create --help 3. Try (mistakenly) > user create --admin ADMIN --firstname Example --lastname User --login example --mail root@localhost --password redhat --auth-source-id 1 4. Try (correctly) > user create --admin true --firstname Example --lastname User --login example1 --mail root@localhost --password redhat --auth-source-id 1 Actual results: hammer> user create --help Usage: user create [OPTIONS] Options: --admin ADMIN Is an admin account? --auth-source-id AUTH_SOURCE_ID --default-location-id DEFAULT_LOCATION_ID --default-organization-id DEFAULT_ORGANIZATION_ID --firstname FIRSTNAME --lastname LASTNAME --login LOGIN --mail MAIL --password PASSWORD -h, --help print help hammer> Expected results: --admin true <optional> Is an admin account? --auth-source-id AUTH_SOURCE_ID --default-location-id DEFAULT_LOCATION_ID <optional> --default-organization-id DEFAULT_ORGANIZATION_ID <optional> --firstname FIRSTNAME --lastname LASTNAME --login LOGIN --mail EMAIL --password PASSWORD -h, --help print help Additional info: Side note - I've got no idea what Auth_source_ID is, but putting '1' worked. The help output doesn't indicate to me what I should put there nor why '1' worked for me. As such, my expected results output remains the same there due to my lack of understanding of what it is.