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

[libvirt] [PATCH 2/8] Add stub virDomainDefineXMLFlags impls



Make sure every virt driver implements virDomainDefineXMLFlags
by adding a trivial passthrough from the existing impl with
no flags set.
---
 src/bhyve/bhyve_driver.c         | 12 ++++++++++--
 src/esx/esx_driver.c             | 10 ++++++++--
 src/libxl/libxl_driver.c         | 12 ++++++++++--
 src/lxc/lxc_driver.c             | 13 +++++++++++--
 src/openvz/openvz_driver.c       | 10 +++++++++-
 src/parallels/parallels_driver.c | 11 ++++++++++-
 src/qemu/qemu_driver.c           |  2 +-
 src/remote_protocol-structs      |  8 ++++++++
 src/test/test_driver.c           | 13 +++++++++++--
 src/uml/uml_driver.c             | 12 ++++++++++--
 src/vbox/vbox_common.c           | 11 ++++++++++-
 src/vmware/vmware_driver.c       | 10 +++++++++-
 src/xen/xen_driver.c             | 12 ++++++++++--
 src/xenapi/xenapi_driver.c       | 11 ++++++++++-
 14 files changed, 127 insertions(+), 20 deletions(-)

diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 664e631..f6d5d5e 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -485,7 +485,7 @@ bhyveDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
 }
 
 static virDomainPtr
-bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
+bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     bhyveConnPtr privconn = conn->privateData;
     virDomainPtr dom = NULL;
@@ -495,6 +495,8 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
     virObjectEventPtr event = NULL;
     virCapsPtr caps = NULL;
 
+    virCheckFlags(0, NULL);
+
     caps = bhyveDriverGetCapabilities(privconn);
     if (!caps)
         return NULL;
@@ -504,7 +506,7 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
                                        VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
 
-    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
     if (bhyveDomainAssignAddresses(def, NULL) < 0)
@@ -546,6 +548,11 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
     return dom;
 }
 
+static virDomainPtr bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return bhyveDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static int
 bhyveDomainUndefine(virDomainPtr domain)
 {
@@ -1438,6 +1445,7 @@ static virHypervisorDriver bhyveDriver = {
     .domainLookupByName = bhyveDomainLookupByName, /* 1.2.2 */
     .domainLookupByID = bhyveDomainLookupByID, /* 1.2.3 */
     .domainDefineXML = bhyveDomainDefineXML, /* 1.2.2 */
+    .domainDefineXMLFlags = bhyveDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = bhyveDomainUndefine, /* 1.2.2 */
     .domainGetXMLDesc = bhyveDomainGetXMLDesc, /* 1.2.2 */
     .domainIsActive = bhyveDomainIsActive, /* 1.2.2 */
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 1cbebb9..248bb92 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -3019,7 +3019,7 @@ esxDomainCreate(virDomainPtr domain)
 
 
 static virDomainPtr
-esxDomainDefineXML(virConnectPtr conn, const char *xml)
+esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     esxPrivate *priv = conn->privateData;
     virDomainDefPtr def = NULL;
@@ -3045,6 +3045,8 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainPtr domain = NULL;
     const char *src;
 
+    virCheckFlags(0, NULL);
+
     memset(&data, 0, sizeof(data));
 
     if (esxVI_EnsureSession(priv->primary) < 0)
@@ -3239,7 +3241,10 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml)
     return domain;
 }
 
