Bug #32868
closedConsistent use of unlimited-host argument throughout CLI'
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1813624
Description of problem:
common argument used in hammer commands --unlimited-hosts in some cases requires a value in other cases it is passed without a value. We should be consistent across the CLI.
Allow the user to pass 1|0 true|false yes|no AND insist on a value
OR
Allow the user to pass without a value
OR
Allow the user to do either
NOT have a mix of requirements
Version-Release number of selected component (if applicable):
[root@sat6 ~]# hammer --version
hammer (0.17.1)
* hammer_cli_foreman (0.17.0.8)
* hammer_cli_foreman_admin (0.0.8)
* hammer_cli_foreman_ansible (0.3.2)
* hammer_cli_foreman_bootdisk (0.1.3.3)
* hammer_cli_foreman_discovery (1.0.1)
* hammer_cli_foreman_docker (unknown version)
* hammer_cli_foreman_openscap (0.1.7)
* hammer_cli_foreman_remote_execution (unknown version)
* hammer_cli_foreman_tasks (unknown version)
* hammer_cli_foreman_templates (0.1.2)
* hammer_cli_foreman_virt_who_configure (unknown version)
* hammer_cli_katello (0.18.0.6)
How reproducible:
always
Steps to Reproduce:
1. run two commands
2. hammer host-collection create <args> --unlimited-hosts
3. hammer activation-key create <args> --unlimited-hosts
Actual results:
hammer host-collection create generates an error unless you pass true|false 1|0 yes|no
hammer activation-key create generates an error * if * you pass true|false 1|0 yes|no
Expected results:
both commands should have the same behaviour for a similar argument and meaning.
Additional info:
my vote is to be ansible-ish and allow the user either pass a value or not and default true yes 1 if a value is not provided. My $0.02CAD'