-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
Description of problem:
When running the command:
hammer activation-key add-host-collection --help
it outputs:
Usage:
hammer activation-key add-host-collection [OPTIONS]
Options:
--host-collection[-id] VALUE/NUMBER Name/Id of associated host collection
--id VALUE ID of the activation key
--name VALUE Activation key name to search by
--organization[-id|-title|-label] VALUE/NUMBER Name/Title/Label/Id of associated organization
-h, --help Print help
The way how the options are provided now, they say to the user that he/she needs to provide all the options listed there
host-collection[-id]
id
name
organization[-id|-title|-label]
but this is not true.
Users need to provide just
host-collection[-id]
id OR name
organization[-id|-title|-label]
for the command to run.
This OR (choose one of...) option should be in my opinion reflected in the help that is printed out.
My suggestion is to update the help so it outputs the options like this:
Options:
--host-collection[-id] VALUE/NUMBER Name/Id of associated host collection
--{id|name} NUMBER/VALUE Id/Name of the activation key to search by
--organization[-id|-title|-label] VALUE/NUMBER Name/Title/Label/Id of associated organization
-h, --help Print help
How reproducible:
100 %
Is this issue a regression from an earlier version:
No
Steps to Reproduce:
1. Run hammer activation-key add-host-collection --help
2. See the help that is printed out
Actual behavior:
AK add-host-collection help is misleading users with the proper AK specification in that command.
Expected behavior:
AK add-host-collection help should say to the user that only the Id OR name of AK is needed for the command to be run.
Business Impact / Additional info:
Users can be confused by the help that is printed out.
This issue can be found in more helps in various subcommands, I have not found all of them, but it should be investigated more if this bug is going to be addressed. But I suppose this is going to appear everywhere where the selection of affected AK is needed. An example of another occurrence is hammer activation-key add-subscription --help
Tested with:
SNAP 79
satellite-6.17.0-0.2.stream.el9sat.noarch
foreman-3.14.0-0.1.develop.20241112090705git54afc35.el9sat.noarch
katello-4.16.0-0.1.master.el9sat.noarch
Red Hat Enterprise Linux release 9.5 (Plow)