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.