Bug 1321053 - hammer host-collection info fails if --name is used
Summary: hammer host-collection info fails if --name is used
Status: CLOSED DUPLICATE of bug 1331875
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Katello QA List
Depends On:
TreeView+ depends on / blocked
Reported: 2016-03-24 14:41 UTC by Og Maciel
Modified: 2019-04-01 20:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-05-02 13:59:15 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Og Maciel 2016-03-24 14:41:09 UTC
Description of problem:

You cannot get the info for a host collection through hammer by name, only by id

hammer> host-collection list --organization-id 1
5  | test123       | None  |
1  | RHEL 7 Server | None  |
2  | RHEL 6 Server | None  |
3  | RHEL 5 Server | None  |
4  | Capsule       | None  |

Note that you cannot get the info by name, only by ID

hammer> host-collection info --id 5
ID:          5
Name:        test123
Limit:       None
Total Hosts: 0

hammer> host-collection info --name test123
undefined method `id' for nil:NilClass

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

* Satellite 6.2.0 SNAP 5.1

How reproducible:

Steps to Reproduce:
1. Create a host-collection
2. use hammer host-collection --name <name of your new host collection>

Actual results:

undefined method `id' for nil:NilClass

Expected results:

Additional info:

Discovered while testing https://bugzilla.redhat.com/show_bug.cgi?id=1214675

Comment 2 Brad Buckingham 2016-04-13 16:35:25 UTC
This is very similar to bug 1324848.  They may be related to the same issue.

Comment 3 Andrew Kofink 2016-05-02 13:59:15 UTC

*** This bug has been marked as a duplicate of bug 1331875 ***

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