-
+static virDomainPtr esxDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return esxDomainDefineXMLFlags(conn, xml, 0);
+}
 
 static int
 esxDomainUndefineFlags(virDomainPtr domain,
@@ -5183,6 +5188,7 @@ static virHypervisorDriver esxDriver = {
     .domainCreate = esxDomainCreate, /* 0.7.0 */
     .domainCreateWithFlags = esxDomainCreateWithFlags, /* 0.8.2 */
     .domainDefineXML = esxDomainDefineXML, /* 0.7.2 */
+    .domainDefineXMLFlags = esxDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = esxDomainUndefine, /* 0.7.1 */
     .domainUndefineFlags = esxDomainUndefineFlags, /* 0.9.4 */
     .domainGetAutostart = esxDomainGetAutostart, /* 0.9.0 */
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 8cbf3c0..9b049db 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2367,7 +2367,7 @@ libxlDomainCreate(virDomainPtr dom)
 }
 
 static virDomainPtr
-libxlDomainDefineXML(virConnectPtr conn, const char *xml)
+libxlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     libxlDriverPrivatePtr driver = conn->privateData;
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
@@ -2377,12 +2377,14 @@ libxlDomainDefineXML(virConnectPtr conn, const char *xml)
     virObjectEventPtr event = NULL;
     virDomainDefPtr oldDef = NULL;
 
+    virCheckFlags(0, NULL);
+
     if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
                                         1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
-    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains, def,
@@ -2421,6 +2423,11 @@ libxlDomainDefineXML(virConnectPtr conn, const char *xml)
     return dom;
 }
 
+static virDomainPtr libxlDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return libxlDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static int
 libxlDomainUndefineFlags(virDomainPtr dom,
                          unsigned int flags)
@@ -4778,6 +4785,7 @@ static virHypervisorDriver libxlDriver = {
     .domainCreate = libxlDomainCreate, /* 0.9.0 */
     .domainCreateWithFlags = libxlDomainCreateWithFlags, /* 0.9.0 */
     .domainDefineXML = libxlDomainDefineXML, /* 0.9.0 */
+    .domainDefineXMLFlags = libxlDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = libxlDomainUndefine, /* 0.9.0 */
     .domainUndefineFlags = libxlDomainUndefineFlags, /* 0.9.4 */
     .domainAttachDevice = libxlDomainAttachDevice, /* 0.9.2 */
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index cf2a3c8..a9a34b5 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -443,7 +443,8 @@ static int lxcConnectNumOfDefinedDomains(virConnectPtr conn)
 
 
 
-static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
+static virDomainPtr
+lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     virLXCDriverPtr driver = conn->privateData;
     virDomainDefPtr def = NULL;
@@ -454,6 +455,8 @@ static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
     virCapsPtr caps = NULL;
 
+    virCheckFlags(0, NULL);
+
     if (!(caps = virLXCDriverGetCapabilities(driver, false)))
         goto cleanup;
 
@@ -462,7 +465,7 @@ static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
-    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
     if (virSecurityManagerVerify(driver->securityManager, def) < 0)
@@ -510,6 +513,11 @@ static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
     return dom;
 }
 
