KubeVirt decided to report this to the users. In order to allow them to
use proper APIs expose the field as well.
Resolves: https://issues.redhat.com/browse/RHEL-80688
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
* ``disk.<num>.serial`` - optional disk serial number
* ``disk.<num>.alias`` - the device alias of the disk (e.g. sda)
* ``disk.<num>.guest_alias`` - optional alias assigned to the disk
+* ``disk.<num>.guest_bus`` - bus type as reported by the guest
*--interface* returns:
* ``if.count`` - the number of interfaces defined on this domain
* "disk.<num>.alias" - the device alias of the disk (e.g. sda)
* "disk.<num>.guest_alias" - optional alias assigned to the disk, on Linux
* this is a name assigned by device mapper
+ * "disk.<num>.guest_bus" - disk bus as reported by the guest OS
*
* VIR_DOMAIN_GUEST_INFO_HOSTNAME:
* Returns information about the hostname of the domain. The typed
param_name, diskdef->dst) < 0)
return;
}
+
+ if (address->bus_type) {
+ g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH,
+ "disk.%zu.guest_bus", i);
+
+ if (virTypedParamsAddString(params, nparams, maxparams,
+ param_name, address->bus_type) < 0)
+ return;
+ }
}
if (info[i]->alias) {