Bug 1324848

Summary: hammer host-collection update with host-collection name failed
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: HammerAssignee: Andrew Kofink <akofink>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 15:25:23 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:
Attachments:
Description Flags
production.log error none

Description sthirugn@redhat.com 2016-04-07 12:46:57 UTC
Created attachment 1144697 [details]
production.log error

Description of problem:
hammer host-collection create with host-collection name failed

Version-Release number of selected component (if applicable):
satellite-6.2.0-6.2.beta.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
hammer> host-collection update --help
Usage:
     host-collection update [OPTIONS]

Options:
 --description DESCRIPTION          
 --host-ids HOST_IDS               List of host ids to replace the hosts in host collection
                                   Comma separated list of values.
 --hosts HOST_NAMES                Comma separated list of values.
 --id ID                           Id of the host collection
 --max-hosts MAX_HOSTS             Maximum number of hosts in the host collection
 --name NAME                       Host collection name to search by
 --new-name NEW_NAME               Host Collection name
 --unlimited-hosts UNLIMITED_HOSTS Whether or not the host collection may have unlimited hosts
                                   One of true/false, yes/no, 1/0.
 -h, --help                        print help


hammer> host-collection create --organization-id=1 --name=newhostcollection 
Host collection created

hammer> host-collection update --name=newhostcollection --new-name=sathc
Could not update the the host collection:
  undefined method `id' for nil:NilClass

hammer> host-collection update --id=1 --new-name=sathc
Host collection updated


Actual results:
host-collection update with name errored

Expected results:
I think organization-id is required to update with host-collection name but update command doesnt take organization-id as input.

Additional info:

Comment 2 Andrew Kofink 2016-05-12 15:25:23 UTC
Fixed with BZ #1328925

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