+static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return lxcDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static int lxcDomainUndefineFlags(virDomainPtr dom,
                                   unsigned int flags)
 {
@@ -5761,6 +5769,7 @@ static virHypervisorDriver lxcDriver = {
     .domainCreateWithFlags = lxcDomainCreateWithFlags, /* 0.8.2 */
     .domainCreateWithFiles = lxcDomainCreateWithFiles, /* 1.1.1 */
     .domainDefineXML = lxcDomainDefineXML, /* 0.4.2 */
+    .domainDefineXMLFlags = lxcDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = lxcDomainUndefine, /* 0.4.2 */
     .domainUndefineFlags = lxcDomainUndefineFlags, /* 0.9.4 */
     .domainAttachDevice = lxcDomainAttachDevice, /* 1.0.1 */
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index d9e27a1..69bb38c 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -969,13 +969,15 @@ openvzDomainSetNetworkConfig(virConnectPtr conn,
 
 
 static virDomainPtr
-openvzDomainDefineXML(virConnectPtr conn, const char *xml)
+openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     struct openvz_driver *driver =  conn->privateData;
     virDomainDefPtr vmdef = NULL;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
 
+    virCheckFlags(0, NULL);
+
     openvzDriverLock(driver);
     if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
                                          1 << VIR_DOMAIN_VIRT_OPENVZ,
@@ -1051,6 +1053,11 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
     return dom;
 }
 
+static virDomainPtr openvzDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return openvzDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static virDomainPtr
 openvzDomainCreateXML(virConnectPtr conn, const char *xml,
                       unsigned int flags)
@@ -2588,6 +2595,7 @@ static virHypervisorDriver openvzDriver = {
     .domainCreate = openvzDomainCreate, /* 0.3.1 */
     .domainCreateWithFlags = openvzDomainCreateWithFlags, /* 0.8.2 */
     .domainDefineXML = openvzDomainDefineXML, /* 0.3.3 */
+    .domainDefineXMLFlags = openvzDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = openvzDomainUndefine, /* 0.3.3 */
     .domainUndefineFlags = openvzDomainUndefineFlags, /* 0.9.4 */
     .domainGetAutostart = openvzDomainGetAutostart, /* 0.4.6 */
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 808dc4a..a7b8cbc 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -2288,13 +2288,15 @@ parallelsCreateCt(virConnectPtr conn ATTRIBUTE_UNUSED, virDomainDefPtr def)
 }
 
 static virDomainPtr
-parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
+parallelsDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     parallelsConnPtr privconn = conn->privateData;
     virDomainPtr ret = NULL;
     virDomainDefPtr def;
     virDomainObjPtr olddom = NULL;
 
+    virCheckFlags(0, NULL);
+
     parallelsDriverLock(privconn);
     if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
                                        1 << VIR_DOMAIN_VIRT_PARALLELS,
@@ -2345,6 +2347,12 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
     return ret;
 }
 
+static virDomainPtr parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return parallelsDomainDefineXMLFlags(conn, xml, 0);
+}
+
+
 static int
 parallelsNodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED,
                      virNodeInfoPtr nodeinfo)
@@ -2494,6 +2502,7 @@ static virHypervisorDriver parallelsDriver = {
     .domainShutdown = parallelsDomainShutdown, /* 0.10.0 */
     .domainCreate = parallelsDomainCreate,    /* 0.10.0 */
     .domainDefineXML = parallelsDomainDefineXML,      /* 0.10.0 */
+    .domainDefineXMLFlags = parallelsDomainDefineXMLFlags,      /* 1.2.11 */
     .nodeGetCPUMap = parallelsNodeGetCPUMap, /* 1.2.8 */
     .connectIsEncrypted = parallelsConnectIsEncrypted, /* 1.2.5 */
     .connectIsSecure = parallelsConnectIsSecure, /* 1.2.5 */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a877b75..654fa2e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6675,7 +6675,7 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
-    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
     if (virSecurityManagerVerify(driver->securityManager, def) < 0)
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 362baf9..32bc047 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -686,6 +686,13 @@ struct remote_domain_define_xml_args {
 struct remote_domain_define_xml_ret {
         remote_nonnull_domain      dom;
 };
+struct remote_domain_define_xml_flags_args {
+        remote_nonnull_string      xml;
+        u_int                      flags;
+};
+struct remote_domain_define_xml_flags_ret {
+        remote_nonnull_domain      dom;
+};
 struct remote_domain_undefine_args {
         remote_nonnull_domain      dom;
 };
@@ -2927,4 +2934,5 @@ enum remote_procedure {
         REMOTE_PROC_DOMAIN_BLOCK_COPY = 345,
         REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE = 346,
         REMOTE_PROC_NODE_ALLOC_PAGES = 347,
+        REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS = 348,
 };
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index d7844bd..4469ad5 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2927,8 +2927,9 @@ static int testConnectListDefinedDomains(virConnectPtr conn,
     return n;
 }
 
-static virDomainPtr testDomainDefineXML(virConnectPtr conn,
-                                        const char *xml)
+static virDomainPtr testDomainDefineXMLFlags(virConnectPtr conn,
+                                             const char *xml,
+                                             unsigned int flags)
 {
     testConnPtr privconn = conn->privateData;
     virDomainPtr ret = NULL;
@@ -2937,6 +2938,8 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
     virObjectEventPtr event = NULL;
     virDomainDefPtr oldDef = NULL;
 
+    virCheckFlags(0, NULL);
+
     testDriverLock(privconn);
     if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
                                        1 << VIR_DOMAIN_VIRT_TEST,
@@ -2975,6 +2978,11 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
     return ret;
 }
 
+static virDomainPtr testDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return testDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static char *testDomainGetMetadata(virDomainPtr dom,
                                    int type,
                                    const char *uri,
@@ -7372,6 +7380,7 @@ static virHypervisorDriver testDriver = {
     .domainCreate = testDomainCreate, /* 0.1.11 */
     .domainCreateWithFlags = testDomainCreateWithFlags, /* 0.8.2 */
     .domainDefineXML = testDomainDefineXML, /* 0.1.11 */
+    .domainDefineXMLFlags = testDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = testDomainUndefine, /* 0.1.11 */
     .domainUndefineFlags = testDomainUndefineFlags, /* 0.9.4 */
     .domainGetAutostart = testDomainGetAutostart, /* 0.3.2 */
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index b01d631..d15b55a 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2075,20 +2075,23 @@ static int umlDomainCreate(virDomainPtr dom)
     return umlDomainCreateWithFlags(dom, 0);
 }
 
-static virDomainPtr umlDomainDefineXML(virConnectPtr conn, const char *xml)
+static virDomainPtr
+umlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     struct uml_driver *driver = conn->privateData;
     virDomainDefPtr def;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
 
+    virCheckFlags(0, NULL);
+
     umlDriverLock(driver);
     if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
                                         1 << VIR_DOMAIN_VIRT_UML,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
-    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains, def,
@@ -2117,6 +2120,11 @@ static virDomainPtr umlDomainDefineXML(virConnectPtr conn, const char *xml)
     return dom;
 }
 
+static virDomainPtr umlDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return umlDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static int umlDomainUndefineFlags(virDomainPtr dom,
                                   unsigned int flags)
 {
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index bffec82..322353f 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -1831,7 +1831,8 @@ vboxAttachSharedFolder(virDomainDefPtr def, vboxGlobalData *data, IMachine *mach
     }
 }
 
-static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml)
+static virDomainPtr
+vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     vboxGlobalData *data = conn->privateData;
     IMachine       *machine     = NULL;
@@ -1842,6 +1843,8 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml)
     char uuidstr[VIR_UUID_STRING_BUFLEN];
     virDomainPtr ret = NULL;
 
