Project

General

Profile

Actions

Bug #24121

closed

API hostgroups/X/hosts listing all hosts instead of hostgroup

Added by Amit Karsale almost 6 years ago. Updated over 5 years ago.

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

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

Actions #1

Updated by Amit Karsale over 5 years ago

  • Status changed from New to Closed

not able to reproduce in foreman 1.20+ hence closing.

Actions

Also available in: Atom PDF