Bug #25819
closedNo facts attribute for hosts/<id> call
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':--:-- --:--:-- --:--:-- 13230
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3162 0 3162 0 0 13165 0 -
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':--:-- --:--:-- --:--:-- 39363
{
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10510 0 10510 0 0 39243 0 -
"system::certificate_version": "3.2",
"uname::sysname": "Linux",
...
}
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
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
Updated by Andrew Kofink over 5 years ago
- Status changed from Assigned to Closed
- Triaged changed from No to Yes
- Bugzilla link deleted (
1652732)