+    virCheckFlags(0, NULL);
+
     if (!data->vboxObj)
         return ret;
 
@@ -1968,6 +1971,11 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml)
     return NULL;
 }
 
+static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return vboxDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static void
 detachDevices_common(vboxGlobalData *data, vboxIIDUnion *iidu)
 {
@@ -7609,6 +7617,7 @@ virHypervisorDriver vboxCommonDriver = {
     .domainCreate = vboxDomainCreate, /* 0.6.3 */
     .domainCreateWithFlags = vboxDomainCreateWithFlags, /* 0.8.2 */
     .domainDefineXML = vboxDomainDefineXML, /* 0.6.3 */
+    .domainDefineXMLFlags = vboxDomainDefineXMLFlags, /* 1.2.11*/
     .domainUndefine = vboxDomainUndefine, /* 0.6.3 */
     .domainUndefineFlags = vboxDomainUndefineFlags, /* 0.9.5 */
     .domainAttachDevice = vboxDomainAttachDevice, /* 0.6.3 */
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 5379876..4ee9526 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -358,7 +358,7 @@ vmwareStartVM(struct vmware_driver *driver, virDomainObjPtr vm)
 }
 
 static virDomainPtr
-vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
+vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     struct vmware_driver *driver = conn->privateData;
     virDomainDefPtr vmdef = NULL;
@@ -371,6 +371,8 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
     vmwareDomainPtr pDomain = NULL;
     virVMXContext ctx;
 
+    virCheckFlags(0, NULL);
+
     ctx.formatFileName = vmwareCopyVMXFileName;
 
     vmwareDriverLock(driver);
@@ -427,6 +429,11 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
     return dom;
 }
 
