Bug #11880
closed[BUG] updating multiple puppet-classes to hostgroup via hammer fails to update the hostgroup
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1264163
Description of problem:
updating multiple puppet-classes to hostgroup via hammer fails to update the hostgroup
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:1. Create a hostgroup and try adding puppet classes to it via hammer.
2. As per hammer --help options, multiple classes can be uploaded using below option:
----
- hammer hostgroup update --help
:
:
--puppet-classes PUPPET_CLASS_NAMES Comma separated list of values.
----
----
- hammer hostgroup update --name "hostgroup1" --puppet-classes 'motd,apache'
Could not update the hostgroup:
Error: one of puppetclasses not found
----
4. When trying to upload multiple classes using a SPACE to separate list completes successfully but the hostgroup is not updated:
----
$ hammer hostgroup update"hostgroup1" --puppet-classes 'motd apache'
Hostgroup updated
----
Actual results:
The command fails if the list is separated with comma as mentioned in the hammer help.
And when list is separated using SPACE the message shows that it was successful. But the hostgroup is not updated:
----
$ hammer hostgroup info --name "hostgroup1"
Id: 1
Name: hostgroup1
Title: hostgroup1
Operating System:
Environment: KT_Default_Organization_Library_Testaladke_8
Model:
Subnet:
Domain:
Architecture:
Partition Table:
Medium:
Puppet CA Proxy Id:
Puppet Master Proxy Id:
ComputeProfile:
Puppetclasses:
Parameters:
Organizations:
Redhat
Parent Id:
----
Expected results:
The hostgroup should be updated with the puppet classes.
Additional info:
Using puppet ids separated using comma works:---
- hammer hostgroup update --name "hostgroup1" --puppet-class-ids 2,1,7
Hostgroup updated
---