Project

General

Profile

Actions

Bug #3706

closed

API for show hostgroups use 'name' instead of 'label'

Added by Tal Kammer over 10 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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)

Actions #1

Updated by Leos Stejskal about 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 #2

Updated by Leos Stejskal about 3 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF