Project

General

Profile

Actions

Bug #32868

closed

Consistent use of unlimited-host argument throughout CLI'

Added by Jeremy Lenz over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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'

Actions #1

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Jeremy Lenz
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/809 added
Actions #2

Updated by Jeremy Lenz over 3 years ago

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

Updated by Chris Roberts over 3 years ago

  • Subject changed from Consistent use of unlimited-host argument throughout CLI' to Consistent use of unlimited-host argument throughout CLI'
  • Category set to Hammer
  • Target version set to Katello 4.2.0
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF