[PATCH v2 01/10] conf: Rename VIR_DOMAIN_DEF_PARSE_VALIDATE to VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make it obvious that the flag is controlling RNG schema validation.
---
 src/bhyve/bhyve_driver.c   | 4 ++--
 src/conf/domain_conf.c     | 2 +-
 src/conf/domain_conf.h     | 2 +-
 src/esx/esx_driver.c       | 2 +-
 src/libxl/libxl_driver.c   | 4 ++--
 src/lxc/lxc_driver.c       | 4 ++--
 src/openvz/openvz_driver.c | 4 ++--
 src/phyp/phyp_driver.c     | 2 +-
 src/qemu/qemu_driver.c     | 4 ++--
 src/test/test_driver.c     | 4 ++--
 src/uml/uml_driver.c       | 4 ++--
 src/vbox/vbox_common.c     | 2 +-
 src/vmware/vmware_driver.c | 4 ++--
 src/vz/vz_driver.c         | 2 +-
 src/xen/xen_driver.c       | 4 ++--
 src/xenapi/xenapi_driver.c | 4 ++--
 16 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index c4051a1..c15725f 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -526,7 +526,7 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     caps = bhyveDriverGetCapabilities(privconn);
     if (!caps)
@@ -924,7 +924,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
                   VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
     if (flags & VIR_DOMAIN_START_AUTODESTROY)
         start_flags |= VIR_BHYVE_PROCESS_START_AUTODESTROY;

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 568c699..e2e247a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15343,7 +15343,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     bool usb_master = false;
     char *netprefix = NULL;

-    if (flags & VIR_DOMAIN_DEF_PARSE_VALIDATE) {
+    if (flags & VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA) {
         char *schema = virFileFindResource("domain.rng",
                                            abs_topsrcdir "/docs/schemas",
                                            PKGDATADIR "/schemas");
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index b1953b3..0d3b1e0 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2575,7 +2575,7 @@ typedef enum {
     /* parse only source half of <disk> */
     VIR_DOMAIN_DEF_PARSE_DISK_SOURCE     = 1 << 6,
     /* perform RNG schema validation on the passed XML document */
-    VIR_DOMAIN_DEF_PARSE_VALIDATE        = 1 << 7,
+    VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA = 1 << 7,
     /* don't validate os.type and arch against capabilities. Prevents
      * VMs from disappearing when qemu is removed and libvirtd is restarted */
     VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS = 1 << 8,
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 031c666..44cdf71 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -3036,7 +3036,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     memset(&data, 0, sizeof(data));

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 95dfc01..6086717 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -967,7 +967,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
                   VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
                                         parse_flags)))
@@ -2714,7 +2714,7 @@ libxlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
                                         parse_flags)))
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 9e03f1f..05dbf3a 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -463,7 +463,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!(caps = virLXCDriverGetCapabilities(driver, false)))
         goto cleanup;
@@ -1221,7 +1221,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,


     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     virNWFilterReadLockFilterUpdates();

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index a7474ff..73322c3 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -989,7 +989,7 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     openvzDriverLock(driver);
     if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
@@ -1078,7 +1078,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     openvzDriverLock(driver);
     if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index da87686..cad51e7 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3569,7 +3569,7 @@ phypDomainCreateXML(virConnectPtr conn,
     virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
                                         phyp_driver->xmlopt,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 10d3e3d..0fbdee6 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1780,7 +1780,7 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
                   VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
     if (flags & VIR_DOMAIN_START_PAUSED)
         start_flags |= VIR_QEMU_PROCESS_START_PAUSED;
     if (flags & VIR_DOMAIN_START_AUTODESTROY)
@@ -7252,7 +7252,7 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     cfg = virQEMUDriverGetConfig(driver);

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index a51eb09..1eb7813 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1605,7 +1605,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     testDriverLock(privconn);
     if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
@@ -2610,7 +2610,7 @@ static virDomainPtr testDomainDefineXMLFlags(virConnectPtr conn,
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
                                        parse_flags)) == NULL)
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 923c3f6..df0e137 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1595,7 +1595,7 @@ static virDomainPtr umlDomainCreateXML(virConnectPtr conn, const char *xml,
                   VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     virNWFilterReadLockFilterUpdates();
     umlDriverLock(driver);
@@ -2077,7 +2077,7 @@ umlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     umlDriverLock(driver);
     if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index ee2b6ad..b62e654 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -1864,7 +1864,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!data->vboxObj)
         return ret;
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 93f21c9..4ac2799 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -377,7 +377,7 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     ctx.parseFileName = NULL;
     ctx.formatFileName = vmwareCopyVMXFileName;
@@ -670,7 +670,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     ctx.parseFileName = NULL;
     ctx.formatFileName = vmwareCopyVMXFileName;
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 177a57a..a092689 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -742,7 +742,7 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     virObjectLock(driver);
     if ((def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 3f5d80d..db8f74e 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -759,7 +759,7 @@ xenUnifiedDomainCreateXML(virConnectPtr conn,
     virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
                                         parse_flags)))
@@ -1799,7 +1799,7 @@ xenUnifiedDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
                                         parse_flags)))
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 97a1ada..070e8d2 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -562,7 +562,7 @@ xenapiDomainCreateXML(virConnectPtr conn,
     virCheckFlags(VIR_DOMAIN_START_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_START_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
                                                      priv->caps, priv->xmlopt,
@@ -1744,7 +1744,7 @@ xenapiDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
     virCheckFlags(VIR_DOMAIN_DEFINE_VALIDATE, NULL);

     if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
-        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
+        parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;

     if (!priv->caps)
         return NULL;
-- 
2.8.3

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]