Bug 1392755

Summary: hammer host-collection list returns "undefined method `id' for nil:NilClass"
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: HammerAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.2.4CC: bbuckingham, dhlavacd, inecas, mhulan, tstrachota
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-08 19:58:34 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 Pavel Moravec 2016-11-08 07:35:28 UTC
Description of problem:
"hammer host-collection list" command returns "undefined method `id' for nil:NilClass". Quite probably it requires specifying organization since after adding "--organization-id=1", it printed the expected list.

Please print similar warning like "content-host list" has.


Version-Release number of selected component (if applicable):
Sat6.2.3
tfm-rubygem-hammer_cli-0.5.1.11-4.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. hammer -u admin -p redhat host-collection list 


Actual results:
undefined method `id' for nil:NilClass


Expected results:
Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.


Additional info:

Comment 1 Brad Buckingham 2016-11-08 19:58:34 UTC

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