Actions
Bug #3706
closedAPI for show hostgroups use 'name' instead of 'label'
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Description
If a nested host group is used, finding a specific host group results in incorrect output.
For example:
If I have a hostgroup named: "common" and under it, I have 2 hostgroups: "group1" and "group2" and each one has a group named "hosts" (so common/group1/hosts and common/group2/hosts)
a query for "common/group1/hosts" results in an empty list and a query for "hosts" results with only 1 result which is one of the above (not a list like you'd expect)
Updated by Leos Stejskal over 3 years ago
I'm closing the issue,
it have been here for some time and I wasn't able to reproduce it on the latest version.
If you think that the issue is still relevant feel free to reopen it.
bundle exec bin/hammer hostgroup list --search "title ~ common"
---|--------|---------------------|------------------|--------------------|------
ID | NAME | TITLE | OPERATING SYSTEM | PUPPET ENVIRONMENT | MODEL
---|--------|---------------------|------------------|--------------------|------
8 | common | common | | |
9 | group1 | common/group1 | | |
11 | hosts | common/group1/hosts | | |
10 | group2 | common/group2 | | |
12 | hosts | common/group2/hosts | | |
---|--------|---------------------|------------------|--------------------|------
bundle exec bin/hammer hostgroup list --search "title ~ common/group1"
---|--------|---------------------|------------------|--------------------|------
ID | NAME | TITLE | OPERATING SYSTEM | PUPPET ENVIRONMENT | MODEL
---|--------|---------------------|------------------|--------------------|------
9 | group1 | common/group1 | | |
11 | hosts | common/group1/hosts | | |
---|--------|---------------------|------------------|--------------------|------
Actions