[v2,13/16] libxl: fill in virCapsEnum 'report'

Message ID 4e6f97a2cee5c5bf09f95040324b932207dc09e8.1551914794.git.crobinso@redhat.com
State Accepted
Commit 523565cd7f9e00401e632155fc852f36339fdbea
Headers show
Series
  • domcaps: use virTristateBool
Related show

Commit Message

Cole Robinson March 6, 2019, 11:37 p.m.
Set report=true for all enums currently formatted in the XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/libxl/libxl_capabilities.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Patch

diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index 672c1c7c66..19f90ba181 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -605,6 +605,8 @@  libxlMakeDomainOSCaps(const char *machine,
 
     os->supported = VIR_TRISTATE_BOOL_YES;
     capsLoader->supported = VIR_TRISTATE_BOOL_NO;
+    capsLoader->type.report = true;
+    capsLoader->readonly.report = true;
 
     if (STREQ(machine, "xenpv") || STREQ(machine, "xenpvh"))
         return 0;
@@ -633,6 +635,9 @@  static int
 libxlMakeDomainDeviceDiskCaps(virDomainCapsDeviceDiskPtr dev)
 {
     dev->supported = VIR_TRISTATE_BOOL_YES;
+    dev->diskDevice.report = true;
+    dev->bus.report = true;
+    dev->model.report = true;
 
     VIR_DOMAIN_CAPS_ENUM_SET(dev->diskDevice,
                              VIR_DOMAIN_DISK_DEVICE_DISK,
@@ -650,6 +655,7 @@  static int
 libxlMakeDomainDeviceGraphicsCaps(virDomainCapsDeviceGraphicsPtr dev)
 {
     dev->supported = VIR_TRISTATE_BOOL_YES;
+    dev->type.report = true;
 
     VIR_DOMAIN_CAPS_ENUM_SET(dev->type,
                              VIR_DOMAIN_GRAPHICS_TYPE_SDL,
@@ -663,6 +669,7 @@  static int
 libxlMakeDomainDeviceVideoCaps(virDomainCapsDeviceVideoPtr dev)
 {
     dev->supported = VIR_TRISTATE_BOOL_YES;
+    dev->modelType.report = true;
 
     VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType,
                              VIR_DOMAIN_VIDEO_TYPE_VGA,
@@ -685,6 +692,12 @@  static int
 libxlMakeDomainDeviceHostdevCaps(virDomainCapsDeviceHostdevPtr dev)
 {
     dev->supported = VIR_TRISTATE_BOOL_YES;
+    dev->mode.report = true;
+    dev->startupPolicy.report = true;
+    dev->subsysType.report = true;
+    dev->capsType.report = true;
+    dev->pciBackend.report = true;
+
     /* VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES is for containers only */
     VIR_DOMAIN_CAPS_ENUM_SET(dev->mode,
                              VIR_DOMAIN_HOSTDEV_MODE_SUBSYS);