Bug 1387653

Summary: "hammer compute-resource image available" requires specifying id or name twice
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: Compute ResourcesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: dhlavacd, inecas, jcallaha, mhulan, oprazak, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:45:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Ondrejka 2016-10-21 12:56:39 UTC
Description of problem:

Attempting to list available images for a compute resource via Hammer on Satellite 6.3 snap 5. Help looks as follows:

# 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.

Comment 2 Ondřej Pražák 2016-11-04 08:55:22 UTC
Created redmine issue http://projects.theforeman.org/issues/17216 from this bug

Comment 4 Bryan Kearney 2018-09-04 17:45:05 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.