Bug 1333280

Summary: Update with --puppet-classes parameter will fail, if the classes belong to the same namespace
Product: Red Hat Satellite Reporter: Shimon Shtein <sshtein>
Component: HammerAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Tomas Strachota <tstrachota>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, sthirugn, tstrachota
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-hammer_cli_foreman-0.5.1.7-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:30:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shimon Shtein 2016-05-05 07:46:14 UTC
To reproduce:

<pre>

hammer hostgroup update --id 5 --puppet-classes "apache::mod::authnz_ldap,apache::dev"

</pre>
will fail.

The problem is in the API response handling in id_resolver.rb
API response was grouped by namespace and validated groups count against number of classes in the requested parameters.

Comment 1 Shimon Shtein 2016-05-05 07:46:19 UTC
Created from redmine issue http://projects.theforeman.org/issues/14930

Comment 2 Shimon Shtein 2016-05-05 07:46:25 UTC
Upstream bug assigned to sshtein

Comment 4 Bryan Kearney 2016-05-06 14:19:24 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14930 has been closed

Comment 6 Tomas Strachota 2016-05-27 14:28:03 UTC
Verified in snap 13.

$ hammer hostgroup update --name test --puppet-classes "apache::mod::authnz_ldap,apache::dev"
Hostgroup updated

$ hammer hostgroup info --name test
Id:                     1
Name:                   test
Title:                  test
Puppet CA Proxy Id:     
Puppet Master Proxy Id: 
Puppetclasses:          
    apache::dev
    apache::mod::authnz_ldap
Parameters:             

Parent Id:

Comment 7 Bryan Kearney 2016-07-27 11:30:34 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