Project

General

Profile

Bug #7284

hammer user create --admin help output not intuitive

Added by dustin tsang almost 6 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Bugzilla link:
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.

History

#1 Updated by The Foreman Bot almost 6 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 ()

#2 Updated by Eric Helms almost 6 years ago

  • Triaged changed from No to Yes

#3 Updated by Eric Helms almost 6 years ago

  • Target version changed from 55 to 56

#4 Updated by dustin tsang almost 6 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 13

#6 Updated by Dominic Cleal almost 6 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
  • Legacy Backlogs Release (now unused) deleted (13)

Also available in: Atom PDF