Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1517084

Summary: Duplicate hammer options to view available compute-resource image
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Compute ResourcesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: chrobert, dlobatog, mhulan, nkathole, oprazak, pcreech, sjagtap
Target Milestone: 6.5.0Keywords: 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: 2019-05-14 12:36:46 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 Nikhil Kathole 2017-11-24 07:20:59 UTC
Description of problem: In hammer CLI, compute-resource image available needs to pass two parameters to see images available for addition.

hammer> compute-resource image available -h
Usage:
     compute-resource image available [OPTIONS]

Options:
 --compute-resource NAME
 --compute-resource-id ID
 --id ID
 --name NAME                   Compute resource name
 -h, --help                    print help


Version-Release number of selected component (if applicable): Satellite 6.3 snap 25


How reproducible: always


Steps to Reproduce:
1. hammer> compute-resource image available --id 67
Error: At least one of options --compute-resource-id, --compute-resource is required

See: ' compute-resource image available --help'

2. hammer> compute-resource image available --id 67
Error: At least one of options --compute-resource-id, --compute-resource is required

See: ' compute-resource image available --help'

3.hammer> compute-resource image available --id 67
Error: At least one of options --compute-resource-id, --compute-resource is required

See: ' compute-resource image available --help'

4. hammer> compute-resource image available --name 'rhev_compute'
Error: At least one of options --compute-resource-id, --compute-resource is required

See: ' compute-resource image available --help'

Actual results:

Need to pass two parameters to see available images for addition.

Expected results: Remove duplicate options and passing only id or name should work.


Additional info:

Comment 4 Daniel Lobato Garcia 2018-02-22 16:26:07 UTC
I'm able to reproduce, cloning to upstream.

Comment 5 Daniel Lobato Garcia 2018-02-22 16:27:47 UTC
Created redmine issue http://projects.theforeman.org/issues/22665 from this bug

Comment 6 Satellite Program 2018-09-07 08:07:52 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/22665 has been resolved.

Comment 7 Nikhil Kathole 2018-11-05 08:07:23 UTC
VERIFIED

Version tested:
Satellite 6.5 snap 2

# rpm -q satellite
satellite-6.5.0-3.beta.el7sat.noarch

# hammer compute-resource image available -h
Usage:
    hammer compute-resource image available [OPTIONS]

Options:
 --compute-resource NAME                 Compute resource name
 --compute-resource-id ID                 
 --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 ID
 --organization-title ORGANIZATION_TITLE Organization title
 -h, --help                              Print help

# hammer compute-resource image available --compute-resource-id 3
----------------------------------|-------------------------------------
NAME                              | UUID                                
----------------------------------|-------------------------------------
sreber-template                   | 501e8104-6904-d2d5-292d-844e052a763f
sonar-jbossbrms-rhel-7-vc         | 501e9eac-4861-aa3f-8a18-8b6ef47719e2
robottelo-automation-rhel75       | 501e28f0-8b4a-2311-8263-7fa01e1dbbc1
robottelo-automation-rhel69       | 501e0583-1fcd-9542-2410-0f6838c72e51
robottelo-automation-rhel68       | 501e0977-12ce-ed5a-ea8f-299449da5e95
robottelo-automation-rhel74-disks | 501e47a8-cc2c-4b25-9d58-d9ef910b696b
RHEL7_Eng_Template                | 501e73b5-17b2-9acb-dfd7-b29b1fd701ce
Katello-Nightly                   | 501e6be5-28da-cbc3-80c7-630c320d3c1d
RHEL6-Template                    | 501ef634-2ed7-4a6c-e72a-2f349bfbd124
RHEL7-Template                    | 501eced5-e0f7-07dd-7113-7f4f318d4af6
----------------------------------|-------------------------------------

# hammer compute-resource image available --compute-resource VMware
----------------------------------|-------------------------------------
NAME                              | UUID                                
----------------------------------|-------------------------------------
sreber-template                   | 501e8104-6904-d2d5-292d-844e052a763f
sonar-jbossbrms-rhel-7-vc         | 501e9eac-4861-aa3f-8a18-8b6ef47719e2
robottelo-automation-rhel75       | 501e28f0-8b4a-2311-8263-7fa01e1dbbc1
robottelo-automation-rhel69       | 501e0583-1fcd-9542-2410-0f6838c72e51
robottelo-automation-rhel68       | 501e0977-12ce-ed5a-ea8f-299449da5e95
robottelo-automation-rhel74-disks | 501e47a8-cc2c-4b25-9d58-d9ef910b696b
RHEL7_Eng_Template                | 501e73b5-17b2-9acb-dfd7-b29b1fd701ce
Katello-Nightly                   | 501e6be5-28da-cbc3-80c7-630c320d3c1d
RHEL6-Template                    | 501ef634-2ed7-4a6c-e72a-2f349bfbd124
RHEL7-Template                    | 501eced5-e0f7-07dd-7113-7f4f318d4af6
----------------------------------|-------------------------------------

Comment 11 errata-xmlrpc 2019-05-14 12:36:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222