SatelliteQE / nailgun

Why use a hammer when you can use a nailgun.
GNU General Public License v3.0
46 stars 83 forks source link

[6.15.z] host: added field reported_data #1208

Closed Satellite-QE closed 3 months ago

Satellite-QE commented 4 months ago

Cherrypick of PR: https://github.com/SatelliteQE/nailgun/pull/1202

Description of changes

Added new field reported_data to the Host entity. This field is optional and it is not present for all host instances, only for those reporting real data, like bare metal hosts and so.

Functional demonstration

Example:

In [1]: from nailgun.entities import Host
In [2]: host = Host().search(query={'search': f'name=sat.instance.addr.com'})[0]
In [3]: host.reported_data
Out [3]:
{
    "boot_time": "2024-06-21 16:44:18 +0200",
    "cores": 6,
    "sockets": 6,
    "disks_total": 107374182400,
    "kernel_version": "5.14.0-427.20.1.el9_4.x86_64",
    "bios_vendor": "SeaBIOS",
    "bios_release_date": "04/01/2014",
    "bios_version": "1.16.1-1.el9"
}