Project

General

Profile

Actions

Bug #25819

closed

No facts attribute for hosts/<id> call

Added by John Mitsch over 5 years ago. Updated over 5 years ago.

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

Description

For virt-who hypervisors, I can't get the host facts even if they exist in the console i.e.

For Host 8, the virt-who hypervisor:

Facts in console

irb(main):021:0> Host.find(8).facts
=> {"hypervisor::type"=>"QEMU", "cpu::cpu_socket(s)"=>"1", "hypervisor::version"=>"2010001", "_timestamp"=>"2019-01-08 21:03:53 +0000", "hypervisor"=>nil, "cpu"=>nil}

But not in API

[vagrant@coffee foreman{develop}]$ curl g -k -u admin:changeme -H "Content-Type: application/json" https://coffee.jomitsch.example.com/api/v2/hosts/8 | jq '.facts'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3162 0 3162 0 0 13165 0 -
:--:-- --:--:-- --:--:-- 13230
null

For Host 3, a content host, facts are in both API and console

irb(main):022:0> Host.find(3).facts
=> {"system::certificate_version"=>"3.2", "uname::sysname"=>"Linux", ... }

[vagrant@coffee foreman{develop}]$ curl g -k -u admin:changeme -H "Content-Type: application/json" https://coffee.jomitsch.example.com/api/v2/hosts/3 | jq '.facts'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10510 0 10510 0 0 39243 0 -
:--:-- --:--:-- --:--:-- 39363 {
"system::certificate_version": "3.2",
"uname::sysname": "Linux",
...
}

Actions #1

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6398 added
Actions #2

Updated by John Mitsch over 5 years ago

  • Bugzilla link set to 1652732
Actions #3

Updated by Tomer Brisker over 5 years ago

  • Project changed from Foreman to Katello
  • Status changed from Ready For Testing to Assigned
  • Pull request deleted (https://github.com/theforeman/foreman/pull/6398)

moving to katello following discussion in the pr

Actions #4

Updated by Andrew Kofink over 5 years ago

  • Status changed from Assigned to Closed
  • Triaged changed from No to Yes
  • Bugzilla link deleted (1652732)
Actions

Also available in: Atom PDF