Bug #7284
closedhammer user create --admin help output not intuitive
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1131911
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.
Updated by The Foreman Bot about 10 years ago
- Status changed from New to Ready For Testing
- Target version set to 55
- Pull request https://github.com/theforeman/hammer-cli/pull/142 added
- Pull request deleted (
)
Updated by dustin tsang about 10 years ago
- Status changed from Ready For Testing to Closed
Updated by Eric Helms about 10 years ago
- Translation missing: en.field_release set to 13
Updated by Dominic Cleal about 10 years ago
- Project changed from Katello to Hammer CLI
- Category changed from Hammer to Hammer core
- Target version changed from 56 to 1.7.3
- Translation missing: en.field_release deleted (
13)