oVirt / ovirt-engine-api-model

oVirt Engine API Model
19 stars 33 forks source link

Missing host description in api response #105

Open bl4ko opened 9 months ago

bl4ko commented 9 months ago

When viewing host details through the oVirt web interface (located at Compute -> Hosts -> {Host} -> General -> Software), there's a field labeled OS Description that provides comprehensive information about the host's operating system. This can be visualized in the following image:

image

However, when retrieving the same host data via the oVirt API endpoint (/ovirt-engine/api/hosts/{{host_id}}/), the OS Description field seems to be absent. The JSON response includes various details about the OS, such as the type, version, and kernel command line, but not the full OS description. Here's a snippet of the API response for reference:

{
      "...": "...",
      "os": {
        "custom_kernel_cmdline": "",
        "reported_kernel_cmdline": "BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.4.17-2136.320.7.1.el8uek.x86_64 root=/dev/mapper/ol-root ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet",
        "type": "RHEL",
        "version": {
            "full_version": "8.8 - 1.0.7.el8",
            "major": "8",
            "minor": "8"
        }
      },
      "...": "..."
}

Is this discrepancy in data presentation between the web UI and API by design? If so how can we obtain the complete OS description of a host (not just the type and version) through the API?

mwperina commented 9 months ago

Unless I'm missing something OS Description UI field is not exposed in RESTAPI:

http://ovirt.github.io/ovirt-engine-api-model/4.5/#types/operating_system

@ahadas