Bug #24121
closedAPI hostgroups/X/hosts listing all hosts instead of hostgroup
Description
Description of problem:
The hostgroups/X/hosts filter is not working. As long as X is a valid hostgroup all hosts are returned:
[Unknown Hilti Tier] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hostgroups/66/hosts | jq . | grep hostgroup_id
"hostgroup_id": 49,
"hostgroup_id": 47,
[Unknown Hilti Tier] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hostgroups/1/hosts | jq . | grep hostgroup_id
"hostgroup_id": 49,
"hostgroup_id": 47,
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. See API call in description
2.
3.
Actual results:
All hosts returned
Expected results:
Only Hosts belonging to hostgroup X returned
Updated by Amit Karsale about 6 years ago
- Status changed from New to Closed
not able to reproduce in foreman 1.20+ hence closing.