+static virDomainPtr vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return vmwareDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static int
 vmwareDomainShutdownFlags(virDomainPtr dom,
                           unsigned int flags)
@@ -1211,6 +1218,7 @@ static virHypervisorDriver vmwareDriver = {
     .domainCreate = vmwareDomainCreate, /* 0.8.7 */
     .domainCreateWithFlags = vmwareDomainCreateWithFlags, /* 0.8.7 */
     .domainDefineXML = vmwareDomainDefineXML, /* 0.8.7 */
+    .domainDefineXMLFlags = vmwareDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = vmwareDomainUndefine, /* 0.8.7 */
     .domainUndefineFlags = vmwareDomainUndefineFlags, /* 0.9.4 */
     .domainIsActive = vmwareDomainIsActive, /* 0.8.7 */
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 7334142..1897584 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -1882,18 +1882,20 @@ xenUnifiedDomainCreate(virDomainPtr dom)
 }
 
 static virDomainPtr
-xenUnifiedDomainDefineXML(virConnectPtr conn, const char *xml)
+xenUnifiedDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     xenUnifiedPrivatePtr priv = conn->privateData;
     virDomainDefPtr def = NULL;
     virDomainPtr ret = NULL;
 
+    virCheckFlags(0, NULL);
+
     if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
                                         1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
-    if (virDomainDefineXMLEnsureACL(conn, def) < 0)
+    if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
     if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) {
@@ -1915,6 +1917,11 @@ xenUnifiedDomainDefineXML(virConnectPtr conn, const char *xml)
     return ret;
 }
 
+static virDomainPtr xenUnifiedDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return xenUnifiedDomainDefineXMLFlags(conn, xml, 0);
+}
+
 static int
 xenUnifiedDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
 {
@@ -2796,6 +2803,7 @@ static virHypervisorDriver xenUnifiedDriver = {
     .domainCreate = xenUnifiedDomainCreate, /* 0.1.1 */
     .domainCreateWithFlags = xenUnifiedDomainCreateWithFlags, /* 0.8.2 */
     .domainDefineXML = xenUnifiedDomainDefineXML, /* 0.1.1 */
+    .domainDefineXMLFlags = xenUnifiedDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = xenUnifiedDomainUndefine, /* 0.1.1 */
     .domainUndefineFlags = xenUnifiedDomainUndefineFlags, /* 0.9.4 */
     .domainAttachDevice = xenUnifiedDomainAttachDevice, /* 0.1.9 */
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 7048556..b659c0a 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1714,12 +1714,15 @@ xenapiDomainCreate(virDomainPtr dom)
  * Returns 0 on success or -1 in case of error
  */
 static virDomainPtr
-xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
+xenapiDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     struct _xenapiPrivate *priv = conn->privateData;
     xen_vm_record *record = NULL;
     xen_vm vm = NULL;
     virDomainPtr domP = NULL;
+
+    virCheckFlags(0, NULL);
+
     if (!priv->caps)
         return NULL;
     virDomainDefPtr defPtr = virDomainDefParseString(xml,
@@ -1752,6 +1755,11 @@ xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
     return domP;
 }
 
+static virDomainPtr xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+    return xenapiDomainDefineXMLFlags(conn, xml, 0);
+}
+
 /*
  * xenapiDomainUndefineFlags
  *
@@ -2002,6 +2010,7 @@ static virHypervisorDriver xenapiDriver = {
     .domainCreate = xenapiDomainCreate, /* 0.8.0 */
     .domainCreateWithFlags = xenapiDomainCreateWithFlags, /* 0.8.2 */
     .domainDefineXML = xenapiDomainDefineXML, /* 0.8.0 */
+    .domainDefineXMLFlags = xenapiDomainDefineXMLFlags, /* 1.2.11 */
     .domainUndefine = xenapiDomainUndefine, /* 0.8.0 */
     .domainUndefineFlags = xenapiDomainUndefineFlags, /* 0.9.5 */
     .domainGetAutostart = xenapiDomainGetAutostart, /* 0.8.0 */
-- 
2.1.0


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