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 | 12 ++++++++++--
src/test/test_driver.c | 13 +++++++++++--
src/uml/uml_driver.c | 13 +++++++++++--
src/vbox/vbox_common.c | 11 ++++++++++-
src/vmware/vmware_driver.c | 10 +++++++++-
src/xen/xen_driver.c | 12 ++++++++++--
src/xenapi/xenapi_driver.c | 11 ++++++++++-
13 files changed, 129 insertions(+), 21 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 664e631..601ad71 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.12 */
.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 e45ae2d..9a47270 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.12 */
.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 4135670..3e0df84 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2383,7 +2383,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);
@@ -2393,12 +2393,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,
@@ -2437,6 +2439,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)
@@ -4799,6 +4806,7 @@ static virHypervisorDriver libxlDriver = {
.domainCreate = libxlDomainCreate, /* 0.9.0 */
.domainCreateWithFlags = libxlDomainCreateWithFlags, /* 0.9.0 */
.domainDefineXML = libxlDomainDefineXML, /* 0.9.0 */
+ .domainDefineXMLFlags = libxlDomainDefineXMLFlags, /* 1.2.12 */
.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 51c664f..70f0e53 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -444,7 +444,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;
@@ -455,6 +456,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;
@@ -463,7 +466,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)
@@ -511,6 +514,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)
{
@@ -5745,6 +5753,7 @@ static virHypervisorDriver lxcDriver = {
.domainCreateWithFlags = lxcDomainCreateWithFlags, /* 0.8.2 */
.domainCreateWithFiles = lxcDomainCreateWithFiles, /* 1.1.1 */
.domainDefineXML = lxcDomainDefineXML, /* 0.4.2 */
+ .domainDefineXMLFlags = lxcDomainDefineXMLFlags, /* 1.2.12 */
.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 c144eca..b6ea7bb 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -974,13 +974,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,
@@ -1056,6 +1058,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)
@@ -2593,6 +2600,7 @@ static virHypervisorDriver openvzDriver = {
.domainCreate = openvzDomainCreate, /* 0.3.1 */
.domainCreateWithFlags = openvzDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = openvzDomainDefineXML, /* 0.3.3 */
+ .domainDefineXMLFlags = openvzDomainDefineXMLFlags, /* 1.2.12 */
.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 08d2e30..f83b504 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -658,13 +658,15 @@ parallelsDomainGetAutostart(virDomainPtr domain, int *autostart)
}
static virDomainPtr
-parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
+parallelsDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
{
parallelsConnPtr privconn = conn->privateData;
virDomainPtr retdom = NULL;
virDomainDefPtr def;
virDomainObjPtr olddom = NULL;
+ virCheckFlags(0, NULL);
+
parallelsDriverLock(privconn);
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_PARALLELS,
@@ -712,6 +714,12 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
return retdom;
}
+static virDomainPtr parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+ return parallelsDomainDefineXMLFlags(conn, xml, 0);
+}
+
+
static int
parallelsNodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED,
virNodeInfoPtr nodeinfo)
@@ -973,6 +981,7 @@ static virHypervisorDriver parallelsDriver = {
.domainCreate = parallelsDomainCreate, /* 0.10.0 */
.domainCreateWithFlags = parallelsDomainCreateWithFlags, /* 1.2.10 */
.domainDefineXML = parallelsDomainDefineXML, /* 0.10.0 */
+ .domainDefineXMLFlags = parallelsDomainDefineXMLFlags, /* 1.2.12 */
.domainUndefine = parallelsDomainUndefine, /* 1.2.10 */
.domainUndefineFlags = parallelsDomainUndefineFlags, /* 1.2.10 */
.domainIsActive = parallelsDomainIsActive, /* 1.2.10 */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index cdf4173..efaed81 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6663,7 +6663,7 @@ qemuDomainCreate(virDomainPtr dom)
return qemuDomainCreateWithFlags(dom, 0);
}
-static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml)
+static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
@@ -6675,6 +6675,8 @@ static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const
char *xml)
virQEMUDriverConfigPtr cfg;
virCapsPtr caps = NULL;
+ virCheckFlags(0, NULL);
+
cfg = virQEMUDriverGetConfig(driver);
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
@@ -6685,7 +6687,7 @@ static virDomainPtr qemuDomainDefineXML(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)
@@ -6756,6 +6758,11 @@ static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const
char *xml)
return dom;
}
+static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml)
+{
+ return qemuDomainDefineXMLFlags(conn, xml, 0);
+}
+
static int
qemuDomainUndefineFlags(virDomainPtr dom,
unsigned int flags)
@@ -18892,6 +18899,7 @@ static virHypervisorDriver qemuDriver = {
.domainCreate = qemuDomainCreate, /* 0.2.0 */
.domainCreateWithFlags = qemuDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = qemuDomainDefineXML, /* 0.2.0 */
+ .domainDefineXMLFlags = qemuDomainDefineXMLFlags, /* 1.2.12 */
.domainUndefine = qemuDomainUndefine, /* 0.2.0 */
.domainUndefineFlags = qemuDomainUndefineFlags, /* 0.9.4 */
.domainAttachDevice = qemuDomainAttachDevice, /* 0.4.1 */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 4b7fea1..44288ce 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.12 */
.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..6b0cb0d 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)
{
@@ -2958,6 +2966,7 @@ static virHypervisorDriver umlDriver = {
.domainCreate = umlDomainCreate, /* 0.5.0 */
.domainCreateWithFlags = umlDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = umlDomainDefineXML, /* 0.5.0 */
+ .domainDefineXMLFlags = umlDomainDefineXMLFlags, /* 1.2.12 */
.domainUndefine = umlDomainUndefine, /* 0.5.0 */
.domainUndefineFlags = umlDomainUndefineFlags, /* 0.9.4 */
.domainAttachDevice = umlDomainAttachDevice, /* 0.8.4 */
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 7887a8b..7b96321 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -1840,7 +1840,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;
@@ -1851,6 +1852,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;
@@ -1978,6 +1981,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)
{
@@ -7617,6 +7625,7 @@ virHypervisorDriver vboxCommonDriver = {
.domainCreate = vboxDomainCreate, /* 0.6.3 */
.domainCreateWithFlags = vboxDomainCreateWithFlags, /* 0.8.2 */
.domainDefineXML = vboxDomainDefineXML, /* 0.6.3 */
+ .domainDefineXMLFlags = vboxDomainDefineXMLFlags, /* 1.2.12 */
.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..933bc0a 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.12 */
.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 c9f4159..49fb50f 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.12 */
.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..fbb2f23 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.12 */
.domainUndefine = xenapiDomainUndefine, /* 0.8.0 */
.domainUndefineFlags = xenapiDomainUndefineFlags, /* 0.9.5 */
.domainGetAutostart = xenapiDomainGetAutostart, /* 0.8.0 */
--
2.1.0