Project

General

Profile

Actions

Bug #25008

closed

Foreman API host facts returns facts two times

Added by Jan Pacak over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
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.

Actions #1

Updated by Jan Pacak over 5 years ago

  • Category set to API
Actions #2

Updated by Amit Karsale over 5 years 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?

Actions #3

Updated by Jan Pacak over 5 years ago

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

Hi,

fixed in 1.20.1

Actions

Also available in: Atom PDF