Project

General

Profile

Bug #25008

Foreman API host facts returns facts two times

Added by Jan Pacak 10 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

The request:
https://{{foreman-url}}/api/v2/hosts/{{host-url}}/facts?per_page=3

Returns the facts two times: {
"total": 527,
"subtotal": 4,
"page": 1,
"per_page": 3,
"search": " host = {{host-url}}",
"sort": {
"by": null,
"order": null
},
"results": {
"{{host-url}}": {
"augeas": null,
"disks": null,
"dhcp_servers": null
},
"augeas": null,
"disks": null,
"dhcp_servers": null
}
}

This is in collision with Ansible foreman plugin to read inventory:
https://github.com/theforeman/foreman_ansible_inventory/blob/master/foreman_ansible_inventory.py

line 251-255 - one result is expected.

History

#1 Updated by Jan Pacak 10 months ago

  • Category set to API

#2 Updated by Amit Karsale 6 months ago

Hello Jan,

I tried with the latest 1.20 version and I am not able to reproduce. Do you have any bindings to use 1.9 version?

#3 Updated by Jan Pacak 6 months ago

  • Status changed from New to Resolved
  • Found in Releases 1.19.1 added
  • Found in Releases deleted (1.9.0)
  • Fixed in Releases 1.20.2 added

Hi,

fixed in 1.20.1

Also available in: Atom PDF