Bug #17216
closed"hammer compute-resource image available" requires specifying id or name twice
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1387653
Description of problem:
- hammer compute-resource image available -h
Usage:
hammer compute-resource image available [OPTIONS]
Options:
--compute-resource NAME
--compute-resource-id ID
--id ID
--name NAME Compute resource name
-h, --help print help
Apparently, the --compute-resource-id option is the same as --id, but hammer requires both:
- hammer compute-resource image available --compute-resource-id 7
Missing arguments for 'id' - hammer compute-resource image available --id 7
Error: At least one of options --compute-resource-id, --compute-resource is required - hammer compute-resource image available --compute-resource-id 7 --id 7
-----|-----
NAME | UUID
-----|-----
The same goes for names:
- hammer compute-resource image available --compute-resource local_libvirt
Missing arguments for 'id' - hammer compute-resource image available --name local_libvirt
Error: At least one of options --compute-resource-id, --compute-resource is required - hammer compute-resource image available --compute-resource local_libvirt --name local_libvirt
-----|-----
NAME | UUID
-----|-----
Expected results:
Redundant options should be removed, "hammer compute-resource image available" should require the cr id or name just once.
Updated by Ondřej Pražák over 7 years ago
- Subject changed from "hammer compute-resource image available" requires specifying id or name twice to "hammer compute-resource image available" requires specifying id or name twice
- Category set to Compute resources
Updated by Shira Maximov over 4 years ago
- Status changed from New to Closed
- Triaged set to No
This issue was already fixed:
hammer compute-resource image available --help
Usage:
hammer compute-resource image available [OPTIONS]
Options:
--compute-resource NAME Compute resource name
--compute-resource-id ID
--fields FIELDS Show specified fileds or predefined filed sets only. (See below)
Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for complex parameters
--location LOCATION_NAME Location name
--location-id LOCATION_ID
--location-title LOCATION_TITLE Location title
--organization ORGANIZATION_NAME Organization name
--organization-id ORGANIZATION_ID
--organization-title ORGANIZATION_TITLE Organization title
-h, --help Print help
hammer compute-resource image available --compute-resource-id 31
--------|-------------------------------------
NAME | UUID
--------|-------------------------------------
RHEL7_3 | 5035573e-59e9-8fe0-7892-482c75cda559
--------|-------------------------------------