Project

General

Profile

Actions

Bug #7284

closed

hammer user create --admin help output not intuitive

Added by dustin tsang over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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.

Actions #1

Updated by The Foreman Bot over 9 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 ()
Actions #2

Updated by Eric Helms over 9 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by Eric Helms over 9 years ago

  • Target version changed from 55 to 56
Actions #4

Updated by dustin tsang over 9 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions #6

Updated by Dominic Cleal over 9 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)
Actions

Also available in: Atom PDF