Actions
Bug #6975
closedHammer does not work with nested hostgroups with same name
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1127572
Description of problem:
Nested hostgroups that have the same name cannot be retrieved on hammer commandline. Specifying the full path/label does not work either:
- hammer -c /opt/hoici/etc/hammer-hoici.yaml --csv hostgroup list --per-page=9999 | grep Server
48,Server,"",,,,41/46
40,Server,"",,,,35/38 - hammer -c /opt/hoici/etc/hammer-hoici.yaml hostgroup info --name=Server
Error: hostgroup found more than once - hammer -c /opt/hoici/etc/hammer-hoici.yaml hostgroup info --name=prod/Stibo/Server
Error: hostgroup not found
Secondly the list option does also not include the full path. The Label column is always empty
- hammer -c /opt/hoici/etc/hammer-hoici.yaml --csv hostgroup list
Id,Name,Label,Operating System,Environment,Model,Ancestry
52,crash,"",,,,""
53,IPS,"",,,,52
56,CITest,"",,,,52/53
54,Satellite6,"",,,,52/53
55,UserTest,"",,,,52/53
41,dev,"",,,,""
To retrieve the full path
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Create nested hostgroups with duplicate names
2. List hostgroups
3. Info of hostgroup, List/Add puppet classes to hostgroup, etc.
Actual results:
Expected results:
Hostgroup list shall provide Label as unique identifier
All actions on Hostgroups shall allow Label as hostgroup input.
Additional info:
Actions