This patch is the result of running:
for i in $(git ls-files | grep -v html | grep -v \.po$ ); do
sed -i -e "s/virDomainXMLConf/virDomainXMLOption/g" -e
"s/xmlconf/xmlopt/g" $i
done
---
Notes:
Version 5:
- new in series
- suggested by Eric, I decided to do it after the series to avoid touching the
other patches. Justification is that it anyways changes code that is already pushed.
src/conf/domain_conf.c | 218 ++++++++++++++++++-------------------
src/conf/domain_conf.h | 40 +++----
src/conf/snapshot_conf.c | 4 +-
src/conf/snapshot_conf.h | 2 +-
src/esx/esx_driver.c | 18 +--
src/esx/esx_private.h | 2 +-
src/libvirt_private.syms | 4 +-
src/libxl/libxl_conf.h | 2 +-
src/libxl/libxl_driver.c | 44 ++++----
src/lxc/lxc_conf.c | 4 +-
src/lxc/lxc_conf.h | 4 +-
src/lxc/lxc_controller.c | 8 +-
src/lxc/lxc_driver.c | 42 +++----
src/lxc/lxc_process.c | 8 +-
src/openvz/openvz_conf.c | 4 +-
src/openvz/openvz_conf.h | 2 +-
src/openvz/openvz_driver.c | 16 +--
src/parallels/parallels_driver.c | 10 +-
src/parallels/parallels_utils.h | 2 +-
src/phyp/phyp_driver.c | 6 +-
src/phyp/phyp_driver.h | 2 +-
src/qemu/qemu_command.c | 26 ++---
src/qemu/qemu_command.h | 6 +-
src/qemu/qemu_conf.c | 4 +-
src/qemu/qemu_conf.h | 4 +-
src/qemu/qemu_domain.c | 4 +-
src/qemu/qemu_driver.c | 112 +++++++++----------
src/qemu/qemu_migration.c | 16 +--
src/qemu/qemu_process.c | 34 +++---
src/security/virt-aa-helper.c | 8 +-
src/test/test_driver.c | 40 +++----
src/uml/uml_conf.h | 2 +-
src/uml/uml_driver.c | 24 ++--
src/vbox/vbox_tmpl.c | 18 +--
src/vmware/vmware_conf.c | 6 +-
src/vmware/vmware_conf.h | 2 +-
src/vmware/vmware_driver.c | 20 ++--
src/vmx/vmx.c | 28 ++---
src/vmx/vmx.h | 8 +-
src/xen/xen_driver.c | 10 +-
src/xen/xen_driver.h | 4 +-
src/xen/xend_internal.c | 10 +-
src/xen/xm_internal.c | 6 +-
src/xenapi/xenapi_driver.c | 10 +-
src/xenapi/xenapi_driver_private.h | 2 +-
tests/domainsnapshotxml2xmltest.c | 6 +-
tests/lxcxml2xmltest.c | 8 +-
tests/qemuargv2xmltest.c | 6 +-
tests/qemumonitorjsontest.c | 28 ++---
tests/qemumonitortestutils.c | 4 +-
tests/qemumonitortestutils.h | 2 +-
tests/qemuxml2argvtest.c | 6 +-
tests/qemuxml2xmltest.c | 6 +-
tests/qemuxmlnstest.c | 6 +-
tests/securityselinuxlabeltest.c | 6 +-
tests/testutilsqemu.h | 2 +-
tests/vmx2xmltest.c | 8 +-
tests/xmconfigtest.c | 8 +-
tests/xml2sexprtest.c | 8 +-
tests/xml2vmxtest.c | 10 +-
60 files changed, 480 insertions(+), 480 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2d555e1..3dd43f3 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -70,7 +70,7 @@ struct _virDomainObjList {
/* This structure holds various callbacks and data needed
* while parsing and creating domain XMLs */
-struct _virDomainXMLConf {
+struct _virDomainXMLOption {
virObject parent;
/* XML parser callbacks and defaults */
@@ -724,10 +724,10 @@ VIR_ENUM_IMPL(virDomainRNGBackend,
static virClassPtr virDomainObjClass;
static virClassPtr virDomainObjListClass;
-static virClassPtr virDomainXMLConfClass;
+static virClassPtr virDomainXMLOptionClass;
static void virDomainObjDispose(void *obj);
static void virDomainObjListDispose(void *obj);
-static void virDomainXMLConfClassDispose(void *obj);
+static void virDomainXMLOptionClassDispose(void *obj);
static int virDomainObjOnceInit(void)
{
@@ -743,10 +743,10 @@ static int virDomainObjOnceInit(void)
virDomainObjListDispose)))
return -1;
- if (!(virDomainXMLConfClass = virClassNew(virClassForObject(),
- "virDomainXMLConf",
- sizeof(virDomainXMLConf),
- virDomainXMLConfClassDispose)))
+ if (!(virDomainXMLOptionClass = virClassNew(virClassForObject(),
+ "virDomainXMLOption",
+ sizeof(virDomainXMLOption),
+ virDomainXMLOptionClassDispose)))
return -1;
return 0;
@@ -756,69 +756,69 @@ VIR_ONCE_GLOBAL_INIT(virDomainObj)
static void
-virDomainXMLConfClassDispose(void *obj)
+virDomainXMLOptionClassDispose(void *obj)
{
- virDomainXMLConfPtr xmlconf = obj;
+ virDomainXMLOptionPtr xmlopt = obj;
- if (xmlconf->config.privFree)
- (xmlconf->config.privFree)(xmlconf->config.priv);
+ if (xmlopt->config.privFree)
+ (xmlopt->config.privFree)(xmlopt->config.priv);
}
/**
- * virDomainXMLConfNew:
+ * virDomainXMLOptionNew:
*
* Allocate a new domain XML configuration
*/
-virDomainXMLConfPtr
-virDomainXMLConfNew(virDomainDefParserConfigPtr config,
+virDomainXMLOptionPtr
+virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
virDomainXMLPrivateDataCallbacksPtr priv,
virDomainXMLNamespacePtr xmlns)
{
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
if (virDomainObjInitialize() < 0)
return NULL;
- if (!(xmlconf = virObjectNew(virDomainXMLConfClass)))
+ if (!(xmlopt = virObjectNew(virDomainXMLOptionClass)))
return NULL;
if (priv)
- xmlconf->privateData = *priv;
+ xmlopt->privateData = *priv;
if (config)
- xmlconf->config = *config;
+ xmlopt->config = *config;
if (xmlns)
- xmlconf->ns = *xmlns;
+ xmlopt->ns = *xmlns;
/* Technically this forbids to use one of Xerox's MAC address prefixes in
* our hypervisor drivers. This shouldn't ever be a problem.
*
* Use the KVM prefix as default as it's in the privately administered
* range */
- if (xmlconf->config.macPrefix[0] == 0 &&
- xmlconf->config.macPrefix[1] == 0 &&
- xmlconf->config.macPrefix[2] == 0) {
- xmlconf->config.macPrefix[0] = 0x52;
- xmlconf->config.macPrefix[1] = 0x54;
+ if (xmlopt->config.macPrefix[0] == 0 &&
+ xmlopt->config.macPrefix[1] == 0 &&
+ xmlopt->config.macPrefix[2] == 0) {
+ xmlopt->config.macPrefix[0] = 0x52;
+ xmlopt->config.macPrefix[1] = 0x54;
}
- return xmlconf;
+ return xmlopt;
}
/**
- * virDomainXMLConfGetNamespace:
+ * virDomainXMLOptionGetNamespace:
*
- * @xmlconf: XML parser configuration object
+ * @xmlopt: XML parser configuration object
*
* Returns a pointer to the stored namespace structure.
- * The lifetime of the pointer is equal to @xmlconf;
+ * The lifetime of the pointer is equal to @xmlopt;
*/
virDomainXMLNamespacePtr
-virDomainXMLConfGetNamespace(virDomainXMLConfPtr xmlconf)
+virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
{
- return &xmlconf->ns;
+ return &xmlopt->ns;
}
@@ -1932,7 +1932,7 @@ static void virDomainObjDispose(void *obj)
}
virDomainObjPtr
-virDomainObjNew(virDomainXMLConfPtr xmlconf)
+virDomainObjNew(virDomainXMLOptionPtr xmlopt)
{
virDomainObjPtr domain;
@@ -1942,12 +1942,12 @@ virDomainObjNew(virDomainXMLConfPtr xmlconf)
if (!(domain = virObjectLockableNew(virDomainObjClass)))
return NULL;
- if (xmlconf->privateData.alloc) {
- if (!(domain->privateData = (xmlconf->privateData.alloc)())) {
+ if (xmlopt->privateData.alloc) {
+ if (!(domain->privateData = (xmlopt->privateData.alloc)())) {
virReportOOMError();
goto error;
}
- domain->privateDataFreeFunc = xmlconf->privateData.free;
+ domain->privateDataFreeFunc = xmlopt->privateData.free;
}
if (!(domain->snapshots = virDomainSnapshotObjListNew()))
@@ -2014,7 +2014,7 @@ void virDomainObjAssignDef(virDomainObjPtr domain,
static virDomainObjPtr
virDomainObjListAddLocked(virDomainObjListPtr doms,
const virDomainDefPtr def,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int flags,
virDomainDefPtr *oldDef)
{
@@ -2063,7 +2063,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
goto error;
}
- if (!(vm = virDomainObjNew(xmlconf)))
+ if (!(vm = virDomainObjNew(xmlopt)))
goto cleanup;
vm->def = def;
@@ -2085,14 +2085,14 @@ error:
virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
const virDomainDefPtr def,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int flags,
virDomainDefPtr *oldDef)
{
virDomainObjPtr ret;
virObjectLock(doms);
- ret = virDomainObjListAddLocked(doms, def, xmlconf, flags, oldDef);
+ ret = virDomainObjListAddLocked(doms, def, xmlopt, flags, oldDef);
virObjectUnlock(doms);
return ret;
}
@@ -2111,7 +2111,7 @@ virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
*/
int
virDomainObjSetDefTransient(virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain,
bool live)
{
@@ -2126,7 +2126,7 @@ virDomainObjSetDefTransient(virCapsPtr caps,
if (domain->newDef)
return 0;
- if (!(domain->newDef = virDomainDefCopy(domain->def, caps, xmlconf, false)))
+ if (!(domain->newDef = virDomainDefCopy(domain->def, caps, xmlopt, false)))
goto out;
ret = 0;
@@ -2144,10 +2144,10 @@ out:
*/
virDomainDefPtr
virDomainObjGetPersistentDef(virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain)
{
- if (virDomainObjSetDefTransient(caps, xmlconf, domain, false) < 0)
+ if (virDomainObjSetDefTransient(caps, xmlopt, domain, false) < 0)
return NULL;
if (domain->newDef)
@@ -2165,7 +2165,7 @@ virDomainObjGetPersistentDef(virCapsPtr caps,
*/
int
virDomainLiveConfigHelperMethod(virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
virDomainObjPtr dom,
unsigned int *flags,
virDomainDefPtr *persistentDef)
@@ -2196,7 +2196,7 @@ virDomainLiveConfigHelperMethod(virCapsPtr caps,
"transient domain"));
goto cleanup;
}
- if (!(*persistentDef = virDomainObjGetPersistentDef(caps, xmlconf, dom))) {
+ if (!(*persistentDef = virDomainObjGetPersistentDef(caps, xmlopt, dom))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Get persistent config failed"));
goto cleanup;
@@ -2611,13 +2611,13 @@ static int
virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
virDomainDefPtr def,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf)
+ virDomainXMLOptionPtr xmlopt)
{
int ret;
- if (xmlconf && xmlconf->config.devicesPostParseCallback) {
- ret = xmlconf->config.devicesPostParseCallback(dev, def, caps,
- xmlconf->config.priv);
+ if (xmlopt && xmlopt->config.devicesPostParseCallback) {
+ ret = xmlopt->config.devicesPostParseCallback(dev, def, caps,
+ xmlopt->config.priv);
if (ret < 0)
return ret;
}
@@ -2632,7 +2632,7 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
struct virDomainDefPostParseDeviceIteratorData {
virDomainDefPtr def;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
};
@@ -2643,26 +2643,26 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def
ATTRIBUTE_UNUSED,
void *opaque)
{
struct virDomainDefPostParseDeviceIteratorData *data = opaque;
- return virDomainDeviceDefPostParse(dev, data->def, data->caps,
data->xmlconf);
+ return virDomainDeviceDefPostParse(dev, data->def, data->caps,
data->xmlopt);
}
static int
virDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf)
+ virDomainXMLOptionPtr xmlopt)
{
int ret;
struct virDomainDefPostParseDeviceIteratorData data = {
.def = def,
.caps = caps,
- .xmlconf = xmlconf,
+ .xmlopt = xmlopt,
};
/* call the domain config callback */
- if (xmlconf && xmlconf->config.domainPostParseCallback) {
- ret = xmlconf->config.domainPostParseCallback(def, caps,
- xmlconf->config.priv);
+ if (xmlopt && xmlopt->config.domainPostParseCallback) {
+ ret = xmlopt->config.domainPostParseCallback(def, caps,
+ xmlopt->config.priv);
if (ret < 0)
return ret;
}
@@ -3710,7 +3710,7 @@ virDomainDiskFindByBusAndDst(virDomainDefPtr def,
}
int
-virDomainDiskDefAssignAddress(virDomainXMLConfPtr xmlconf,
+virDomainDiskDefAssignAddress(virDomainXMLOptionPtr xmlopt,
virDomainDiskDefPtr def)
{
int idx = virDiskNameToIndex(def->dst);
@@ -3725,7 +3725,7 @@ virDomainDiskDefAssignAddress(virDomainXMLConfPtr xmlconf,
case VIR_DOMAIN_DISK_BUS_SCSI:
def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE;
- if (xmlconf->config.hasWideScsiBus) {
+ if (xmlopt->config.hasWideScsiBus) {
/* For a wide SCSI bus we define the default mapping to be
* 16 units per bus, 1 bus per controller, many controllers.
* Unit 7 is the SCSI controller itself. Therefore unit 7
@@ -4164,7 +4164,7 @@ cleanup:
* @param node XML nodeset to parse for disk definition
*/
static virDomainDiskDefPtr
-virDomainDiskDefParseXML(virDomainXMLConfPtr xmlconf,
+virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
xmlXPathContextPtr ctxt,
virBitmapPtr bootMap,
@@ -4955,7 +4955,7 @@ virDomainDiskDefParseXML(virDomainXMLConfPtr xmlconf,
}
if (def->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE
- && virDomainDiskDefAssignAddress(xmlconf, def) < 0)
+ && virDomainDiskDefAssignAddress(xmlopt, def) < 0)
goto error;
cleanup:
@@ -5157,10 +5157,10 @@ cleanup:
void
-virDomainNetGenerateMAC(virDomainXMLConfPtr xmlconf,
+virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt,
virMacAddrPtr mac)
{
- virMacAddrGenerate(xmlconf->config.macPrefix, mac);
+ virMacAddrGenerate(xmlopt->config.macPrefix, mac);
}
@@ -5532,7 +5532,7 @@ error:
* @return 0 on success, -1 on failure
*/
static virDomainNetDefPtr
-virDomainNetDefParseXML(virDomainXMLConfPtr xmlconf,
+virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
xmlXPathContextPtr ctxt,
virBitmapPtr bootMap,
@@ -5717,7 +5717,7 @@ virDomainNetDefParseXML(virDomainXMLConfPtr xmlconf,
goto error;
}
} else {
- virDomainNetGenerateMAC(xmlconf, &def->mac);
+ virDomainNetGenerateMAC(xmlopt, &def->mac);
}
if (devaddr) {
@@ -8582,7 +8582,7 @@ virDomainDeviceDefPtr
virDomainDeviceDefParse(const char *xmlStr,
virDomainDefPtr def,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
xmlDocPtr xml;
@@ -8602,7 +8602,7 @@ virDomainDeviceDefParse(const char *xmlStr,
if (xmlStrEqual(node->name, BAD_CAST "disk")) {
dev->type = VIR_DOMAIN_DEVICE_DISK;
- if (!(dev->data.disk = virDomainDiskDefParseXML(xmlconf, node, ctxt,
+ if (!(dev->data.disk = virDomainDiskDefParseXML(xmlopt, node, ctxt,
NULL, def->seclabels,
def->nseclabels,
flags)))
@@ -8617,7 +8617,7 @@ virDomainDeviceDefParse(const char *xmlStr,
goto error;
} else if (xmlStrEqual(node->name, BAD_CAST "interface")) {
dev->type = VIR_DOMAIN_DEVICE_NET;
- if (!(dev->data.net = virDomainNetDefParseXML(xmlconf, node, ctxt,
+ if (!(dev->data.net = virDomainNetDefParseXML(xmlopt, node, ctxt,
NULL, flags)))
goto error;
} else if (xmlStrEqual(node->name, BAD_CAST "input")) {
@@ -8668,7 +8668,7 @@ virDomainDeviceDefParse(const char *xmlStr,
}
/* callback to fill driver specific device aspects */
- if (virDomainDeviceDefPostParse(dev, def, caps, xmlconf) < 0)
+ if (virDomainDeviceDefPostParse(dev, def, caps, xmlopt) < 0)
goto error;
cleanup:
@@ -9584,7 +9584,7 @@ virDomainDefParseXML(xmlDocPtr xml,
xmlNodePtr root,
xmlXPathContextPtr ctxt,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -10459,7 +10459,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto no_memory;
for (i = 0 ; i < n ; i++) {
- virDomainDiskDefPtr disk = virDomainDiskDefParseXML(xmlconf,
+ virDomainDiskDefPtr disk = virDomainDiskDefParseXML(xmlopt,
nodes[i],
ctxt,
bootMap,
@@ -10559,7 +10559,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (n && VIR_ALLOC_N(def->nets, n) < 0)
goto no_memory;
for (i = 0 ; i < n ; i++) {
- virDomainNetDefPtr net = virDomainNetDefParseXML(xmlconf,
+ virDomainNetDefPtr net = virDomainNetDefParseXML(xmlopt,
nodes[i],
ctxt,
bootMap,
@@ -11102,7 +11102,7 @@ virDomainDefParseXML(xmlDocPtr xml,
/* we have to make a copy of all of the callback pointers here since
* we won't have the virCaps structure available during free
*/
- def->ns = xmlconf->ns;
+ def->ns = xmlopt->ns;
if (def->ns.parse &&
(def->ns.parse)(xml, root, ctxt, &def->namespaceData) < 0)
@@ -11113,7 +11113,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
/* callback to fill driver specific domain aspects */
- if (virDomainDefPostParse(def, caps, xmlconf) < 0)
+ if (virDomainDefPostParse(def, caps, xmlopt) < 0)
goto error;
virBitmapFree(bootMap);
@@ -11135,7 +11135,7 @@ static virDomainObjPtr
virDomainObjParseXML(xmlDocPtr xml,
xmlXPathContextPtr ctxt,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -11149,7 +11149,7 @@ virDomainObjParseXML(xmlDocPtr xml,
int state;
int reason = 0;
- if (!(obj = virDomainObjNew(xmlconf)))
+ if (!(obj = virDomainObjNew(xmlopt)))
return NULL;
if (!(config = virXPathNode("./domain", ctxt))) {
@@ -11160,7 +11160,7 @@ virDomainObjParseXML(xmlDocPtr xml,
oldnode = ctxt->node;
ctxt->node = config;
- obj->def = virDomainDefParseXML(xml, config, ctxt, caps, xmlconf,
+ obj->def = virDomainDefParseXML(xml, config, ctxt, caps, xmlopt,
expectedVirtTypes, flags);
ctxt->node = oldnode;
if (!obj->def)
@@ -11217,8 +11217,8 @@ virDomainObjParseXML(xmlDocPtr xml,
}
VIR_FREE(nodes);
- if (xmlconf->privateData.parse &&
- ((xmlconf->privateData.parse)(ctxt, obj->privateData)) < 0)
+ if (xmlopt->privateData.parse &&
+ ((xmlopt->privateData.parse)(ctxt, obj->privateData)) < 0)
goto error;
return obj;
@@ -11234,7 +11234,7 @@ static virDomainDefPtr
virDomainDefParse(const char *xmlStr,
const char *filename,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -11244,7 +11244,7 @@ virDomainDefParse(const char *xmlStr,
if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) {
def = virDomainDefParseNode(xml, xmlDocGetRootElement(xml), caps,
- xmlconf, expectedVirtTypes, flags);
+ xmlopt, expectedVirtTypes, flags);
xmlFreeDoc(xml);
}
@@ -11255,22 +11255,22 @@ virDomainDefParse(const char *xmlStr,
virDomainDefPtr
virDomainDefParseString(const char *xmlStr,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
- return virDomainDefParse(xmlStr, NULL, caps, xmlconf,
+ return virDomainDefParse(xmlStr, NULL, caps, xmlopt,
expectedVirtTypes, flags);
}
virDomainDefPtr
virDomainDefParseFile(const char *filename,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
- return virDomainDefParse(NULL, filename, caps, xmlconf,
+ return virDomainDefParse(NULL, filename, caps, xmlopt,
expectedVirtTypes, flags);
}
@@ -11279,7 +11279,7 @@ virDomainDefPtr
virDomainDefParseNode(xmlDocPtr xml,
xmlNodePtr root,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -11301,7 +11301,7 @@ virDomainDefParseNode(xmlDocPtr xml,
}
ctxt->node = root;
- def = virDomainDefParseXML(xml, root, ctxt, caps, xmlconf,
+ def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt,
expectedVirtTypes, flags);
cleanup:
@@ -11314,7 +11314,7 @@ static virDomainObjPtr
virDomainObjParseNode(xmlDocPtr xml,
xmlNodePtr root,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -11335,7 +11335,7 @@ virDomainObjParseNode(xmlDocPtr xml,
}
ctxt->node = root;
- obj = virDomainObjParseXML(xml, ctxt, caps, xmlconf, expectedVirtTypes, flags);
+ obj = virDomainObjParseXML(xml, ctxt, caps, xmlopt, expectedVirtTypes, flags);
cleanup:
xmlXPathFreeContext(ctxt);
@@ -11346,7 +11346,7 @@ cleanup:
static virDomainObjPtr
virDomainObjParseFile(const char *filename,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -11356,7 +11356,7 @@ virDomainObjParseFile(const char *filename,
if ((xml = virXMLParseFile(filename))) {
obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
- caps, xmlconf,
+ caps, xmlopt,
expectedVirtTypes, flags);
xmlFreeDoc(xml);
}
@@ -15331,7 +15331,7 @@ virDomainDefFormat(virDomainDefPtr def, unsigned int flags)
static char *
-virDomainObjFormat(virDomainXMLConfPtr xmlconf,
+virDomainObjFormat(virDomainXMLOptionPtr xmlopt,
virDomainObjPtr obj,
unsigned int flags)
{
@@ -15352,8 +15352,8 @@ virDomainObjFormat(virDomainXMLConfPtr xmlconf,
virDomainTaintTypeToString(i));
}
- if (xmlconf->privateData.format &&
- ((xmlconf->privateData.format)(&buf, obj->privateData)) < 0)
+ if (xmlopt->privateData.format &&
+ ((xmlopt->privateData.format)(&buf, obj->privateData)) < 0)
goto error;
virBufferAdjustIndent(&buf, 2);
@@ -15476,7 +15476,7 @@ cleanup:
}
int
-virDomainSaveStatus(virDomainXMLConfPtr xmlconf,
+virDomainSaveStatus(virDomainXMLOptionPtr xmlopt,
const char *statusDir,
virDomainObjPtr obj)
{
@@ -15488,7 +15488,7 @@ virDomainSaveStatus(virDomainXMLConfPtr xmlconf,
int ret = -1;
char *xml;
- if (!(xml = virDomainObjFormat(xmlconf, obj, flags)))
+ if (!(xml = virDomainObjFormat(xmlopt, obj, flags)))
goto cleanup;
if (virDomainSaveXML(statusDir, obj->def, xml))
@@ -15504,7 +15504,7 @@ cleanup:
static virDomainObjPtr
virDomainObjListLoadConfig(virDomainObjListPtr doms,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char *configDir,
const char *autostartDir,
const char *name,
@@ -15520,7 +15520,7 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
if ((configFile = virDomainConfigFile(configDir, name)) == NULL)
goto error;
- if (!(def = virDomainDefParseFile(configFile, caps, xmlconf,
+ if (!(def = virDomainDefParseFile(configFile, caps, xmlopt,
expectedVirtTypes,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
@@ -15531,7 +15531,7 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
if ((autostart = virFileLinkPointsTo(autostartLink, configFile)) < 0)
goto error;
- if (!(dom = virDomainObjListAddLocked(doms, def, xmlconf, 0, &oldDef)))
+ if (!(dom = virDomainObjListAddLocked(doms, def, xmlopt, 0, &oldDef)))
goto error;
dom->autostart = autostart;
@@ -15556,7 +15556,7 @@ virDomainObjListLoadStatus(virDomainObjListPtr doms,
const char *statusDir,
const char *name,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque)
@@ -15568,7 +15568,7 @@ virDomainObjListLoadStatus(virDomainObjListPtr doms,
if ((statusFile = virDomainConfigFile(statusDir, name)) == NULL)
goto error;
- if (!(obj = virDomainObjParseFile(statusFile, caps, xmlconf, expectedVirtTypes,
+ if (!(obj = virDomainObjParseFile(statusFile, caps, xmlopt, expectedVirtTypes,
VIR_DOMAIN_XML_INTERNAL_STATUS |
VIR_DOMAIN_XML_INTERNAL_ACTUAL_NET |
VIR_DOMAIN_XML_INTERNAL_PCI_ORIG_STATES)))
@@ -15604,7 +15604,7 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
const char *autostartDir,
int liveStatus,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque)
@@ -15642,14 +15642,14 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
configDir,
entry->d_name,
caps,
- xmlconf,
+ xmlopt,
expectedVirtTypes,
notify,
opaque);
else
dom = virDomainObjListLoadConfig(doms,
caps,
- xmlconf,
+ xmlopt,
configDir,
autostartDir,
entry->d_name,
@@ -16044,7 +16044,7 @@ cleanup:
virDomainDefPtr
virDomainDefCopy(virDomainDefPtr src,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
bool migratable)
{
char *xml;
@@ -16059,7 +16059,7 @@ virDomainDefCopy(virDomainDefPtr src,
if (!(xml = virDomainDefFormat(src, write_flags)))
return NULL;
- ret = virDomainDefParseString(xml, caps, xmlconf, -1, read_flags);
+ ret = virDomainDefParseString(xml, caps, xmlopt, -1, read_flags);
VIR_FREE(xml);
return ret;
@@ -16068,12 +16068,12 @@ virDomainDefCopy(virDomainDefPtr src,
virDomainDefPtr
virDomainObjCopyPersistentDef(virDomainObjPtr dom,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf)
+ virDomainXMLOptionPtr xmlopt)
{
virDomainDefPtr cur;
- cur = virDomainObjGetPersistentDef(caps, xmlconf, dom);
- return virDomainDefCopy(cur, caps, xmlconf, false);
+ cur = virDomainObjGetPersistentDef(caps, xmlopt, dom);
+ return virDomainDefCopy(cur, caps, xmlopt, false);
}
@@ -16516,7 +16516,7 @@ virDomainDeviceDefPtr
virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
const virDomainDefPtr def,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf)
+ virDomainXMLOptionPtr xmlopt)
{
virDomainDeviceDefPtr ret = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -16583,7 +16583,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
goto cleanup;
xmlStr = virBufferContentAndReset(&buf);
- ret = virDomainDeviceDefParse(xmlStr, def, caps, xmlconf, flags);
+ ret = virDomainDeviceDefParse(xmlStr, def, caps, xmlopt, flags);
cleanup:
VIR_FREE(xmlStr);
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index c931e3b..0128633 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1931,8 +1931,8 @@ typedef virDomainObjList *virDomainObjListPtr;
/* This structure holds various callbacks and data needed
* while parsing and creating domain XMLs */
-typedef struct _virDomainXMLConf virDomainXMLConf;
-typedef virDomainXMLConf *virDomainXMLConfPtr;
+typedef struct _virDomainXMLOption virDomainXMLOption;
+typedef virDomainXMLOption *virDomainXMLOptionPtr;
typedef void *(*virDomainXMLPrivateDataAllocFunc)(void);
typedef void (*virDomainXMLPrivateDataFreeFunc)(void *);
@@ -1973,14 +1973,14 @@ struct _virDomainXMLPrivateDataCallbacks {
};
-virDomainXMLConfPtr virDomainXMLConfNew(virDomainDefParserConfigPtr config,
+virDomainXMLOptionPtr virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
virDomainXMLPrivateDataCallbacksPtr priv,
virDomainXMLNamespacePtr xmlns);
-void virDomainNetGenerateMAC(virDomainXMLConfPtr xmlconf, virMacAddrPtr mac);
+void virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt, virMacAddrPtr mac);
virDomainXMLNamespacePtr
-virDomainXMLConfGetNamespace(virDomainXMLConfPtr xmlconf)
+virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
ATTRIBUTE_NONNULL(1);
static inline bool
@@ -1989,7 +1989,7 @@ virDomainObjIsActive(virDomainObjPtr dom)
return dom->def->id != -1;
}
-virDomainObjPtr virDomainObjNew(virDomainXMLConfPtr caps)
+virDomainObjPtr virDomainObjNew(virDomainXMLOptionPtr caps)
ATTRIBUTE_NONNULL(1);
virDomainObjListPtr virDomainObjListNew(void);
@@ -2039,7 +2039,7 @@ void virDomainDeviceDefFree(virDomainDeviceDefPtr def);
virDomainDeviceDefPtr virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
const virDomainDefPtr def,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf);
+ virDomainXMLOptionPtr xmlopt);
int virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info,
int type);
int virDomainDeviceInfoCopy(virDomainDeviceInfoPtr dst,
@@ -2068,7 +2068,7 @@ enum {
};
virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
const virDomainDefPtr def,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int flags,
virDomainDefPtr *oldDef);
void virDomainObjAssignDef(virDomainObjPtr domain,
@@ -2076,28 +2076,28 @@ void virDomainObjAssignDef(virDomainObjPtr domain,
bool live,
virDomainDefPtr *oldDef);
int virDomainObjSetDefTransient(virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain,
bool live);
virDomainDefPtr
virDomainObjGetPersistentDef(virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain);
int
virDomainLiveConfigHelperMethod(virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
virDomainObjPtr dom,
unsigned int *flags,
virDomainDefPtr *persistentDef);
virDomainDefPtr virDomainDefCopy(virDomainDefPtr src,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
bool migratable);
virDomainDefPtr virDomainObjCopyPersistentDef(virDomainObjPtr dom,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf);
+ virDomainXMLOptionPtr xmlopt);
void virDomainObjListRemove(virDomainObjListPtr doms,
virDomainObjPtr dom);
@@ -2105,22 +2105,22 @@ void virDomainObjListRemove(virDomainObjListPtr doms,
virDomainDeviceDefPtr virDomainDeviceDefParse(const char *xmlStr,
virDomainDefPtr def,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int flags);
virDomainDefPtr virDomainDefParseString(const char *xmlStr,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags);
virDomainDefPtr virDomainDefParseFile(const char *filename,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags);
virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc,
xmlNodePtr root,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags);
@@ -2161,7 +2161,7 @@ int virDomainDiskInsert(virDomainDefPtr def,
virDomainDiskDefPtr disk);
void virDomainDiskInsertPreAlloced(virDomainDefPtr def,
virDomainDiskDefPtr disk);
-int virDomainDiskDefAssignAddress(virDomainXMLConfPtr xmlconf,
+int virDomainDiskDefAssignAddress(virDomainXMLOptionPtr xmlopt,
virDomainDiskDefPtr def);
virDomainDiskDefPtr
@@ -2236,7 +2236,7 @@ int virDomainSaveXML(const char *configDir,
int virDomainSaveConfig(const char *configDir,
virDomainDefPtr def);
-int virDomainSaveStatus(virDomainXMLConfPtr xmlconf,
+int virDomainSaveStatus(virDomainXMLOptionPtr xmlopt,
const char *statusDir,
virDomainObjPtr obj) ATTRIBUTE_RETURN_CHECK;
@@ -2249,7 +2249,7 @@ int virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
const char *autostartDir,
int liveStatus,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque);
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index d8d8ae7..bd5684d 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -169,7 +169,7 @@ cleanup:
virDomainSnapshotDefPtr
virDomainSnapshotDefParseString(const char *xmlStr,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags)
{
@@ -264,7 +264,7 @@ virDomainSnapshotDefParseString(const char *xmlStr,
_("missing domain in snapshot"));
goto cleanup;
}
- def->dom = virDomainDefParseNode(xml, domainNode, caps, xmlconf,
+ def->dom = virDomainDefParseNode(xml, domainNode, caps, xmlopt,
expectedVirtTypes,
(VIR_DOMAIN_XML_INACTIVE |
VIR_DOMAIN_XML_SECURE));
diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h
index e8bd24a..6d625a7 100644
--- a/src/conf/snapshot_conf.h
+++ b/src/conf/snapshot_conf.h
@@ -101,7 +101,7 @@ typedef enum {
virDomainSnapshotDefPtr virDomainSnapshotDefParseString(const char *xmlStr,
virCapsPtr caps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
unsigned int expectedVirtTypes,
unsigned int flags);
void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def);
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 46efab8..4828209 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -71,7 +71,7 @@ esxFreePrivate(esxPrivate **priv)
esxVI_Context_Free(&(*priv)->vCenter);
esxUtil_FreeParsedUri(&(*priv)->parsedUri);
virObjectUnref((*priv)->caps);
- virObjectUnref((*priv)->xmlconf);
+ virObjectUnref((*priv)->xmlopt);
VIR_FREE(*priv);
}
@@ -1090,7 +1090,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
goto cleanup;
}
- if (!(priv->xmlconf = virVMXDomainXMLConfInit()))
+ if (!(priv->xmlopt = virVMXDomainXMLConfInit()))
goto cleanup;
conn->privateData = priv;
@@ -2776,7 +2776,7 @@ esxDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
ctx.formatFileName = NULL;
ctx.autodetectSCSIControllerModel = NULL;
- def = virVMXParseConfig(&ctx, priv->xmlconf, vmx);
+ def = virVMXParseConfig(&ctx, priv->xmlopt, vmx);
if (def != NULL) {
if (powerState != esxVI_VirtualMachinePowerState_PoweredOff) {
@@ -2835,7 +2835,7 @@ esxDomainXMLFromNative(virConnectPtr conn, const char
*nativeFormat,
ctx.formatFileName = NULL;
ctx.autodetectSCSIControllerModel = NULL;
- def = virVMXParseConfig(&ctx, priv->xmlconf, nativeConfig);
+ def = virVMXParseConfig(&ctx, priv->xmlopt, nativeConfig);
if (def != NULL) {
xml = virDomainDefFormat(def, VIR_DOMAIN_XML_INACTIVE);
@@ -2877,7 +2877,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
return NULL;
}
- def = virDomainDefParseString(domainXml, priv->caps, priv->xmlconf,
+ def = virDomainDefParseString(domainXml, priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_VMWARE, 0);
if (def == NULL) {
@@ -2892,7 +2892,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
ctx.formatFileName = esxFormatVMXFileName;
ctx.autodetectSCSIControllerModel = esxAutodetectSCSIControllerModel;
- vmx = virVMXFormatConfig(&ctx, priv->xmlconf, def, virtualHW_version);
+ vmx = virVMXFormatConfig(&ctx, priv->xmlopt, def, virtualHW_version);
virDomainDefFree(def);
@@ -3093,7 +3093,7 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml)
}
/* Parse domain XML */
- def = virDomainDefParseString(xml, priv->caps, priv->xmlconf,
+ def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_VMWARE,
VIR_DOMAIN_XML_INACTIVE);
@@ -3139,7 +3139,7 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml)
ctx.formatFileName = esxFormatVMXFileName;
ctx.autodetectSCSIControllerModel = esxAutodetectSCSIControllerModel;
- vmx = virVMXFormatConfig(&ctx, priv->xmlconf, def, virtualHW_version);
+ vmx = virVMXFormatConfig(&ctx, priv->xmlopt, def, virtualHW_version);
if (vmx == NULL) {
goto cleanup;
@@ -4266,7 +4266,7 @@ esxDomainSnapshotCreateXML(virDomainPtr domain, const char
*xmlDesc,
}
def = virDomainSnapshotDefParseString(xmlDesc, priv->caps,
- priv->xmlconf, 0, 0);
+ priv->xmlopt, 0, 0);
if (def == NULL) {
return NULL;
diff --git a/src/esx/esx_private.h b/src/esx/esx_private.h
index 2973130..83e945f 100644
--- a/src/esx/esx_private.h
+++ b/src/esx/esx_private.h
@@ -35,7 +35,7 @@ typedef struct _esxPrivate {
esxVI_Context *vCenter;
esxUtil_ParsedUri *parsedUri;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
int32_t maxVcpus;
esxVI_Boolean supportsVMotion;
esxVI_Boolean supportsLongMode; /* aka x86_64 */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ed5017d..7fc15d3 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -339,8 +339,8 @@ virDomainWatchdogActionTypeFromString;
virDomainWatchdogActionTypeToString;
virDomainWatchdogModelTypeFromString;
virDomainWatchdogModelTypeToString;
-virDomainXMLConfGetNamespace;
-virDomainXMLConfNew;
+virDomainXMLOptionGetNamespace;
+virDomainXMLOptionNew;
virSecurityDeviceLabelDefFree;
virSecurityLabelDefFree;
diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
index f8602b4..fed878d 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -54,7 +54,7 @@ typedef libxlDriverPrivate *libxlDriverPrivatePtr;
struct _libxlDriverPrivate {
virMutex lock;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
unsigned int version;
FILE *logger_file;
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index f5d4c73..a5ed45f 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -586,7 +586,7 @@ libxlSaveImageOpen(libxlDriverPrivatePtr driver, const char *from,
goto error;
}
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
@@ -999,7 +999,7 @@ libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto error;
if (!driver->nactive && driver->inhibitCallback)
@@ -1103,7 +1103,7 @@ libxlShutdown(void)
libxlDriverLock(libxl_driver);
virObjectUnref(libxl_driver->caps);
- virObjectUnref(libxl_driver->xmlconf);
+ virObjectUnref(libxl_driver->xmlopt);
virObjectUnref(libxl_driver->domains);
libxl_ctx_free(libxl_driver->ctx);
xtl_logger_destroy(libxl_driver->logger);
@@ -1262,7 +1262,7 @@ libxlStartup(bool privileged,
goto error;
}
- if (!(libxl_driver->xmlconf =
virDomainXMLConfNew(&libxlDomainDefParserConfig,
+ if (!(libxl_driver->xmlopt =
virDomainXMLOptionNew(&libxlDomainDefParserConfig,
&libxlDomainXMLPrivateDataCallbacks,
NULL)))
goto error;
@@ -1273,7 +1273,7 @@ libxlStartup(bool privileged,
libxl_driver->autostartDir,
1,
libxl_driver->caps,
- libxl_driver->xmlconf,
+ libxl_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
NULL, NULL) < 0)
goto error;
@@ -1286,7 +1286,7 @@ libxlStartup(bool privileged,
libxl_driver->autostartDir,
0,
libxl_driver->caps,
- libxl_driver->xmlconf,
+ libxl_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
NULL, NULL) < 0)
goto error;
@@ -1325,7 +1325,7 @@ libxlReload(void)
libxl_driver->autostartDir,
1,
libxl_driver->caps,
- libxl_driver->xmlconf,
+ libxl_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
NULL, libxl_driver);
@@ -1481,13 +1481,13 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
virCheckFlags(VIR_DOMAIN_START_PAUSED, NULL);
libxlDriverLock(driver);
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -1631,7 +1631,7 @@ libxlDomainSuspend(virDomainPtr dom)
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto cleanup;
ret = 0;
@@ -1691,7 +1691,7 @@ libxlDomainResume(virDomainPtr dom)
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto cleanup;
ret = 0;
@@ -1962,7 +1962,7 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
goto cleanup;
}
if (!(persistentDef = virDomainObjGetPersistentDef(driver->caps,
- driver->xmlconf,
+ driver->xmlopt,
vm)))
goto cleanup;
}
@@ -2268,7 +2268,7 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
@@ -2605,7 +2605,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
priv = vm->privateData;
- if (!(def = virDomainObjGetPersistentDef(driver->caps, driver->xmlconf, vm)))
+ if (!(def = virDomainObjGetPersistentDef(driver->caps, driver->xmlopt, vm)))
goto cleanup;
maplen = VIR_CPU_MAPLEN(nvcpus);
@@ -2783,7 +2783,7 @@ libxlDomainPinVcpu(virDomainPtr dom, unsigned int vcpu, unsigned
char *cpumap,
goto cleanup;
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto cleanup;
ret = 0;
@@ -2957,7 +2957,7 @@ libxlDomainXMLToNative(virConnectPtr conn, const char *
nativeFormat,
}
if (!(def = virDomainDefParseString(domainXml,
- driver->caps, driver->xmlconf,
+ driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN, 0)))
goto cleanup;
@@ -3059,13 +3059,13 @@ libxlDomainDefineXML(virConnectPtr conn, const char *xml)
virDomainDefPtr oldDef = NULL;
libxlDriverLock(driver);
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
0,
&oldDef)))
goto cleanup;
@@ -3582,13 +3582,13 @@ libxlDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- driver->caps, driver->xmlconf,
+ driver->caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
/* Make a copy for updated domain. */
if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->caps,
- driver->xmlconf)))
+ driver->xmlopt)))
goto cleanup;
switch (action) {
@@ -3613,7 +3613,7 @@ libxlDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
/* If dev exists it was created to modify the domain config. Free it. */
virDomainDeviceDefFree(dev);
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- driver->caps, driver->xmlconf,
+ driver->caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -3636,7 +3636,7 @@ libxlDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
* update domain status forcibly because the domain status may be
* changed even if we attach the device failed.
*/
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
ret = -1;
}
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 63a77a7..67f9451 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -142,10 +142,10 @@ error:
}
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
lxcDomainXMLConfInit(void)
{
- return virDomainXMLConfNew(&virLXCDriverDomainDefParserConfig,
+ return virDomainXMLOptionNew(&virLXCDriverDomainDefParserConfig,
&virLXCDriverPrivateDataCallbacks,
NULL);
}
diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h
index b46dc32..c12e427 100644
--- a/src/lxc/lxc_conf.h
+++ b/src/lxc/lxc_conf.h
@@ -51,7 +51,7 @@ struct _virLXCDriver {
virMutex lock;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
virCgroupPtr cgroup;
@@ -84,7 +84,7 @@ struct _virLXCDriver {
int lxcLoadDriverConfig(virLXCDriverPtr driver);
virCapsPtr lxcCapsInit(virLXCDriverPtr driver);
-virDomainXMLConfPtr lxcDomainXMLConfInit(void);
+virDomainXMLOptionPtr lxcDomainXMLConfInit(void);
static inline void lxcDriverLock(virLXCDriverPtr driver)
{
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index cde85b4..ed73fa1 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -147,7 +147,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
{
virLXCControllerPtr ctrl = NULL;
virCapsPtr caps = NULL;
- virDomainXMLConfPtr xmlconf = NULL;
+ virDomainXMLOptionPtr xmlopt = NULL;
char *configFile = NULL;
if (VIR_ALLOC(ctrl) < 0)
@@ -162,7 +162,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
if ((caps = lxcCapsInit(NULL)) == NULL)
goto error;
- if (!(xmlconf = lxcDomainXMLConfInit()))
+ if (!(xmlopt = lxcDomainXMLConfInit()))
goto error;
if ((configFile = virDomainConfigFile(LXC_STATE_DIR,
@@ -170,7 +170,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
goto error;
if ((ctrl->def = virDomainDefParseFile(configFile,
- caps, xmlconf,
+ caps, xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
0)) == NULL)
goto error;
@@ -183,7 +183,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
cleanup:
VIR_FREE(configFile);
virObjectUnref(caps);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return ctrl;
no_memory:
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 9f17baa..8afa664 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -413,7 +413,7 @@ static virDomainPtr lxcDomainDefine(virConnectPtr conn, const char
*xml)
virDomainDefPtr oldDef = NULL;
lxcDriverLock(driver);
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -428,7 +428,7 @@ static virDomainPtr lxcDomainDefine(virConnectPtr conn, const char
*xml)
}
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
0, &oldDef)))
goto cleanup;
def = NULL;
@@ -1067,7 +1067,7 @@ lxcDomainCreateAndStart(virConnectPtr conn,
virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, NULL);
lxcDriverLock(driver);
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -1083,7 +1083,7 @@ lxcDomainCreateAndStart(virConnectPtr conn,
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -1480,7 +1480,7 @@ static int lxcStartup(bool privileged,
if ((lxc_driver->caps = lxcCapsInit(lxc_driver)) == NULL)
goto cleanup;
- if (!(lxc_driver->xmlconf = lxcDomainXMLConfInit()))
+ if (!(lxc_driver->xmlopt = lxcDomainXMLConfInit()))
goto cleanup;
if (virLXCProcessAutoDestroyInit(lxc_driver) < 0)
@@ -1491,7 +1491,7 @@ static int lxcStartup(bool privileged,
lxc_driver->stateDir,
NULL, 1,
lxc_driver->caps,
- lxc_driver->xmlconf,
+ lxc_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
NULL, NULL) < 0)
goto cleanup;
@@ -1503,7 +1503,7 @@ static int lxcStartup(bool privileged,
lxc_driver->configDir,
lxc_driver->autostartDir, 0,
lxc_driver->caps,
- lxc_driver->xmlconf,
+ lxc_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
NULL, NULL) < 0)
goto cleanup;
@@ -1551,7 +1551,7 @@ lxcReload(void) {
lxc_driver->configDir,
lxc_driver->autostartDir, 0,
lxc_driver->caps,
- lxc_driver->xmlconf,
+ lxc_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
lxcNotifyLoadDomain, lxc_driver);
lxcDriverUnlock(lxc_driver);
@@ -1574,7 +1574,7 @@ static int lxcShutdown(void)
virObjectUnref(lxc_driver->activeUsbHostdevs);
virObjectUnref(lxc_driver->caps);
virObjectUnref(lxc_driver->securityManager);
- virObjectUnref(lxc_driver->xmlconf);
+ virObjectUnref(lxc_driver->xmlopt);
VIR_FREE(lxc_driver->configDir);
VIR_FREE(lxc_driver->autostartDir);
VIR_FREE(lxc_driver->stateDir);
@@ -1796,13 +1796,13 @@ lxcSetSchedulerParametersFlags(virDomainPtr dom,
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+ if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
vm, &flags, &vmdef) < 0)
goto cleanup;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, driver->caps, driver->xmlconf);
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->caps, driver->xmlopt);
if (!vmdef)
goto cleanup;
}
@@ -1868,7 +1868,7 @@ lxcSetSchedulerParametersFlags(virDomainPtr dom,
}
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto cleanup;
@@ -1938,7 +1938,7 @@ lxcGetSchedulerParametersFlags(virDomainPtr dom,
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+ if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
vm, &flags, &persistentDef) < 0)
goto cleanup;
@@ -2051,7 +2051,7 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+ if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
vm, &flags, &persistentDef) < 0)
goto cleanup;
@@ -2156,7 +2156,7 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+ if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
vm, &flags, &persistentDef) < 0)
goto cleanup;
@@ -2522,7 +2522,7 @@ static int lxcDomainSuspend(virDomainPtr dom)
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto cleanup;
ret = 0;
@@ -2588,7 +2588,7 @@ static int lxcDomainResume(virDomainPtr dom)
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);
}
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto cleanup;
ret = 0;
@@ -4358,7 +4358,7 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
}
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
- driver->caps, driver->xmlconf,
+ driver->caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
goto cleanup;
@@ -4370,7 +4370,7 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
* to CONFIG takes one instance.
*/
dev_copy = virDomainDeviceDefCopy(dev, vm->def,
- driver->caps, driver->xmlconf);
+ driver->caps, driver->xmlopt);
if (!dev_copy)
goto cleanup;
}
@@ -4380,7 +4380,7 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
goto cleanup;
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, driver->caps, driver->xmlconf);
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->caps, driver->xmlopt);
if (!vmdef)
goto cleanup;
switch (action) {
@@ -4428,7 +4428,7 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
* changed even if we failed to attach the device. For example,
* a new controller may be created.
*/
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0) {
ret = -1;
goto cleanup;
}
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 39a6ea2..99ecdd5 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -695,7 +695,7 @@ static void virLXCProcessMonitorInitNotify(virLXCMonitorPtr mon
ATTRIBUTE_UNUSED
}
virDomainAuditInit(vm, initpid, inode);
- if (virDomainSaveStatus(lxc_driver->xmlconf, lxc_driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(lxc_driver->xmlopt, lxc_driver->stateDir, vm) < 0)
VIR_WARN("Cannot update XML with PID for LXC %s",
vm->def->name);
virObjectUnlock(vm);
@@ -1058,7 +1058,7 @@ int virLXCProcessStart(virConnectPtr conn,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(driver->caps, driver->xmlconf, vm, true) <
0)
+ if (virDomainObjSetDefTransient(driver->caps, driver->xmlopt, vm, true) <
0)
goto cleanup;
/* Run an early hook to set-up missing devices */
@@ -1255,7 +1255,7 @@ int virLXCProcessStart(virConnectPtr conn,
virLXCProcessAutoDestroyAdd(driver, vm, conn) < 0)
goto error;
- if (virDomainObjSetDefTransient(driver->caps, driver->xmlconf,
+ if (virDomainObjSetDefTransient(driver->caps, driver->xmlopt,
vm, false) < 0)
goto error;
@@ -1265,7 +1265,7 @@ int virLXCProcessStart(virConnectPtr conn,
* location for the benefit of libvirt_lxc. We're now overwriting
* it with the live status XML instead. This is a (currently
* harmless) inconsistency we should fix one day */
- if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
goto error;
/* finally we can call the 'started' hook script if any */
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index f1ec170..4b21c4e 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -548,7 +548,7 @@ openvzFreeDriver(struct openvz_driver *driver)
if (!driver)
return;
- virObjectUnref(driver->xmlconf);
+ virObjectUnref(driver->xmlopt);
virObjectUnref(driver->domains);
virObjectUnref(driver->caps);
VIR_FREE(driver);
@@ -640,7 +640,7 @@ int openvzLoadDomains(struct openvz_driver *driver) {
if (!(dom = virDomainObjListAdd(driver->domains,
def,
- driver->xmlconf,
+ driver->xmlopt,
flags,
NULL)))
goto cleanup;
diff --git a/src/openvz/openvz_conf.h b/src/openvz/openvz_conf.h
index a030b42..47b5123 100644
--- a/src/openvz/openvz_conf.h
+++ b/src/openvz/openvz_conf.h
@@ -45,7 +45,7 @@ struct openvz_driver {
virMutex lock;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
virDomainObjListPtr domains;
int version;
};
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index a825691..206772c 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -848,7 +848,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
}
virMacAddrFormat(&net->mac, macaddr);
- virDomainNetGenerateMAC(driver->xmlconf, &host_mac);
+ virDomainNetGenerateMAC(driver->xmlopt, &host_mac);
virMacAddrFormat(&host_mac, host_macaddr);
if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE ||
@@ -994,7 +994,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
virDomainPtr dom = NULL;
openvzDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_OPENVZ,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto cleanup;
@@ -1007,7 +1007,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
goto cleanup;
}
if (!(vm = virDomainObjListAdd(driver->domains, vmdef,
- driver->xmlconf,
+ driver->xmlopt,
0, NULL)))
goto cleanup;
vmdef = NULL;
@@ -1081,7 +1081,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
virCheckFlags(0, NULL);
openvzDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_OPENVZ,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto cleanup;
@@ -1095,7 +1095,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
}
if (!(vm = virDomainObjListAdd(driver->domains,
vmdef,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -1492,7 +1492,7 @@ static virDrvOpenStatus openvzOpen(virConnectPtr conn,
if (!(driver->caps = openvzCapsInit()))
goto cleanup;
- if (!(driver->xmlconf = virDomainXMLConfNew(&openvzDomainDefParserConfig,
+ if (!(driver->xmlopt = virDomainXMLOptionNew(&openvzDomainDefParserConfig,
NULL, NULL)))
goto cleanup;
@@ -2119,13 +2119,13 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
}
if (virDomainLiveConfigHelperMethod(driver->caps,
- driver->xmlconf,
+ driver->xmlopt,
vm,
&flags,
&vmdef) < 0)
goto cleanup;
- dev = virDomainDeviceDefParse(xml, vmdef, driver->caps, driver->xmlconf,
+ dev = virDomainDeviceDefParse(xml, vmdef, driver->caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (!dev)
goto cleanup;
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index 4dc9669..317e024 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -821,7 +821,7 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj)
goto cleanup;
if (!(dom = virDomainObjListAdd(privconn->domains, def,
- privconn->xmlconf,
+ privconn->xmlopt,
0, NULL)))
goto cleanup;
/* dom is locked here */
@@ -925,7 +925,7 @@ parallelsOpenDefault(virConnectPtr conn)
if (!(privconn->caps = parallelsBuildCapabilities()))
goto error;
- if (!(privconn->xmlconf =
virDomainXMLConfNew(¶llelsDomainDefParserConfig,
+ if (!(privconn->xmlopt =
virDomainXMLOptionNew(¶llelsDomainDefParserConfig,
NULL, NULL)))
goto error;
@@ -987,7 +987,7 @@ parallelsClose(virConnectPtr conn)
parallelsDriverLock(privconn);
virObjectUnref(privconn->caps);
- virObjectUnref(privconn->xmlconf);
+ virObjectUnref(privconn->xmlopt);
virObjectUnref(privconn->domains);
conn->privateData = NULL;
@@ -2327,7 +2327,7 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
virDomainObjPtr dom = NULL, olddom = NULL;
parallelsDriverLock(privconn);
- if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlconf,
+ if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_PARALLELS,
VIR_DOMAIN_XML_INACTIVE)) == NULL) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -2367,7 +2367,7 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
virObjectUnlock(olddom);
if (!(dom = virDomainObjListAdd(privconn->domains, def,
- privconn->xmlconf,
+ privconn->xmlopt,
0, NULL))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Can't allocate domobj"));
diff --git a/src/parallels/parallels_utils.h b/src/parallels/parallels_utils.h
index 59ef18e..603f2de 100644
--- a/src/parallels/parallels_utils.h
+++ b/src/parallels/parallels_utils.h
@@ -43,7 +43,7 @@ struct _parallelsConn {
virStoragePoolObjList pools;
virNetworkObjList networks;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
virDomainEventStatePtr domainEventState;
};
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index ca2400a..071caf2 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1191,7 +1191,7 @@ phypOpen(virConnectPtr conn,
goto failure;
}
- if (!(phyp_driver->xmlconf = virDomainXMLConfNew(NULL, NULL, NULL)))
+ if (!(phyp_driver->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)))
goto failure;
conn->privateData = phyp_driver;
@@ -1242,7 +1242,7 @@ phypClose(virConnectPtr conn)
libssh2_session_free(session);
virObjectUnref(phyp_driver->caps);
- virObjectUnref(phyp_driver->xmlconf);
+ virObjectUnref(phyp_driver->xmlopt);
phypUUIDTable_Free(phyp_driver->uuid_table);
VIR_FREE(phyp_driver->managed_system);
VIR_FREE(phyp_driver);
@@ -3625,7 +3625,7 @@ phypDomainCreateAndStart(virConnectPtr conn,
virCheckFlags(0, NULL);
if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
- phyp_driver->xmlconf,
+ phyp_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_PHYP,
VIR_DOMAIN_XML_SECURE)))
goto err;
diff --git a/src/phyp/phyp_driver.h b/src/phyp/phyp_driver.h
index 8d4cc16..59a4370 100644
--- a/src/phyp/phyp_driver.h
+++ b/src/phyp/phyp_driver.h
@@ -68,7 +68,7 @@ typedef phyp_driver_t *phyp_driverPtr;
struct _phyp_driver {
uuid_tablePtr uuid_table;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
int vios_id;
/* system_type:
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index d2f7d84..88c9756 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7959,7 +7959,7 @@ error:
* Will fail if not using the 'index' keyword
*/
static virDomainDiskDefPtr
-qemuParseCommandLineDisk(virDomainXMLConfPtr xmlconf,
+qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
const char *val,
int nvirtiodisk,
bool old_style_ceph_args)
@@ -8259,7 +8259,7 @@ qemuParseCommandLineDisk(virDomainXMLConfPtr xmlconf,
else
def->dst[2] = 'a' + idx;
- if (virDomainDiskDefAssignAddress(xmlconf, def) < 0) {
+ if (virDomainDiskDefAssignAddress(xmlopt, def) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("invalid device name '%s'"), def->dst);
virDomainDiskDefFree(def);
@@ -8325,7 +8325,7 @@ qemuFindNICForVLAN(int nnics,
* match up against. Horribly complicated stuff
*/
static virDomainNetDefPtr
-qemuParseCommandLineNet(virDomainXMLConfPtr xmlconf,
+qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
const char *val,
int nnics,
const char **nics)
@@ -8459,7 +8459,7 @@ qemuParseCommandLineNet(virDomainXMLConfPtr xmlconf,
}
if (genmac)
- virDomainNetGenerateMAC(xmlconf, &def->mac);
+ virDomainNetGenerateMAC(xmlopt, &def->mac);
cleanup:
for (i = 0 ; i < nkeywords ; i++) {
@@ -9023,7 +9023,7 @@ qemuParseCommandLineBootDevs(virDomainDefPtr def, const char *str)
{
* as is practical. This is not an exact science....
*/
virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char **progenv,
const char **progargv,
char **pidfile,
@@ -9333,7 +9333,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
!disk->dst)
goto no_memory;
- if (virDomainDiskDefAssignAddress(xmlconf, disk) < 0) {
+ if (virDomainDiskDefAssignAddress(xmlopt, disk) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot assign address for device name
'%s'"),
disk->dst);
@@ -9549,7 +9549,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
WANT_VALUE();
if (!STRPREFIX(val, "nic") && STRNEQ(val,
"none")) {
virDomainNetDefPtr net;
- if (!(net = qemuParseCommandLineNet(xmlconf, val, nnics, nics)))
+ if (!(net = qemuParseCommandLineNet(xmlopt, val, nnics, nics)))
goto error;
if (VIR_REALLOC_N(def->nets, def->nnets+1) < 0) {
virDomainNetDefFree(net);
@@ -9559,7 +9559,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
}
} else if (STREQ(arg, "-drive")) {
WANT_VALUE();
- if (!(disk = qemuParseCommandLineDisk(xmlconf, val,
+ if (!(disk = qemuParseCommandLineDisk(xmlopt, val,
nvirtiodisk,
ceph_args != NULL)))
goto error;
@@ -9880,7 +9880,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
goto error;
if (cmd->num_args || cmd->num_env) {
- def->ns = *virDomainXMLConfGetNamespace(xmlconf);
+ def->ns = *virDomainXMLOptionGetNamespace(xmlopt);
def->namespaceData = cmd;
}
else
@@ -9906,7 +9906,7 @@ error:
virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char *args,
char **pidfile,
virDomainChrSourceDefPtr *monConfig,
@@ -9920,7 +9920,7 @@ virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
if (qemuStringToArgvEnv(args, &progenv, &progargv) < 0)
goto cleanup;
- def = qemuParseCommandLine(qemuCaps, xmlconf, progenv, progargv,
+ def = qemuParseCommandLine(qemuCaps, xmlopt, progenv, progargv,
pidfile, monConfig, monJSON);
cleanup:
@@ -9996,7 +9996,7 @@ cleanup:
}
virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
pid_t pid,
char **pidfile,
virDomainChrSourceDefPtr *monConfig,
@@ -10016,7 +10016,7 @@ virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
qemuParseProcFileStrings(pid, "environ", &progenv) < 0)
goto cleanup;
- if (!(def = qemuParseCommandLine(qemuCaps, xmlconf, progenv, progargv,
+ if (!(def = qemuParseCommandLine(qemuCaps, xmlopt, progenv, progargv,
pidfile, monConfig, monJSON)))
goto cleanup;
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index 17687f4..2db1551 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -167,20 +167,20 @@ int qemuOpenVhostNet(virDomainDefPtr def,
* *must* decide how to fill in a name in this case
*/
virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char **progenv,
const char **progargv,
char **pidfile,
virDomainChrSourceDefPtr *monConfig,
bool *monJSON);
virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char *args,
char **pidfile,
virDomainChrSourceDefPtr *monConfig,
bool *monJSON);
virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
pid_t pid,
char **pidfile,
virDomainChrSourceDefPtr *monConfig,
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index c1ab3c9..717e59c 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -551,11 +551,11 @@ virQEMUDriverConfigPtr virQEMUDriverGetConfig(virQEMUDriverPtr
driver)
return conf;
}
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver)
{
virQEMUDriverDomainDefParserConfig.priv = driver;
- return virDomainXMLConfNew(&virQEMUDriverDomainDefParserConfig,
+ return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
&virQEMUDriverPrivateDataCallbacks,
&virQEMUDriverDomainXMLNamespace);
}
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 4b917a7..5299920 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -189,7 +189,7 @@ struct _virQEMUDriver {
virCapsPtr caps;
/* Immutable pointer, Immutable object */
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
/* Immutable pointer, self-locking APIs */
virQEMUCapsCachePtr qemuCapsCache;
@@ -301,7 +301,7 @@ void qemuSharedDiskEntryFree(void *payload, const void *name)
ATTRIBUTE_NONNULL(1);
int qemuDriverAllocateID(virQEMUDriverPtr driver);
-virDomainXMLConfPtr virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver);
+virDomainXMLOptionPtr virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver);
#endif /* __QEMUD_CONF_H */
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6d47606..f431aec 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -762,7 +762,7 @@ qemuDomainObjSaveJob(virQEMUDriverPtr driver, virDomainObjPtr obj)
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
if (virDomainObjIsActive(obj)) {
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, obj) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj) < 0)
VIR_WARN("Failed to save status on vm %s", obj->def->name);
}
@@ -1878,7 +1878,7 @@ qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
priv->fakeReboot = value;
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
VIR_WARN("Failed to save status on vm %s", vm->def->name);
cleanup:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f187c97..37d24df 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -441,7 +441,7 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
}
def = virDomainSnapshotDefParseString(xmlStr, caps,
- qemu_driver->xmlconf,
+ qemu_driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
flags);
if (def == NULL) {
@@ -723,7 +723,7 @@ qemuStartup(bool privileged,
if ((qemu_driver->caps = virQEMUDriverCreateCapabilities(qemu_driver)) == NULL)
goto error;
- if (!(qemu_driver->xmlconf = virQEMUDriverCreateXMLConf(qemu_driver)))
+ if (!(qemu_driver->xmlopt = virQEMUDriverCreateXMLConf(qemu_driver)))
goto error;
/* If hugetlbfs is present, then we need to create a sub-directory within
@@ -769,7 +769,7 @@ qemuStartup(bool privileged,
cfg->stateDir,
NULL, 1,
qemu_driver->caps,
- qemu_driver->xmlconf,
+ qemu_driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
NULL, NULL) < 0)
goto error;
@@ -794,7 +794,7 @@ qemuStartup(bool privileged,
cfg->configDir,
cfg->autostartDir, 0,
qemu_driver->caps,
- qemu_driver->xmlconf,
+ qemu_driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
NULL, NULL) < 0)
goto error;
@@ -867,7 +867,7 @@ qemuReload(void) {
virDomainObjListLoadAllConfigs(qemu_driver->domains,
cfg->configDir,
cfg->autostartDir, 0,
- caps, qemu_driver->xmlconf,
+ caps, qemu_driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
qemuNotifyLoadDomain, qemu_driver);
cleanup:
@@ -960,7 +960,7 @@ qemuShutdown(void) {
virObjectUnref(qemu_driver->domains);
virObjectUnref(qemu_driver->remotePorts);
- virObjectUnref(qemu_driver->xmlconf);
+ virObjectUnref(qemu_driver->xmlopt);
virSysinfoDefFree(qemu_driver->hostsysinfo);
@@ -1485,7 +1485,7 @@ static virDomainPtr qemuDomainCreate(virConnectPtr conn, const char
*xml,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -1503,7 +1503,7 @@ static virDomainPtr qemuDomainCreate(virConnectPtr conn, const char
*xml,
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -1625,7 +1625,7 @@ static int qemuDomainSuspend(virDomainPtr dom) {
eventDetail);
}
}
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto endjob;
ret = 0;
@@ -1694,7 +1694,7 @@ static int qemuDomainResume(virDomainPtr dom) {
}
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto endjob;
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto endjob;
ret = 0;
@@ -2092,7 +2092,7 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned long
newmem,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto endjob;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto endjob;
@@ -2853,7 +2853,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
if (xmlin) {
virDomainDefPtr def = NULL;
- if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE))) {
goto endjob;
@@ -3767,7 +3767,7 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
maximum = (flags & VIR_DOMAIN_VCPU_MAXIMUM) != 0;
flags &= ~VIR_DOMAIN_VCPU_MAXIMUM;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto endjob;
@@ -3873,7 +3873,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -3964,7 +3964,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
if (newVcpuPin)
virDomainVcpuPinDefArrayFree(newVcpuPin, newVcpuPinNum);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto cleanup;
}
@@ -4053,7 +4053,7 @@ qemuDomainGetVcpuPinInfo(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&targetDef) < 0)
goto cleanup;
@@ -4149,7 +4149,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -4230,7 +4230,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
goto cleanup;
}
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto cleanup;
}
@@ -4295,7 +4295,7 @@ qemuDomainGetEmulatorPinInfo(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt,
vm, &flags, &targetDef) < 0)
goto cleanup;
@@ -4452,7 +4452,7 @@ qemuDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt,
vm, &flags, &def) < 0)
goto cleanup;
@@ -4765,14 +4765,14 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
header.was_running = state;
/* Create a domain from this XML */
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
if (xmlin) {
virDomainDefPtr def2 = NULL;
- if (!(def2 = virDomainDefParseString(xmlin, caps, driver->xmlconf,
+ if (!(def2 = virDomainDefParseString(xmlin, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
@@ -4888,7 +4888,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
"%s", _("failed to resume domain"));
goto cleanup;
}
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Failed to save status on vm %s", vm->def->name);
goto cleanup;
}
@@ -4946,7 +4946,7 @@ qemuDomainRestoreFlags(virConnectPtr conn,
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
@@ -5226,7 +5226,7 @@ static char *qemuDomainXMLFromNative(virConnectPtr conn,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- def = qemuParseCommandLineString(caps, driver->xmlconf, config,
+ def = qemuParseCommandLineString(caps, driver->xmlopt, config,
NULL, NULL, NULL);
if (!def)
goto cleanup;
@@ -5274,7 +5274,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- def = virDomainDefParseString(xmlData, caps, driver->xmlconf,
+ def = virDomainDefParseString(xmlData, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES, 0);
if (!def)
goto cleanup;
@@ -5545,7 +5545,7 @@ static virDomainPtr qemuDomainDefine(virConnectPtr conn, const char
*xml) {
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -5563,7 +5563,7 @@ static virDomainPtr qemuDomainDefine(virConnectPtr conn, const char
*xml) {
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
0, &oldDef)))
goto cleanup;
@@ -5782,7 +5782,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
dev->data.disk = orig_disk;
if (!(dev_copy = virDomainDeviceDefCopy(dev, vm->def,
- caps, driver->xmlconf))) {
+ caps, driver->xmlopt))) {
dev->data.disk = tmp;
goto end;
}
@@ -6059,7 +6059,7 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm,
dev->data.disk = orig_disk;
if (!(dev_copy = virDomainDeviceDefCopy(dev, vm->def,
- caps, driver->xmlconf))) {
+ caps, driver->xmlopt))) {
dev->data.disk = tmp;
goto end;
}
@@ -6463,7 +6463,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
}
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
- caps, driver->xmlconf,
+ caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
goto endjob;
@@ -6474,7 +6474,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
* create a deep copy of device as adding
* to CONFIG takes one instance.
*/
- dev_copy = virDomainDeviceDefCopy(dev, vm->def, caps, driver->xmlconf);
+ dev_copy = virDomainDeviceDefCopy(dev, vm->def, caps, driver->xmlopt);
if (!dev_copy)
goto endjob;
}
@@ -6489,7 +6489,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
goto endjob;
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlconf);
+ vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt);
if (!vmdef)
goto endjob;
switch (action) {
@@ -6540,7 +6540,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
* changed even if we failed to attach the device. For example,
* a new controller may be created.
*/
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
ret = -1;
goto endjob;
}
@@ -6917,7 +6917,7 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -7082,7 +7082,7 @@ qemuDomainGetBlkioParameters(virDomainPtr dom,
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -7271,7 +7271,7 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -7401,7 +7401,7 @@ qemuDomainGetMemoryParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -7567,7 +7567,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -7720,7 +7720,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -7930,13 +7930,13 @@ qemuSetSchedulerParametersFlags(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&vmdef) < 0)
goto cleanup;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlconf);
+ vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt);
if (!vmdef)
goto cleanup;
}
@@ -8031,7 +8031,7 @@ qemuSetSchedulerParametersFlags(virDomainPtr dom,
}
}
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto cleanup;
@@ -8216,7 +8216,7 @@ qemuGetSchedulerParametersFlags(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -8746,7 +8746,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -8912,7 +8912,7 @@ qemuDomainGetInterfaceParameters(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -11311,7 +11311,7 @@ cleanup:
virCgroupFree(&cgroup);
if (ret == 0 || !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_TRANSACTION)) {
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0 ||
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0 ||
(persist && virDomainSaveConfig(cfg->configDir, vm->newDef)
< 0))
ret = -1;
}
@@ -11579,7 +11579,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
!virDomainObjIsActive(vm))
parse_flags |= VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE;
- if (!(def = virDomainSnapshotDefParseString(xmlDesc, caps, driver->xmlconf,
+ if (!(def = virDomainSnapshotDefParseString(xmlDesc, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
parse_flags)))
goto cleanup;
@@ -11755,7 +11755,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
/* Easiest way to clone inactive portion of vm->def is via
* conversion in and back out of xml. */
if (!(xml = qemuDomainDefFormatLive(driver, vm->def, true, true)) ||
- !(def->dom = virDomainDefParseString(xml, caps, driver->xmlconf,
+ !(def->dom = virDomainDefParseString(xml, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -12326,7 +12326,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr
snapshot,
* than inactive xml? */
snap->def->current = true;
if (snap->def->dom) {
- config = virDomainDefCopy(snap->def->dom, caps, driver->xmlconf, true);
+ config = virDomainDefCopy(snap->def->dom, caps, driver->xmlopt, true);
if (!config)
goto cleanup;
}
@@ -12786,7 +12786,7 @@ static virDomainPtr qemuDomainAttach(virConnectPtr conn,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!(def = qemuParseCommandLinePid(caps, driver->xmlconf, pid,
+ if (!(def = qemuParseCommandLinePid(caps, driver->xmlopt, pid,
&pidfile, &monConfig, &monJSON)))
goto cleanup;
@@ -12820,7 +12820,7 @@ static virDomainPtr qemuDomainAttach(virConnectPtr conn,
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
@@ -13899,7 +13899,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto endjob;
@@ -14059,7 +14059,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto endjob;
@@ -14248,7 +14248,7 @@ qemuDomainSetMetadata(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&persistentDef) < 0)
goto cleanup;
@@ -14345,7 +14345,7 @@ qemuDomainGetMetadata(virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
&def) < 0)
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
&def) < 0)
goto cleanup;
/* use correct domain definition according to flags */
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index b0df4f4..12774ba 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -920,7 +920,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
goto error;
}
mig->persistent = virDomainDefParseNode(doc, nodes[0],
- caps, driver->xmlconf,
+ caps, driver->xmlopt,
-1, VIR_DOMAIN_XML_INACTIVE);
if (!mig->persistent) {
/* virDomainDefParseNode already reported
@@ -1924,7 +1924,7 @@ char *qemuMigrationBegin(virQEMUDriverPtr driver,
}
if (xmlin) {
- if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -2026,7 +2026,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -2067,7 +2067,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
virDomainDefPtr newdef;
VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
- newdef = virDomainDefParseString(xmlout, caps, driver->xmlconf,
+ newdef = virDomainDefParseString(xmlout, caps, driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE);
if (!newdef)
@@ -2085,7 +2085,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
}
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
@@ -3890,7 +3890,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
if (mig->persistent)
vm->newDef = vmdef = mig->persistent;
else
- vmdef = virDomainObjGetPersistentDef(caps, driver->xmlconf, vm);
+ vmdef = virDomainObjGetPersistentDef(caps, driver->xmlopt, vm);
if (!vmdef || virDomainSaveConfig(cfg->configDir, vmdef) < 0) {
/* Hmpf. Migration was successful, but making it persistent
* was not. If we report successful, then when this domain
@@ -3985,7 +3985,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
}
if (virDomainObjIsActive(vm) &&
- virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Failed to save status on vm %s", vm->def->name);
goto endjob;
}
@@ -4093,7 +4093,7 @@ int qemuMigrationConfirm(virQEMUDriverPtr driver,
event = virDomainEventNewFromObj(vm,
VIR_DOMAIN_EVENT_RESUMED,
VIR_DOMAIN_EVENT_RESUMED_MIGRATED);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Failed to save status on vm %s", vm->def->name);
goto cleanup;
}
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 8c4bfb7..9f7c087 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -663,7 +663,7 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_DOMAIN_EVENT_SHUTDOWN,
VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after state change",
vm->def->name);
}
@@ -713,7 +713,7 @@ qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_WARN("Unable to release lease on %s", vm->def->name);
VIR_DEBUG("Preserving lock state '%s'",
NULLSTR(priv->lockState));
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after state change",
vm->def->name);
}
@@ -766,7 +766,7 @@ qemuProcessHandleResume(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
}
VIR_FREE(priv->lockState);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after state change",
vm->def->name);
}
@@ -796,7 +796,7 @@ qemuProcessHandleRTCChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
if (vm->def->clock.offset == VIR_DOMAIN_CLOCK_OFFSET_VARIABLE)
vm->def->clock.data.variable.adjustment = offset;
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
VIR_WARN("unable to save domain status with RTC change");
virObjectUnlock(vm);
@@ -836,7 +836,7 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_WARN("Unable to release lease on %s", vm->def->name);
VIR_DEBUG("Preserving lock state '%s'",
NULLSTR(priv->lockState));
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after watchdog event",
vm->def->name);
}
@@ -918,7 +918,7 @@ qemuProcessHandleIOError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_WARN("Unable to release lease on %s", vm->def->name);
VIR_DEBUG("Preserving lock state '%s'",
NULLSTR(priv->lockState));
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
VIR_WARN("Unable to save status on vm %s after IO error",
vm->def->name);
}
virObjectUnlock(vm);
@@ -1096,7 +1096,7 @@ qemuProcessHandleTrayChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
else if (reason == VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE)
disk->tray_status = VIR_DOMAIN_DISK_TRAY_CLOSED;
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after tray moved event",
vm->def->name);
}
@@ -1134,7 +1134,7 @@ qemuProcessHandlePMWakeup(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_DOMAIN_EVENT_STARTED,
VIR_DOMAIN_EVENT_STARTED_WAKEUP);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after wakeup event",
vm->def->name);
}
@@ -1173,7 +1173,7 @@ qemuProcessHandlePMSuspend(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_DOMAIN_EVENT_PMSUSPENDED,
VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after suspend event",
vm->def->name);
}
@@ -1208,7 +1208,7 @@ qemuProcessHandleBalloonChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
vm->def->mem.cur_balloon, actual);
vm->def->mem.cur_balloon = actual;
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
VIR_WARN("unable to save domain status with balloon change");
virObjectUnlock(vm);
@@ -1243,7 +1243,7 @@ qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_DOMAIN_EVENT_PMSUSPENDED,
VIR_DOMAIN_EVENT_PMSUSPENDED_DISK);
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
VIR_WARN("Unable to save status on vm %s after suspend event",
vm->def->name);
}
@@ -3064,7 +3064,7 @@ qemuProcessReconnect(void *opaque)
goto error;
/* update domain state XML with possibly updated state in virDomainObj */
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, obj) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, obj) < 0)
goto error;
/* Run an hook to allow admins to do some magic */
@@ -3319,7 +3319,7 @@ int qemuProcessStart(virConnectPtr conn,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlconf, vm, true) < 0)
+ if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, true) < 0)
goto cleanup;
vm->def->id = qemuDriverAllocateID(driver);
@@ -3670,7 +3670,7 @@ int qemuProcessStart(virConnectPtr conn,
}
VIR_DEBUG("Writing early domain status to disk");
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0) {
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
goto cleanup;
}
@@ -3821,7 +3821,7 @@ int qemuProcessStart(virConnectPtr conn,
goto cleanup;
VIR_DEBUG("Writing domain status to disk");
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto cleanup;
/* finally we can call the 'started' hook script if any */
@@ -4179,7 +4179,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlconf, vm, true) < 0)
+ if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, true) < 0)
goto cleanup;
vm->def->id = qemuDriverAllocateID(driver);
@@ -4323,7 +4323,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, reason);
VIR_DEBUG("Writing domain status to disk");
- if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto cleanup;
/* Run an hook to allow admins to do some magic */
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 7c284be..3d3b772 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -71,7 +71,7 @@ typedef struct {
char *files; /* list of files */
virDomainDefPtr def; /* VM definition */
virCapsPtr caps; /* VM capabilities */
- virDomainXMLConfPtr xmlconf;/* XML parser data */
+ virDomainXMLOptionPtr xmlopt;/* XML parser data */
char *hvm; /* type of hypervisor (eg hvm, xen) */
virArch arch; /* machine architecture */
char *newfile; /* newly added file */
@@ -86,7 +86,7 @@ vahDeinit(vahControl * ctl)
VIR_FREE(ctl->def);
virObjectUnref(ctl->caps);
- virObjectUnref(ctl->xmlconf);
+ virObjectUnref(ctl->xmlopt);
VIR_FREE(ctl->files);
VIR_FREE(ctl->hvm);
VIR_FREE(ctl->newfile);
@@ -706,7 +706,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
goto exit;
}
- if (!(ctl->xmlconf = virDomainXMLConfNew(NULL, NULL, NULL))) {
+ if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL))) {
vah_error(ctl, 0, _("Failed to create XML config object"));
goto exit;
}
@@ -723,7 +723,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
}
ctl->def = virDomainDefParseString(xmlStr,
- ctl->caps, ctl->xmlconf,
+ ctl->caps, ctl->xmlopt,
-1, VIR_DOMAIN_XML_INACTIVE);
if (ctl->def == NULL) {
vah_error(ctl, 0, _("could not parse XML"));
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 01dd871..5915d21 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -82,7 +82,7 @@ struct _testConn {
char *path;
int nextDomID;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
virNodeInfo nodeInfo;
virDomainObjListPtr domains;
virNetworkObjList networks;
@@ -150,12 +150,12 @@ static void testDomainObjPrivateFree(void *data)
}
-static virDomainXMLConfPtr
+static virDomainXMLOptionPtr
testBuildXMLConfig(void)
{
virDomainXMLPrivateDataCallbacks priv = { .alloc = testDomainObjPrivateAlloc,
.free = testDomainObjPrivateFree };
- return virDomainXMLConfNew(NULL, &priv, NULL);
+ return virDomainXMLOptionNew(NULL, &priv, NULL);
}
@@ -507,7 +507,7 @@ testDomainStartState(virConnectPtr conn,
dom->def->id = privconn->nextDomID++;
if (virDomainObjSetDefTransient(privconn->caps,
- privconn->xmlconf,
+ privconn->xmlopt,
dom, false) < 0) {
goto cleanup;
}
@@ -574,14 +574,14 @@ static int testOpenDefault(virConnectPtr conn) {
if (!(privconn->caps = testBuildCapabilities(conn)))
goto error;
- if (!(privconn->xmlconf = testBuildXMLConfig()))
+ if (!(privconn->xmlopt = testBuildXMLConfig()))
goto error;
privconn->nextDomID = 1;
if (!(domdef = virDomainDefParseString(defaultDomainXML,
privconn->caps,
- privconn->xmlconf,
+ privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
@@ -590,7 +590,7 @@ static int testOpenDefault(virConnectPtr conn) {
goto error;
if (!(domobj = virDomainObjListAdd(privconn->domains,
domdef,
- privconn->xmlconf,
+ privconn->xmlopt,
0, NULL)))
goto error;
domdef = NULL;
@@ -809,7 +809,7 @@ static int testOpenFromFile(virConnectPtr conn,
if (!(privconn->caps = testBuildCapabilities(conn)))
goto error;
- if (!(privconn->xmlconf = testBuildXMLConfig()))
+ if (!(privconn->xmlopt = testBuildXMLConfig()))
goto error;
if (!(xml = virXMLParseFileCtxt(file, &ctxt))) {
@@ -924,7 +924,7 @@ static int testOpenFromFile(virConnectPtr conn,
goto error;
}
def = virDomainDefParseFile(absFile, privconn->caps,
- privconn->xmlconf,
+ privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_XML_INACTIVE);
VIR_FREE(absFile);
@@ -932,7 +932,7 @@ static int testOpenFromFile(virConnectPtr conn,
goto error;
} else {
if ((def = virDomainDefParseNode(xml, domains[i],
- privconn->caps, privconn->xmlconf,
+ privconn->caps, privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto error;
@@ -941,7 +941,7 @@ static int testOpenFromFile(virConnectPtr conn,
if (testDomainGenerateIfnames(def) < 0 ||
!(dom = virDomainObjListAdd(privconn->domains,
def,
- privconn->xmlconf,
+ privconn->xmlopt,
0, NULL))) {
virDomainDefFree(def);
goto error;
@@ -1197,7 +1197,7 @@ static int testClose(virConnectPtr conn)
testConnPtr privconn = conn->privateData;
testDriverLock(privconn);
virObjectUnref(privconn->caps);
- virObjectUnref(privconn->xmlconf);
+ virObjectUnref(privconn->xmlopt);
virObjectUnref(privconn->domains);
virNodeDeviceObjListFree(&privconn->devs);
virNetworkObjListFree(&privconn->networks);
@@ -1335,7 +1335,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
virCheckFlags(0, NULL);
testDriverLock(privconn);
- if ((def = virDomainDefParseString(xml,privconn->caps, privconn->xmlconf,
+ if ((def = virDomainDefParseString(xml,privconn->caps, privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto cleanup;
@@ -1344,7 +1344,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
goto cleanup;
if (!(dom = virDomainObjListAdd(privconn->domains,
def,
- privconn->xmlconf,
+ privconn->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -1950,7 +1950,7 @@ testDomainRestoreFlags(virConnectPtr conn,
}
xml[len] = '\0';
- def = virDomainDefParseString(xml, privconn->caps, privconn->xmlconf,
+ def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_XML_INACTIVE);
if (!def)
@@ -1960,7 +1960,7 @@ testDomainRestoreFlags(virConnectPtr conn,
goto cleanup;
if (!(dom = virDomainObjListAdd(privconn->domains,
def,
- privconn->xmlconf,
+ privconn->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
@@ -2169,7 +2169,7 @@ testDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
goto cleanup;
}
- if (virDomainLiveConfigHelperMethod(privconn->caps, privconn->xmlconf,
+ if (virDomainLiveConfigHelperMethod(privconn->caps, privconn->xmlopt,
vm, &flags, &def) < 0)
goto cleanup;
@@ -2248,7 +2248,7 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned int nrCpus,
}
if (!(persistentDef = virDomainObjGetPersistentDef(privconn->caps,
- privconn->xmlconf,
+ privconn->xmlopt,
privdom)))
goto cleanup;
@@ -2501,7 +2501,7 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
virDomainDefPtr oldDef = NULL;
testDriverLock(privconn);
- if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlconf,
+ if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto cleanup;
@@ -2510,7 +2510,7 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
goto cleanup;
if (!(dom = virDomainObjListAdd(privconn->domains,
def,
- privconn->xmlconf,
+ privconn->xmlopt,
0,
&oldDef)))
goto cleanup;
diff --git a/src/uml/uml_conf.h b/src/uml/uml_conf.h
index 488c1b7..7f7ea05 100644
--- a/src/uml/uml_conf.h
+++ b/src/uml/uml_conf.h
@@ -63,7 +63,7 @@ struct uml_driver {
int inotifyWatch;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
/* Event handling */
virDomainEventStatePtr domainEventState;
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index cda7110..c18819a 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -526,7 +526,7 @@ umlStartup(bool privileged,
if ((uml_driver->caps = umlCapsInit()) == NULL)
goto out_of_memory;
- if (!(uml_driver->xmlconf =
virDomainXMLConfNew(¨DriverDomainDefParserConfig,
+ if (!(uml_driver->xmlopt =
virDomainXMLOptionNew(¨DriverDomainDefParserConfig,
&privcb, NULL)))
goto error;
@@ -566,7 +566,7 @@ umlStartup(bool privileged,
uml_driver->configDir,
uml_driver->autostartDir, 0,
uml_driver->caps,
- uml_driver->xmlconf,
+ uml_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_UML,
NULL, NULL) < 0)
goto error;
@@ -622,7 +622,7 @@ umlReload(void) {
uml_driver->configDir,
uml_driver->autostartDir, 0,
uml_driver->caps,
- uml_driver->xmlconf,
+ uml_driver->xmlopt,
1 << VIR_DOMAIN_VIRT_UML,
umlNotifyLoadDomain, uml_driver);
umlDriverUnlock(uml_driver);
@@ -661,7 +661,7 @@ umlShutdown(void) {
virEventRemoveHandle(uml_driver->inotifyWatch);
VIR_FORCE_CLOSE(uml_driver->inotifyFD);
virObjectUnref(uml_driver->caps);
- virObjectUnref(uml_driver->xmlconf);
+ virObjectUnref(uml_driver->xmlopt);
/* shutdown active VMs
* XXX allow them to stay around & reconnect */
@@ -1085,7 +1085,7 @@ static int umlStartVMDaemon(virConnectPtr conn,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(driver->caps, driver->xmlconf,
+ if (virDomainObjSetDefTransient(driver->caps, driver->xmlopt,
vm, true) < 0) {
VIR_FORCE_CLOSE(logfd);
return -1;
@@ -1119,7 +1119,7 @@ static int umlStartVMDaemon(virConnectPtr conn,
(ret = umlProcessAutoDestroyAdd(driver, vm, conn)) < 0)
goto cleanup;
- ret = virDomainObjSetDefTransient(driver->caps, driver->xmlconf, vm, false);
+ ret = virDomainObjSetDefTransient(driver->caps, driver->xmlopt, vm, false);
cleanup:
VIR_FORCE_CLOSE(logfd);
virCommandFree(cmd);
@@ -1526,13 +1526,13 @@ static virDomainPtr umlDomainCreate(virConnectPtr conn, const char
*xml,
virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, NULL);
umlDriverLock(driver);
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_UML,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -1946,13 +1946,13 @@ static virDomainPtr umlDomainDefine(virConnectPtr conn, const char
*xml) {
virDomainPtr dom = NULL;
umlDriverLock(driver);
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_UML,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
if (!(vm = virDomainObjListAdd(driver->domains, def,
- driver->xmlconf,
+ driver->xmlopt,
0, NULL)))
goto cleanup;
def = NULL;
@@ -2100,7 +2100,7 @@ static int umlDomainAttachDevice(virDomainPtr dom, const char *xml)
goto cleanup;
}
- dev = virDomainDeviceDefParse(xml, vm->def, driver->caps, driver->xmlconf,
+ dev = virDomainDeviceDefParse(xml, vm->def, driver->caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
@@ -2218,7 +2218,7 @@ static int umlDomainDetachDevice(virDomainPtr dom, const char *xml)
{
goto cleanup;
}
- dev = virDomainDeviceDefParse(xml, vm->def, driver->caps, driver->xmlconf,
+ dev = virDomainDeviceDefParse(xml, vm->def, driver->caps, driver->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
goto cleanup;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 79ee2c0..3c3d519 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -193,7 +193,7 @@ typedef struct {
unsigned long version;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
IVirtualBox *vboxObj;
ISession *vboxSession;
@@ -849,10 +849,10 @@ static virDomainDefParserConfig vboxDomainDefParserConfig = {
};
-static virDomainXMLConfPtr
+static virDomainXMLOptionPtr
vboxXMLConfInit(void)
{
- return virDomainXMLConfNew(&vboxDomainDefParserConfig,
+ return virDomainXMLOptionNew(&vboxDomainDefParserConfig,
NULL, NULL);
}
@@ -981,7 +981,7 @@ static void vboxUninitialize(vboxGlobalData *data) {
data->pFuncs->pfnComUninitialize();
virObjectUnref(data->caps);
- virObjectUnref(data->xmlconf);
+ virObjectUnref(data->xmlopt);
#if VBOX_API_VERSION == 2002
/* No domainEventCallbacks in 2.2.* version */
#else /* !(VBOX_API_VERSION == 2002) */
@@ -1041,7 +1041,7 @@ static virDrvOpenStatus vboxOpen(virConnectPtr conn,
if (!(data->caps = vboxCapsInit()) ||
vboxInitialize(data) < 0 ||
vboxExtractVersion(data) < 0 ||
- !(data->xmlconf = vboxXMLConfInit())) {
+ !(data->xmlopt = vboxXMLConfInit())) {
vboxUninitialize(data);
return VIR_DRV_OPEN_ERROR;
}
@@ -5047,7 +5047,7 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const
char *xml) {
#endif
nsresult rc;
- if (!(def = virDomainDefParseString(xml, data->caps, data->xmlconf,
+ if (!(def = virDomainDefParseString(xml, data->caps, data->xmlopt,
1 << VIR_DOMAIN_VIRT_VBOX,
VIR_DOMAIN_XML_INACTIVE))) {
goto cleanup;
@@ -5391,7 +5391,7 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
goto cleanup;
}
- dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlconf,
+ dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
goto cleanup;
@@ -5626,7 +5626,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
{
goto cleanup;
}
- dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlconf,
+ dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt,
VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
goto cleanup;
@@ -5927,7 +5927,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
virCheckFlags(VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA, NULL);
if (!(def = virDomainSnapshotDefParseString(xmlDesc, data->caps,
- data->xmlconf, 0, 0)))
+ data->xmlopt, 0, 0)))
goto cleanup;
if (def->ndisks) {
diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
index 999b7c3..573fb33 100644
--- a/src/vmware/vmware_conf.c
+++ b/src/vmware/vmware_conf.c
@@ -45,7 +45,7 @@ vmwareFreeDriver(struct vmware_driver *driver)
virMutexDestroy(&driver->lock);
virObjectUnref(driver->domains);
virObjectUnref(driver->caps);
- virObjectUnref(driver->xmlconf);
+ virObjectUnref(driver->xmlopt);
VIR_FREE(driver);
}
@@ -163,12 +163,12 @@ vmwareLoadDomains(struct vmware_driver *driver)
goto cleanup;
if ((vmdef =
- virVMXParseConfig(&ctx, driver->xmlconf, vmx)) == NULL) {
+ virVMXParseConfig(&ctx, driver->xmlopt, vmx)) == NULL) {
goto cleanup;
}
if (!(vm = virDomainObjListAdd(driver->domains, vmdef,
- driver->xmlconf,
+ driver->xmlopt,
0, NULL)))
goto cleanup;
diff --git a/src/vmware/vmware_conf.h b/src/vmware/vmware_conf.h
index b3ec966..cb11aca 100644
--- a/src/vmware/vmware_conf.h
+++ b/src/vmware/vmware_conf.h
@@ -36,7 +36,7 @@
struct vmware_driver {
virMutex lock;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
virDomainObjListPtr domains;
int version;
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index d27acc3..c7e493f 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -72,13 +72,13 @@ vmwareDataFreeFunc(void *data)
VIR_FREE(dom);
}
-static virDomainXMLConfPtr
+static virDomainXMLOptionPtr
vmwareDomainXMLConfigInit(void)
{
virDomainXMLPrivateDataCallbacks priv = { .alloc = vmwareDataAllocFunc,
.free = vmwareDataFreeFunc };
- return virDomainXMLConfNew(NULL, &priv, NULL);
+ return virDomainXMLOptionNew(NULL, &priv, NULL);
}
static virDrvOpenStatus
@@ -143,7 +143,7 @@ vmwareOpen(virConnectPtr conn,
if (!(driver->caps = vmwareCapsInit()))
goto cleanup;
- if (!(driver->xmlconf = vmwareDomainXMLConfigInit()))
+ if (!(driver->xmlopt = vmwareDomainXMLConfigInit()))
goto cleanup;
if (vmwareLoadDomains(driver) < 0)
@@ -324,13 +324,13 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
ctx.formatFileName = vmwareCopyVMXFileName;
vmwareDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_VMWARE,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto cleanup;
/* generate vmx file */
- vmx = virVMXFormatConfig(&ctx, driver->xmlconf, vmdef, 7);
+ vmx = virVMXFormatConfig(&ctx, driver->xmlopt, vmdef, 7);
if (vmx == NULL)
goto cleanup;
@@ -347,7 +347,7 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
/* assign def */
if (!(vm = virDomainObjListAdd(driver->domains,
vmdef,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -595,13 +595,13 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
vmwareDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlconf,
+ if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
1 << VIR_DOMAIN_VIRT_VMWARE,
VIR_DOMAIN_XML_INACTIVE)) == NULL)
goto cleanup;
/* generate vmx file */
- vmx = virVMXFormatConfig(&ctx, driver->xmlconf, vmdef, 7);
+ vmx = virVMXFormatConfig(&ctx, driver->xmlopt, vmdef, 7);
if (vmx == NULL)
goto cleanup;
@@ -618,7 +618,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
/* assign def */
if (!(vm = virDomainObjListAdd(driver->domains,
vmdef,
- driver->xmlconf,
+ driver->xmlopt,
VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
NULL)))
goto cleanup;
@@ -943,7 +943,7 @@ vmwareDomainXMLFromNative(virConnectPtr conn, const char
*nativeFormat,
ctx.parseFileName = vmwareCopyVMXFileName;
- def = virVMXParseConfig(&ctx, driver->xmlconf, nativeConfig);
+ def = virVMXParseConfig(&ctx, driver->xmlopt, nativeConfig);
if (def != NULL)
xml = virDomainDefFormat(def, VIR_DOMAIN_XML_INACTIVE);
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index d69fc0e..5dc5046 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -526,10 +526,10 @@ virDomainDefParserConfig virVMXDomainDefParserConfig = {
};
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
virVMXDomainXMLConfInit(void)
{
- return virDomainXMLConfNew(&virVMXDomainDefParserConfig,
+ return virDomainXMLOptionNew(&virVMXDomainDefParserConfig,
NULL, NULL);
}
@@ -948,7 +948,7 @@ virVMXFloppyDiskNameToUnit(const char *name, int *unit)
static int
-virVMXVerifyDiskAddress(virDomainXMLConfPtr xmlconf, virDomainDiskDefPtr disk)
+virVMXVerifyDiskAddress(virDomainXMLOptionPtr xmlopt, virDomainDiskDefPtr disk)
{
virDomainDiskDef def;
virDomainDeviceDriveAddressPtr drive;
@@ -967,7 +967,7 @@ virVMXVerifyDiskAddress(virDomainXMLConfPtr xmlconf,
virDomainDiskDefPtr disk)
def.dst = disk->dst;
def.bus = disk->bus;
- if (virDomainDiskDefAssignAddress(xmlconf, &def) < 0) {
+ if (virDomainDiskDefAssignAddress(xmlopt, &def) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not verify disk address"));
return -1;
@@ -1225,7 +1225,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr
def,
virDomainDefPtr
virVMXParseConfig(virVMXContext *ctx,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char *vmx)
{
bool success = false;
@@ -1603,7 +1603,7 @@ virVMXParseConfig(virVMXContext *ctx,
continue;
}
- if (virVMXParseDisk(ctx, xmlconf, conf, VIR_DOMAIN_DISK_DEVICE_DISK,
+ if (virVMXParseDisk(ctx, xmlopt, conf, VIR_DOMAIN_DISK_DEVICE_DISK,
VIR_DOMAIN_DISK_BUS_SCSI, controller, unit,
&def->disks[def->ndisks]) < 0) {
goto cleanup;
@@ -1614,7 +1614,7 @@ virVMXParseConfig(virVMXContext *ctx,
continue;
}
- if (virVMXParseDisk(ctx, xmlconf, conf, VIR_DOMAIN_DISK_DEVICE_CDROM,
+ if (virVMXParseDisk(ctx, xmlopt, conf, VIR_DOMAIN_DISK_DEVICE_CDROM,
VIR_DOMAIN_DISK_BUS_SCSI, controller, unit,
&def->disks[def->ndisks]) < 0) {
goto cleanup;
@@ -1629,7 +1629,7 @@ virVMXParseConfig(virVMXContext *ctx,
/* def:disks (ide) */
for (bus = 0; bus < 2; ++bus) {
for (unit = 0; unit < 2; ++unit) {
- if (virVMXParseDisk(ctx, xmlconf, conf, VIR_DOMAIN_DISK_DEVICE_DISK,
+ if (virVMXParseDisk(ctx, xmlopt, conf, VIR_DOMAIN_DISK_DEVICE_DISK,
VIR_DOMAIN_DISK_BUS_IDE, bus, unit,
&def->disks[def->ndisks]) < 0) {
goto cleanup;
@@ -1640,7 +1640,7 @@ virVMXParseConfig(virVMXContext *ctx,
continue;
}
- if (virVMXParseDisk(ctx, xmlconf, conf, VIR_DOMAIN_DISK_DEVICE_CDROM,
+ if (virVMXParseDisk(ctx, xmlopt, conf, VIR_DOMAIN_DISK_DEVICE_CDROM,
VIR_DOMAIN_DISK_BUS_IDE, bus, unit,
&def->disks[def->ndisks]) < 0) {
goto cleanup;
@@ -1654,7 +1654,7 @@ virVMXParseConfig(virVMXContext *ctx,
/* def:disks (floppy) */
for (unit = 0; unit < 2; ++unit) {
- if (virVMXParseDisk(ctx, xmlconf, conf, VIR_DOMAIN_DISK_DEVICE_FLOPPY,
+ if (virVMXParseDisk(ctx, xmlopt, conf, VIR_DOMAIN_DISK_DEVICE_FLOPPY,
VIR_DOMAIN_DISK_BUS_FDC, 0, unit,
&def->disks[def->ndisks]) < 0) {
goto cleanup;
@@ -1965,7 +1965,7 @@ virVMXParseSCSIController(virConfPtr conf, int controller, bool
*present,
int
-virVMXParseDisk(virVMXContext *ctx, virDomainXMLConfPtr xmlconf, virConfPtr conf,
+virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr conf,
int device, int busType, int controllerOrBus, int unit,
virDomainDiskDefPtr *def)
{
@@ -2299,7 +2299,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLConfPtr xmlconf,
virConfPtr conf
goto cleanup;
}
- if (virDomainDiskDefAssignAddress(xmlconf, *def) < 0) {
+ if (virDomainDiskDefAssignAddress(xmlopt, *def) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not assign address to disk '%s'"),
(*def)->src);
goto cleanup;
@@ -3037,7 +3037,7 @@ virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def)
*/
char *
-virVMXFormatConfig(virVMXContext *ctx, virDomainXMLConfPtr xmlconf, virDomainDefPtr def,
+virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virDomainDefPtr
def,
int virtualHW_version)
{
char *vmx = NULL;
@@ -3246,7 +3246,7 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLConfPtr xmlconf,
virDomainDef
/* def:disks */
for (i = 0; i < def->ndisks; ++i) {
- if (virVMXVerifyDiskAddress(xmlconf, def->disks[i]) < 0 ||
+ if (virVMXVerifyDiskAddress(xmlopt, def->disks[i]) < 0 ||
virVMXHandleLegacySCSIDiskDriverName(def, def->disks[i]) < 0) {
goto cleanup;
}
diff --git a/src/vmx/vmx.h b/src/vmx/vmx.h
index b9d623d..ec63317 100644
--- a/src/vmx/vmx.h
+++ b/src/vmx/vmx.h
@@ -29,7 +29,7 @@
typedef struct _virVMXContext virVMXContext;
-virDomainXMLConfPtr virVMXDomainXMLConfInit(void);
+virDomainXMLOptionPtr virVMXDomainXMLConfInit(void);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -80,7 +80,7 @@ char *virVMXConvertToUTF8(const char *encoding, const char *string);
*/
virDomainDefPtr virVMXParseConfig(virVMXContext *ctx,
- virDomainXMLConfPtr xmlconf,
+ virDomainXMLOptionPtr xmlopt,
const char *vmx);
int virVMXParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def);
@@ -88,7 +88,7 @@ int virVMXParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def);
int virVMXParseSCSIController(virConfPtr conf, int controller, bool *present,
int *virtualDev);
-int virVMXParseDisk(virVMXContext *ctx, virDomainXMLConfPtr xmlconf,
+int virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt,
virConfPtr conf, int device, int busType,
int controllerOrBus, int unit, virDomainDiskDefPtr *def);
@@ -110,7 +110,7 @@ int virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def);
* Domain XML -> VMX
*/
-char *virVMXFormatConfig(virVMXContext *ctx, virDomainXMLConfPtr xmlconf,
+char *virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt,
virDomainDefPtr def, int virtualHW_version);
int virVMXFormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer);
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 4f8b711..fb65573 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -287,10 +287,10 @@ virDomainDefParserConfig xenDomainDefParserConfig = {
};
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
xenDomainXMLConfInit(void)
{
- return virDomainXMLConfNew(&xenDomainDefParserConfig,
+ return virDomainXMLOptionNew(&xenDomainDefParserConfig,
NULL, NULL);
}
@@ -430,7 +430,7 @@ xenUnifiedOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned
int flags)
goto fail;
}
- if (!(priv->xmlconf = xenDomainXMLConfInit()))
+ if (!(priv->xmlopt = xenDomainXMLConfInit()))
goto fail;
#if WITH_XEN_INOTIFY
@@ -480,7 +480,7 @@ xenUnifiedClose(virConnectPtr conn)
int i;
virObjectUnref(priv->caps);
- virObjectUnref(priv->xmlconf);
+ virObjectUnref(priv->xmlopt);
virDomainEventStateFree(priv->domainEvents);
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
@@ -1463,7 +1463,7 @@ xenUnifiedDomainXMLToNative(virConnectPtr conn,
goto cleanup;
}
- if (!(def = virDomainDefParseString(xmlData, priv->caps, priv->xmlconf,
+ if (!(def = virDomainDefParseString(xmlData, priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN, 0)))
goto cleanup;
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index 568de07..702b1e8 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -160,7 +160,7 @@ struct _xenUnifiedPrivate {
* holding the lock
*/
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
int handle; /* Xen hypervisor handle */
int xendConfigVersion; /* XenD config version */
@@ -226,7 +226,7 @@ typedef struct _xenUnifiedPrivate *xenUnifiedPrivatePtr;
char *xenDomainUsedCpus(virDomainPtr dom);
-virDomainXMLConfPtr xenDomainXMLConfInit(void);
+virDomainXMLOptionPtr xenDomainXMLConfInit(void);
void xenUnifiedDomainInfoListFree(xenUnifiedDomainInfoListPtr info);
int xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr info,
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 03d08fc..7f5d43a 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -2409,7 +2409,7 @@ xenDaemonCreateXML(virConnectPtr conn, const char *xmlDesc, unsigned
int flags)
virCheckFlags(0, NULL);
- if (!(def = virDomainDefParseString(xmlDesc, priv->caps, priv->xmlconf,
+ if (!(def = virDomainDefParseString(xmlDesc, priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
return NULL;
@@ -2519,7 +2519,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr domain,
NULL)))
goto cleanup;
- if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlconf,
+ if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -2679,7 +2679,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr domain,
NULL)))
goto cleanup;
- if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlconf,
+ if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -2786,7 +2786,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr domain,
NULL)))
goto cleanup;
- if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlconf,
+ if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -3127,7 +3127,7 @@ xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc)
if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4)
return NULL;
- if (!(def = virDomainDefParseString(xmlDesc, priv->caps, priv->xmlconf,
+ if (!(def = virDomainDefParseString(xmlDesc, priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE))) {
virReportError(VIR_ERR_XML_ERROR,
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 618d4f1..b3a537a 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -1013,7 +1013,7 @@ xenXMDomainDefineXML(virConnectPtr conn, const char *xml)
return NULL;
}
- if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlconf,
+ if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE))) {
xenUnifiedUnlock(priv);
@@ -1312,7 +1312,7 @@ xenXMDomainAttachDeviceFlags(virDomainPtr domain,
if (!(dev = virDomainDeviceDefParse(xml, entry->def,
priv->caps,
- priv->xmlconf,
+ priv->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -1406,7 +1406,7 @@ xenXMDomainDetachDeviceFlags(virDomainPtr domain,
if (!(dev = virDomainDeviceDefParse(xml, entry->def,
priv->caps,
- priv->xmlconf,
+ priv->xmlopt,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 35d00a2..ff097e6 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -178,7 +178,7 @@ xenapiOpen(virConnectPtr conn, virConnectAuthPtr auth,
goto error;
}
- if (!(privP->xmlconf = virDomainXMLConfNew(&xenapiDomainDefParserConfig,
+ if (!(privP->xmlopt = virDomainXMLOptionNew(&xenapiDomainDefParserConfig,
NULL, NULL))) {
xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR,
_("Failed to create XML conf object"));
@@ -224,7 +224,7 @@ xenapiOpen(virConnectPtr conn, virConnectAuthPtr auth,
if (privP != NULL) {
virObjectUnref(privP->caps);
- virObjectUnref(privP->xmlconf);
+ virObjectUnref(privP->xmlopt);
if (privP->session != NULL)
xenSessionFree(privP->session);
@@ -248,7 +248,7 @@ xenapiClose(virConnectPtr conn)
struct _xenapiPrivate *priv = conn->privateData;
virObjectUnref(priv->caps);
- virObjectUnref(priv->xmlconf);
+ virObjectUnref(priv->xmlopt);
if (priv->session != NULL) {
xen_session_logout(priv->session);
@@ -544,7 +544,7 @@ xenapiDomainCreateXML(virConnectPtr conn,
virCheckFlags(0, NULL);
virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
- priv->caps, priv->xmlconf,
+ priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
flags);
createVMRecordFromXml(conn, defPtr, &record, &vm);
@@ -1698,7 +1698,7 @@ xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
if (!priv->caps)
return NULL;
virDomainDefPtr defPtr = virDomainDefParseString(xml,
- priv->caps, priv->xmlconf,
+ priv->caps, priv->xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
0);
if (!defPtr)
diff --git a/src/xenapi/xenapi_driver_private.h b/src/xenapi/xenapi_driver_private.h
index 92c18fe..b1d00e6 100644
--- a/src/xenapi/xenapi_driver_private.h
+++ b/src/xenapi/xenapi_driver_private.h
@@ -58,7 +58,7 @@ struct _xenapiPrivate {
char *url;
int noVerify;
virCapsPtr caps;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
};
#endif /* __VIR_XENAPI_H__ */
diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c
index e6bd3a6..6f1c600 100644
--- a/tests/domainsnapshotxml2xmltest.c
+++ b/tests/domainsnapshotxml2xmltest.c
@@ -34,7 +34,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *uuid, int
internal)
if (internal)
flags |= VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL;
if (!(def = virDomainSnapshotDefParseString(inXmlData, driver.caps,
- driver.xmlconf,
+ driver.xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
flags)))
goto fail;
@@ -91,7 +91,7 @@ mymain(void)
if ((driver.caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(driver.xmlconf = virQEMUDriverCreateXMLConf(&driver)))
+ if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
# define DO_TEST(name, uuid, internal) \
@@ -117,7 +117,7 @@ mymain(void)
DO_TEST("external_vm", "c7a5fdbd-edaf-9455-926a-d65c16db1809",
0);
virObjectUnref(driver.caps);
- virObjectUnref(driver.xmlconf);
+ virObjectUnref(driver.xmlopt);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c
index b7c010f..e0f99f4 100644
--- a/tests/lxcxml2xmltest.c
+++ b/tests/lxcxml2xmltest.c
@@ -16,7 +16,7 @@
# include "testutilslxc.h"
static virCapsPtr caps;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
static int
testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool live)
@@ -32,7 +32,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool
live)
if (virtTestLoadFile(outxml, &outXmlData) < 0)
goto fail;
- if (!(def = virDomainDefParseString(inXmlData, caps, xmlconf,
+ if (!(def = virDomainDefParseString(inXmlData, caps, xmlopt,
1 << VIR_DOMAIN_VIRT_LXC,
live ? 0 : VIR_DOMAIN_XML_INACTIVE)))
goto fail;
@@ -102,7 +102,7 @@ mymain(void)
if ((caps = testLXCCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(xmlconf = lxcDomainXMLConfInit()))
+ if (!(xmlopt = lxcDomainXMLConfInit()))
return EXIT_FAILURE;
# define DO_TEST_FULL(name, is_different, inactive) \
@@ -128,7 +128,7 @@ mymain(void)
DO_TEST("hostdev");
virObjectUnref(caps);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
index 810bddd..9167d88 100644
--- a/tests/qemuargv2xmltest.c
+++ b/tests/qemuargv2xmltest.c
@@ -46,7 +46,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
if (virtTestLoadFile(xml, &expectxml) < 0)
goto fail;
- if (!(vmdef = qemuParseCommandLineString(driver.caps, driver.xmlconf,
+ if (!(vmdef = qemuParseCommandLineString(driver.caps, driver.xmlopt,
cmd, NULL, NULL, NULL)))
goto fail;
@@ -120,7 +120,7 @@ mymain(void)
if ((driver.caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(driver.xmlconf = virQEMUDriverCreateXMLConf(&driver)))
+ if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
# define DO_TEST_FULL(name, extraFlags, migrateFrom) \
@@ -252,7 +252,7 @@ mymain(void)
virObjectUnref(driver.config);
virObjectUnref(driver.caps);
- virObjectUnref(driver.xmlconf);
+ virObjectUnref(driver.xmlopt);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index d6f1d64..24685c7 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -32,8 +32,8 @@
static int
testQemuMonitorJSONGetStatus(const void *data)
{
- virDomainXMLConfPtr xmlconf = (virDomainXMLConfPtr)data;
- qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlconf);
+ virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
+ qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt);
int ret = -1;
bool running = false;
virDomainPausedReason reason = 0;
@@ -126,8 +126,8 @@ cleanup:
static int
testQemuMonitorJSONGetVersion(const void *data)
{
- virDomainXMLConfPtr xmlconf = (virDomainXMLConfPtr)data;
- qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlconf);
+ virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
+ qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt);
int ret = -1;
int major;
int minor;
@@ -229,8 +229,8 @@ cleanup:
static int
testQemuMonitorJSONGetMachines(const void *data)
{
- virDomainXMLConfPtr xmlconf = (virDomainXMLConfPtr)data;
- qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlconf);
+ virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
+ qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt);
int ret = -1;
qemuMonitorMachineInfoPtr *info;
int ninfo = 0;
@@ -311,8 +311,8 @@ cleanup:
static int
testQemuMonitorJSONGetCPUDefinitions(const void *data)
{
- virDomainXMLConfPtr xmlconf = (virDomainXMLConfPtr)data;
- qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlconf);
+ virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
+ qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt);
int ret = -1;
char **cpus = NULL;
int ncpus = 0;
@@ -377,8 +377,8 @@ cleanup:
static int
testQemuMonitorJSONGetCommands(const void *data)
{
- virDomainXMLConfPtr xmlconf = (virDomainXMLConfPtr)data;
- qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlconf);
+ virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
+ qemuMonitorTestPtr test = qemuMonitorTestNew(true, xmlopt);
int ret = -1;
char **commands = NULL;
int ncommands = 0;
@@ -443,7 +443,7 @@ static int
mymain(void)
{
int ret = 0;
- virDomainXMLConfPtr xmlconf;
+ virDomainXMLOptionPtr xmlopt;
#if !WITH_YAJL
fputs("libvirt not compiled with yajl, skipping this test\n", stderr);
@@ -451,13 +451,13 @@ mymain(void)
#endif
if (virThreadInitialize() < 0 ||
- !(xmlconf = virQEMUDriverCreateXMLConf(NULL)))
+ !(xmlopt = virQEMUDriverCreateXMLConf(NULL)))
return EXIT_FAILURE;
virEventRegisterDefaultImpl();
#define DO_TEST(name) \
- if (virtTestRun(# name, 1, testQemuMonitorJSON ## name, xmlconf) < 0) \
+ if (virtTestRun(# name, 1, testQemuMonitorJSON ## name, xmlopt) < 0) \
ret = -1
DO_TEST(GetStatus);
@@ -466,7 +466,7 @@ mymain(void)
DO_TEST(GetCPUDefinitions);
DO_TEST(GetCommands);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index d5bce84..fe98813 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -450,7 +450,7 @@ static qemuMonitorCallbacks qemuCallbacks = {
#define QEMU_TEXT_GREETING "QEMU 1.0,1 monitor - type 'help' for more
information"
-qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLConfPtr xmlconf)
+qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt)
{
qemuMonitorTestPtr test = NULL;
virDomainChrSourceDef src;
@@ -482,7 +482,7 @@ qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLConfPtr
xmlconf)
goto no_memory;
test->json = json;
- if (!(test->vm = virDomainObjNew(xmlconf)))
+ if (!(test->vm = virDomainObjNew(xmlopt)))
goto error;
if (virNetSocketNewListenUNIX(path,
diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h
index 09914ae..9df118f 100644
--- a/tests/qemumonitortestutils.h
+++ b/tests/qemumonitortestutils.h
@@ -32,7 +32,7 @@ qemuMonitorTestAddItem(qemuMonitorTestPtr test,
const char *response);
qemuMonitorTestPtr qemuMonitorTestNew(bool json,
- virDomainXMLConfPtr xmlconf);
+ virDomainXMLOptionPtr xmlopt);
void qemuMonitorTestFree(qemuMonitorTestPtr test);
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 02d0213..0712fb3 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -100,7 +100,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
goto out;
conn->secretDriver = &fakeSecretDriver;
- if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlconf,
+ if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE))) {
if (flags & FLAG_EXPECT_PARSE_ERROR)
@@ -294,7 +294,7 @@ mymain(void)
if ((driver.caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(driver.xmlconf = virQEMUDriverCreateXMLConf(&driver)))
+ if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
VIR_FREE(driver.config->stateDir);
if ((driver.config->stateDir = strdup("/nowhere")) == NULL)
@@ -931,7 +931,7 @@ mymain(void)
virObjectUnref(driver.config);
virObjectUnref(driver.caps);
- virObjectUnref(driver.xmlconf);
+ virObjectUnref(driver.xmlopt);
VIR_FREE(map);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 8c7f6af..aa058bd 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -32,7 +32,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool
live)
if (virtTestLoadFile(outxml, &outXmlData) < 0)
goto fail;
- if (!(def = virDomainDefParseString(inXmlData, driver.caps, driver.xmlconf,
+ if (!(def = virDomainDefParseString(inXmlData, driver.caps, driver.xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
live ? 0 : VIR_DOMAIN_XML_INACTIVE)))
goto fail;
@@ -106,7 +106,7 @@ mymain(void)
if ((driver.caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(driver.xmlconf = virQEMUDriverCreateXMLConf(&driver)))
+ if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
# define DO_TEST_FULL(name, is_different, when) \
@@ -273,7 +273,7 @@ mymain(void)
DO_TEST_DIFFERENT("metadata");
virObjectUnref(driver.caps);
- virObjectUnref(driver.xmlconf);
+ virObjectUnref(driver.xmlopt);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/qemuxmlnstest.c b/tests/qemuxmlnstest.c
index 15628dd..e6b42dc 100644
--- a/tests/qemuxmlnstest.c
+++ b/tests/qemuxmlnstest.c
@@ -51,7 +51,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
if (len && expectargv[len - 1] == '\n')
expectargv[len - 1] = '\0';
- if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlconf,
+ if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_XML_INACTIVE)))
goto fail;
@@ -204,7 +204,7 @@ mymain(void)
driver.config = virQEMUDriverConfigNew(false);
if ((driver.caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(driver.xmlconf = virQEMUDriverCreateXMLConf(&driver)))
+ if (!(driver.xmlopt = virQEMUDriverCreateXMLConf(&driver)))
return EXIT_FAILURE;
if (virAsprintf(&map, "%s/src/cpu/cpu_map.xml", abs_top_srcdir) < 0
||
cpuMapOverride(map) < 0) {
@@ -254,7 +254,7 @@ mymain(void)
virObjectUnref(driver.config);
virObjectUnref(driver.caps);
- virObjectUnref(driver.xmlconf);
+ virObjectUnref(driver.xmlopt);
VIR_FREE(map);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
index c132927..f585f6f 100644
--- a/tests/securityselinuxlabeltest.c
+++ b/tests/securityselinuxlabeltest.c
@@ -44,7 +44,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
static virCapsPtr caps;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
static virSecurityManagerPtr mgr;
@@ -166,7 +166,7 @@ testSELinuxLoadDef(const char *testname)
goto cleanup;
}
- if (!(def = virDomainDefParseString(xmlstr, caps, xmlconf,
+ if (!(def = virDomainDefParseString(xmlstr, caps, xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
0)))
goto cleanup;
@@ -328,7 +328,7 @@ mymain(void)
if ((caps = testQemuCapsInit()) == NULL)
return EXIT_FAILURE;
- if (!(xmlconf = virQEMUDriverCreateXMLConf(NULL)))
+ if (!(xmlopt = virQEMUDriverCreateXMLConf(NULL)))
return EXIT_FAILURE;
#define DO_TEST_LABELING(name) \
diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h
index 932becb..d7d5c0a 100644
--- a/tests/testutilsqemu.h
+++ b/tests/testutilsqemu.h
@@ -3,4 +3,4 @@
#include "domain_conf.h"
virCapsPtr testQemuCapsInit(void);
-virDomainXMLConfPtr testQemuXMLConfInit(void);
+virDomainXMLOptionPtr testQemuXMLConfInit(void);
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 07e7544..2d04da7 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -12,7 +12,7 @@
# include "vmx/vmx.h"
static virCapsPtr caps;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
static virVMXContext ctx;
@@ -84,7 +84,7 @@ testCompareFiles(const char *vmx, const char *xml)
goto failure;
}
- def = virVMXParseConfig(&ctx, xmlconf, vmxData);
+ def = virVMXParseConfig(&ctx, xmlopt, vmxData);
if (def == NULL) {
err = virGetLastError();
@@ -212,7 +212,7 @@ mymain(void)
return EXIT_FAILURE;
}
- if (!(xmlconf = virVMXDomainXMLConfInit()))
+ if (!(xmlopt = virVMXDomainXMLConfInit()))
return EXIT_FAILURE;
ctx.opaque = NULL;
@@ -290,7 +290,7 @@ mymain(void)
DO_TEST("svga", "svga");
virObjectUnref(caps);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return result == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c
index e19336f..b7ff48c 100644
--- a/tests/xmconfigtest.c
+++ b/tests/xmconfigtest.c
@@ -37,7 +37,7 @@
#include "viralloc.h"
static virCapsPtr caps;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
static int
testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion)
@@ -69,7 +69,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int
xendConfigVersion)
priv.caps = caps;
conn->privateData = &priv;
- if (!(def = virDomainDefParseString(xmlData, caps, xmlconf,
+ if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto fail;
@@ -196,7 +196,7 @@ mymain(void)
if (!(caps = testXenCapsInit()))
return EXIT_FAILURE;
- if (!(xmlconf = xenDomainXMLConfInit()))
+ if (!(xmlopt = xenDomainXMLConfInit()))
return EXIT_FAILURE;
#define DO_TEST(name, version) \
@@ -251,7 +251,7 @@ mymain(void)
DO_TEST("pci-devs", 2);
virObjectUnref(caps);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c
index 27a0905..062ff07 100644
--- a/tests/xml2sexprtest.c
+++ b/tests/xml2sexprtest.c
@@ -16,7 +16,7 @@
#include "testutilsxen.h"
static virCapsPtr caps;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
static int
testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion)
@@ -33,7 +33,7 @@ testCompareFiles(const char *xml, const char *sexpr, int
xendConfigVersion)
if (virtTestLoadFile(sexpr, &sexprData) < 0)
goto fail;
- if (!(def = virDomainDefParseString(xmlData, caps, xmlconf,
+ if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto fail;
@@ -105,7 +105,7 @@ mymain(void)
if (!(caps = testXenCapsInit()))
return EXIT_FAILURE;
- if (!(xmlconf = xenDomainXMLConfInit()))
+ if (!(xmlopt = xenDomainXMLConfInit()))
return EXIT_FAILURE;
DO_TEST("pv", "pv", "pvtest", 1);
@@ -175,7 +175,7 @@ mymain(void)
DO_TEST("escape", "escape", "fvtest", 1);
virObjectUnref(caps);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 8cc9257..86ab74a 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -13,7 +13,7 @@
static virCapsPtr caps;
static virVMXContext ctx;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
static void
@@ -84,7 +84,7 @@ testCompareFiles(const char *xml, const char *vmx, int
virtualHW_version)
goto failure;
}
- def = virDomainDefParseString(xmlData, caps, xmlconf,
+ def = virDomainDefParseString(xmlData, caps, xmlopt,
1 << VIR_DOMAIN_VIRT_VMWARE,
VIR_DOMAIN_XML_INACTIVE);
@@ -92,7 +92,7 @@ testCompareFiles(const char *xml, const char *vmx, int
virtualHW_version)
goto failure;
}
- formatted = virVMXFormatConfig(&ctx, xmlconf, def, virtualHW_version);
+ formatted = virVMXFormatConfig(&ctx, xmlopt, def, virtualHW_version);
if (formatted == NULL) {
goto failure;
@@ -230,7 +230,7 @@ mymain(void)
return EXIT_FAILURE;
}
- if (!(xmlconf = virVMXDomainXMLConfInit()))
+ if (!(xmlopt = virVMXDomainXMLConfInit()))
return EXIT_FAILURE;
ctx.opaque = NULL;
@@ -302,7 +302,7 @@ mymain(void)
DO_TEST("svga", "svga", 4);
virObjectUnref(caps);
- virObjectUnref(xmlconf);
+ virObjectUnref(xmlopt);
return result == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
--
1.8.1.5