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 1317677 - New hammer host-collection hosts command does not expose any options
Summary: New hammer host-collection hosts command does not expose any options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Walden Raines
QA Contact: Sanket Jagtap
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1335295 1348340 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-14 20:36 UTC by Og Maciel
Modified: 2019-09-26 17:35 UTC (History)
5 users (show)

Fixed In Version: rubygem-hammer_cli_katello-0.0.22.16-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:05:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15290 0 'Normal' 'New' '`hammer host-collection hosts` command is undefined' 2019-11-18 20:43:59 UTC
Foreman Issue Tracker 15429 0 'Normal' 'Closed' 'New hammer host-collection hosts command does not expose any options' 2019-11-18 20:43:59 UTC

Description Og Maciel 2016-03-14 20:36:21 UTC
Description of problem:

I noticed that the command hammer host-collection hosts does not expose any options:

hammer> host-collection hosts -h
Usage:
     host-collection hosts [OPTIONS]

Options:
 -h, --help                    print help

Furthermore, running the command itself fails:

hammer> host-collection hosts
Error: The server does not support such operation.


Version-Release number of selected component (if applicable):

* Satellite 6.2.0 SNAP 3.1

How reproducible:


Steps to Reproduce:
1. Use the command host-collection hosts
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Brad Buckingham 2016-06-07 10:03:33 UTC
*** Bug 1335295 has been marked as a duplicate of this bug. ***

Comment 3 Oleksandr Shtaier 2016-06-14 07:32:54 UTC
It doesn't seem that we have any other way to get list of hosts inside of host collection, so that defect seems as more urgent thing. Personally, I don't see much sense in adding or removing something from collection if I can't get the actual list of content for that collection. The info command provide us only the amount of hosts which doesn't seem as enough level of details. For example:

>hammer -v -u admin -p changeme  host-collection info --id="69" --organization-id="1698"
ID:          69
Name:        vZijPChoMPABDki
Limit:       None
Description: 
Total Hosts: 1

If there is any alternative, so please return defect into previous state

Comment 4 Walden Raines 2016-06-15 20:55:28 UTC
Created redmine issue http://projects.theforeman.org/issues/15429 from this bug

Comment 5 Walden Raines 2016-06-15 21:20:37 UTC
PR: https://github.com/Katello/hammer-cli-katello/pull/410

Comment 6 Walden Raines 2016-06-17 20:21:16 UTC
Revision 8a8057e2
Added by Walden Raines 25 minutes ago

Fixes #15429: use host API for host collection hosts. (#410)

The host collection hosts command was pointing at an API that had been
removed. This change brings the command in line with the API.

http://projects.theforeman.org/issues/15429

Comment 7 Oleksandr Shtaier 2016-06-22 09:02:29 UTC
Verified on 6.2 SNAP17

hammer host-collection hosts --help
Usage:
    hammer host-collection hosts [OPTIONS]

Options:
 --environment ENVIRONMENT_NAME          Name to search by
 --environment-id ENVIRONMENT_ID          
 --hostgroup HOSTGROUP_NAME              Name to search by
 --hostgroup-id HOSTGROUP_ID              
 --id HOST_COLLECTION_ID                 Host Collection ID
 --location LOCATION_NAME                Name to search by
 --location-id LOCATION_ID                
 --name HOST_COLLECTION_NAME             Host Collection Name
 --order ORDER                           sort results
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --page PAGE                             paginate results
 --per-page PER_PAGE                     number of entries per request
 --search SEARCH                         filter results
 -h, --help                              print help


>hammer -v -u admin -p changeme  host-collection info --id="74" --organization-id="1765"

ID:          74
Name:        DbybbcUiVLXgmIf
Limit:       None
Description: 
Total Hosts: 1

>hammer -v -u admin -p changeme --output=csv host-collection hosts --name="DbybbcUiVLXgmIf" --organization-id="1765"

ID,Name
291,emjnsrszgsvylmw

Comment 8 Sanket Jagtap 2016-06-22 13:31:32 UTC
Build : Satellite 6.2 Snap 17

 host-collection hosts --help
Usage:
     host-collection hosts [OPTIONS]

Options:
 --environment ENVIRONMENT_NAME          Name to search by
 --environment-id ENVIRONMENT_ID          
 --hostgroup HOSTGROUP_NAME              Name to search by
 --hostgroup-id HOSTGROUP_ID              
 --id HOST_COLLECTION_ID                 Host Collection ID
 --location LOCATION_NAME                Name to search by
 --location-id LOCATION_ID                
 --name HOST_COLLECTION_NAME             Host Collection Name
 --order ORDER                           sort results
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --page PAGE                             paginate results
 --per-page PER_PAGE                     number of entries per request
 --search SEARCH                         filter results
 -h, --help                              print help

Comment 9 Walden Raines 2016-06-22 22:20:49 UTC
*** Bug 1348340 has been marked as a duplicate of this bug. ***

Comment 10 Bryan Kearney 2016-07-27 11:05:28 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/RHBA-2016:1501


Note You need to log in before you can comment on or make changes to this bug.