]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
maint: Rename xmlconf to xmlopt and virDomainXMLConfig to virDomainXMLOption
authorPeter Krempa <pkrempa@redhat.com>
Sun, 31 Mar 2013 18:03:42 +0000 (20:03 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 4 Apr 2013 20:18:56 +0000 (22:18 +0200)
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

and a few manual tweaks.

60 files changed:
src/conf/capabilities.h
src/conf/domain_conf.c
src/conf/domain_conf.h
src/conf/snapshot_conf.c
src/conf/snapshot_conf.h
src/esx/esx_driver.c
src/esx/esx_private.h
src/libvirt_private.syms
src/libxl/libxl_conf.h
src/libxl/libxl_driver.c
src/lxc/lxc_conf.c
src/lxc/lxc_conf.h
src/lxc/lxc_controller.c
src/lxc/lxc_driver.c
src/lxc/lxc_process.c
src/openvz/openvz_conf.c
src/openvz/openvz_conf.h
src/openvz/openvz_driver.c
src/parallels/parallels_driver.c
src/parallels/parallels_utils.h
src/phyp/phyp_driver.c
src/phyp/phyp_driver.h
src/qemu/qemu_command.c
src/qemu/qemu_command.h
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_domain.c
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/qemu/qemu_process.c
src/security/virt-aa-helper.c
src/test/test_driver.c
src/uml/uml_conf.h
src/uml/uml_driver.c
src/vbox/vbox_tmpl.c
src/vmware/vmware_conf.c
src/vmware/vmware_conf.h
src/vmware/vmware_driver.c
src/xen/xen_driver.c
src/xen/xen_driver.h
src/xen/xend_internal.c
src/xen/xm_internal.c
src/xenapi/xenapi_driver.c
src/xenapi/xenapi_driver_private.h
tests/domainsnapshotxml2xmltest.c
tests/lxcxml2xmltest.c
tests/qemuargv2xmltest.c
tests/qemumonitorjsontest.c
tests/qemumonitortestutils.c
tests/qemumonitortestutils.h
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c
tests/qemuxmlnstest.c
tests/securityselinuxlabeltest.c
tests/testutilsqemu.h
tests/testutilsxen.c
tests/testutilsxen.h
tests/xmconfigtest.c
tests/xml2sexprtest.c
tests/xml2vmxtest.c

index a70896a978cfb15dcdebd516b27bbc811418c1b3..8abe88a9bf3d145625e22bfa85ffe6dd6f0198a7 100644 (file)
@@ -161,7 +161,7 @@ struct _virCaps {
     size_t nguests_max;
     virCapsGuestPtr *guests;
 
-    /* Move to virDomainXMLConf later */
+    /* Move to virDomainXMLOption later */
     unsigned char macPrefix[VIR_MAC_PREFIX_BUFLEN];
     unsigned int emulatorRequired : 1;
     const char *defaultDiskDriverName;
index cc26f21e33f151c718764a26d1f054a384b5919c..6714a8cd598efcac863d1a1b2ae41bfa00c0691d 100644 (file)
@@ -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;
 
     /* domain private data management callbacks */
@@ -720,7 +720,7 @@ 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);
 
@@ -738,10 +738,10 @@ static int virDomainObjOnceInit(void)
                                               virDomainObjListDispose)))
         return -1;
 
-    if (!(virDomainXMLConfClass = virClassNew(virClassForObject(),
-                                              "virDomainXMLConf",
-                                              sizeof(virDomainXMLConf),
-                                              NULL)))
+    if (!(virDomainXMLOptionClass = virClassNew(virClassForObject(),
+                                                "virDomainXMLOption",
+                                                sizeof(virDomainXMLOption),
+                                                NULL)))
         return -1;
 
     return 0;
@@ -751,43 +751,43 @@ VIR_ONCE_GLOBAL_INIT(virDomainObj)
 
 
 /**
- * virDomainXMLConfNew:
+ * virDomainXMLOptionNew:
  *
  * Allocate a new domain XML configuration
  */
-virDomainXMLConfPtr
-virDomainXMLConfNew(virDomainXMLPrivateDataCallbacksPtr priv,
-                    virDomainXMLNamespacePtr xmlns)
+virDomainXMLOptionPtr
+virDomainXMLOptionNew(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 (xmlns)
-        xmlconf->ns = *xmlns;
+        xmlopt->ns = *xmlns;
 
-    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;
 }
 
 
@@ -1901,7 +1901,7 @@ static void virDomainObjDispose(void *obj)
 }
 
 virDomainObjPtr
-virDomainObjNew(virDomainXMLConfPtr xmlconf)
+virDomainObjNew(virDomainXMLOptionPtr xmlopt)
 {
     virDomainObjPtr domain;
 
@@ -1911,12 +1911,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()))
@@ -1982,7 +1982,7 @@ void virDomainObjAssignDef(virDomainObjPtr domain,
  */
 static virDomainObjPtr
 virDomainObjListAddLocked(virDomainObjListPtr doms,
-                          virDomainXMLConfPtr xmlconf,
+                          virDomainXMLOptionPtr xmlopt,
                           const virDomainDefPtr def,
                           unsigned int flags,
                           virDomainDefPtr *oldDef)
@@ -2032,7 +2032,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
             goto error;
         }
 
-        if (!(vm = virDomainObjNew(xmlconf)))
+        if (!(vm = virDomainObjNew(xmlopt)))
             goto cleanup;
         vm->def = def;
 
@@ -2053,7 +2053,7 @@ error:
 
 
 virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
-                                    virDomainXMLConfPtr xmlconf,
+                                    virDomainXMLOptionPtr xmlopt,
                                     const virDomainDefPtr def,
                                     unsigned int flags,
                                     virDomainDefPtr *oldDef)
@@ -2061,7 +2061,7 @@ virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
     virDomainObjPtr ret;
 
     virObjectLock(doms);
-    ret = virDomainObjListAddLocked(doms, xmlconf, def, flags, oldDef);
+    ret = virDomainObjListAddLocked(doms, xmlopt, def, flags, oldDef);
     virObjectUnlock(doms);
     return ret;
 }
@@ -2080,7 +2080,7 @@ virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
  */
 int
 virDomainObjSetDefTransient(virCapsPtr caps,
-                            virDomainXMLConfPtr xmlconf,
+                            virDomainXMLOptionPtr xmlopt,
                             virDomainObjPtr domain,
                             bool live)
 {
@@ -2095,7 +2095,7 @@ virDomainObjSetDefTransient(virCapsPtr caps,
     if (domain->newDef)
         return 0;
 
-    if (!(domain->newDef = virDomainDefCopy(caps, xmlconf, domain->def, false)))
+    if (!(domain->newDef = virDomainDefCopy(caps, xmlopt, domain->def, false)))
         goto out;
 
     ret = 0;
@@ -2113,10 +2113,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)
@@ -2134,7 +2134,7 @@ virDomainObjGetPersistentDef(virCapsPtr caps,
  */
 int
 virDomainLiveConfigHelperMethod(virCapsPtr caps,
-                                virDomainXMLConfPtr xmlconf,
+                                virDomainXMLOptionPtr xmlopt,
                                 virDomainObjPtr dom,
                                 unsigned int *flags,
                                 virDomainDefPtr *persistentDef)
@@ -2165,7 +2165,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;
@@ -9380,7 +9380,7 @@ cleanup:
 
 static virDomainDefPtr
 virDomainDefParseXML(virCapsPtr caps,
-                     virDomainXMLConfPtr xmlconf,
+                     virDomainXMLOptionPtr xmlopt,
                      xmlDocPtr xml,
                      xmlNodePtr root,
                      xmlXPathContextPtr ctxt,
@@ -11019,7 +11019,7 @@ virDomainDefParseXML(virCapsPtr caps,
     /* 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)
@@ -11046,7 +11046,7 @@ error:
 
 static virDomainObjPtr
 virDomainObjParseXML(virCapsPtr caps,
-                     virDomainXMLConfPtr xmlconf,
+                     virDomainXMLOptionPtr xmlopt,
                      xmlDocPtr xml,
                      xmlXPathContextPtr ctxt,
                      unsigned int expectedVirtTypes,
@@ -11062,7 +11062,7 @@ virDomainObjParseXML(virCapsPtr caps,
     int state;
     int reason = 0;
 
-    if (!(obj = virDomainObjNew(xmlconf)))
+    if (!(obj = virDomainObjNew(xmlopt)))
         return NULL;
 
     if (!(config = virXPathNode("./domain", ctxt))) {
@@ -11073,7 +11073,7 @@ virDomainObjParseXML(virCapsPtr caps,
 
     oldnode = ctxt->node;
     ctxt->node = config;
-    obj->def = virDomainDefParseXML(caps, xmlconf, xml, config, ctxt, expectedVirtTypes,
+    obj->def = virDomainDefParseXML(caps, xmlopt, xml, config, ctxt, expectedVirtTypes,
                                     flags);
     ctxt->node = oldnode;
     if (!obj->def)
@@ -11130,8 +11130,8 @@ virDomainObjParseXML(virCapsPtr caps,
     }
     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;
@@ -11147,7 +11147,7 @@ static virDomainDefPtr
 virDomainDefParse(const char *xmlStr,
                   const char *filename,
                   virCapsPtr caps,
-                  virDomainXMLConfPtr xmlconf,
+                  virDomainXMLOptionPtr xmlopt,
                   unsigned int expectedVirtTypes,
                   unsigned int flags)
 {
@@ -11156,7 +11156,7 @@ virDomainDefParse(const char *xmlStr,
     int keepBlanksDefault = xmlKeepBlanksDefault(0);
 
     if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) {
-        def = virDomainDefParseNode(caps, xmlconf, xml, xmlDocGetRootElement(xml),
+        def = virDomainDefParseNode(caps, xmlopt, xml, xmlDocGetRootElement(xml),
                                     expectedVirtTypes, flags);
         xmlFreeDoc(xml);
     }
@@ -11167,30 +11167,30 @@ virDomainDefParse(const char *xmlStr,
 
 virDomainDefPtr
 virDomainDefParseString(virCapsPtr caps,
-                        virDomainXMLConfPtr xmlconf,
+                        virDomainXMLOptionPtr xmlopt,
                         const char *xmlStr,
                         unsigned int expectedVirtTypes,
                         unsigned int flags)
 {
-    return virDomainDefParse(xmlStr, NULL, caps, xmlconf,
+    return virDomainDefParse(xmlStr, NULL, caps, xmlopt,
                              expectedVirtTypes, flags);
 }
 
 virDomainDefPtr
 virDomainDefParseFile(virCapsPtr caps,
-                      virDomainXMLConfPtr xmlconf,
+                      virDomainXMLOptionPtr xmlopt,
                       const char *filename,
                       unsigned int expectedVirtTypes,
                       unsigned int flags)
 {
-    return virDomainDefParse(NULL, filename, caps, xmlconf,
+    return virDomainDefParse(NULL, filename, caps, xmlopt,
                              expectedVirtTypes, flags);
 }
 
 
 virDomainDefPtr
 virDomainDefParseNode(virCapsPtr caps,
-                      virDomainXMLConfPtr xmlconf,
+                      virDomainXMLOptionPtr xmlopt,
                       xmlDocPtr xml,
                       xmlNodePtr root,
                       unsigned int expectedVirtTypes,
@@ -11214,7 +11214,7 @@ virDomainDefParseNode(virCapsPtr caps,
     }
 
     ctxt->node = root;
-    def = virDomainDefParseXML(caps, xmlconf, xml, root, ctxt,
+    def = virDomainDefParseXML(caps, xmlopt, xml, root, ctxt,
                                expectedVirtTypes, flags);
 
 cleanup:
@@ -11225,7 +11225,7 @@ cleanup:
 
 static virDomainObjPtr
 virDomainObjParseNode(virCapsPtr caps,
-                      virDomainXMLConfPtr xmlconf,
+                      virDomainXMLOptionPtr xmlopt,
                       xmlDocPtr xml,
                       xmlNodePtr root,
                       unsigned int expectedVirtTypes,
@@ -11248,7 +11248,7 @@ virDomainObjParseNode(virCapsPtr caps,
     }
 
     ctxt->node = root;
-    obj = virDomainObjParseXML(caps, xmlconf, xml, ctxt, expectedVirtTypes, flags);
+    obj = virDomainObjParseXML(caps, xmlopt, xml, ctxt, expectedVirtTypes, flags);
 
 cleanup:
     xmlXPathFreeContext(ctxt);
@@ -11258,7 +11258,7 @@ cleanup:
 
 static virDomainObjPtr
 virDomainObjParseFile(virCapsPtr caps,
-                      virDomainXMLConfPtr xmlconf,
+                      virDomainXMLOptionPtr xmlopt,
                       const char *filename,
                       unsigned int expectedVirtTypes,
                       unsigned int flags)
@@ -11268,7 +11268,7 @@ virDomainObjParseFile(virCapsPtr caps,
     int keepBlanksDefault = xmlKeepBlanksDefault(0);
 
     if ((xml = virXMLParseFile(filename))) {
-        obj = virDomainObjParseNode(caps, xmlconf, xml,
+        obj = virDomainObjParseNode(caps, xmlopt, xml,
                                     xmlDocGetRootElement(xml),
                                     expectedVirtTypes, flags);
         xmlFreeDoc(xml);
@@ -15243,7 +15243,7 @@ virDomainDefFormat(virDomainDefPtr def, unsigned int flags)
 
 
 static char *
-virDomainObjFormat(virDomainXMLConfPtr xmlconf,
+virDomainObjFormat(virDomainXMLOptionPtr xmlopt,
                    virDomainObjPtr obj,
                    unsigned int flags)
 {
@@ -15264,8 +15264,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);
@@ -15388,7 +15388,7 @@ cleanup:
 }
 
 int
-virDomainSaveStatus(virDomainXMLConfPtr xmlconf,
+virDomainSaveStatus(virDomainXMLOptionPtr xmlopt,
                     const char *statusDir,
                     virDomainObjPtr obj)
 {
@@ -15400,7 +15400,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))
@@ -15416,7 +15416,7 @@ cleanup:
 static virDomainObjPtr
 virDomainObjListLoadConfig(virDomainObjListPtr doms,
                            virCapsPtr caps,
-                           virDomainXMLConfPtr xmlconf,
+                           virDomainXMLOptionPtr xmlopt,
                            const char *configDir,
                            const char *autostartDir,
                            const char *name,
@@ -15432,7 +15432,7 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
 
     if ((configFile = virDomainConfigFile(configDir, name)) == NULL)
         goto error;
-    if (!(def = virDomainDefParseFile(caps, xmlconf, configFile,
+    if (!(def = virDomainDefParseFile(caps, xmlopt, configFile,
                                       expectedVirtTypes,
                                       VIR_DOMAIN_XML_INACTIVE)))
         goto error;
@@ -15443,7 +15443,7 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
     if ((autostart = virFileLinkPointsTo(autostartLink, configFile)) < 0)
         goto error;
 
-    if (!(dom = virDomainObjListAddLocked(doms, xmlconf, def, 0, &oldDef)))
+    if (!(dom = virDomainObjListAddLocked(doms, xmlopt, def, 0, &oldDef)))
         goto error;
 
     dom->autostart = autostart;
@@ -15466,7 +15466,7 @@ error:
 static virDomainObjPtr
 virDomainObjListLoadStatus(virDomainObjListPtr doms,
                            virCapsPtr caps,
-                           virDomainXMLConfPtr xmlconf,
+                           virDomainXMLOptionPtr xmlopt,
                            const char *statusDir,
                            const char *name,
                            unsigned int expectedVirtTypes,
@@ -15480,7 +15480,7 @@ virDomainObjListLoadStatus(virDomainObjListPtr doms,
     if ((statusFile = virDomainConfigFile(statusDir, name)) == NULL)
         goto error;
 
-    if (!(obj = virDomainObjParseFile(caps, xmlconf, statusFile, expectedVirtTypes,
+    if (!(obj = virDomainObjParseFile(caps, xmlopt, statusFile, expectedVirtTypes,
                                       VIR_DOMAIN_XML_INTERNAL_STATUS |
                                       VIR_DOMAIN_XML_INTERNAL_ACTUAL_NET |
                                       VIR_DOMAIN_XML_INTERNAL_PCI_ORIG_STATES)))
@@ -15513,7 +15513,7 @@ error:
 int
 virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
                                virCapsPtr caps,
-                               virDomainXMLConfPtr xmlconf,
+                               virDomainXMLOptionPtr xmlopt,
                                const char *configDir,
                                const char *autostartDir,
                                int liveStatus,
@@ -15552,7 +15552,7 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
         if (liveStatus)
             dom = virDomainObjListLoadStatus(doms,
                                              caps,
-                                             xmlconf,
+                                             xmlopt,
                                              configDir,
                                              entry->d_name,
                                              expectedVirtTypes,
@@ -15561,7 +15561,7 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
         else
             dom = virDomainObjListLoadConfig(doms,
                                              caps,
-                                             xmlconf,
+                                             xmlopt,
                                              configDir,
                                              autostartDir,
                                              entry->d_name,
@@ -15955,7 +15955,7 @@ cleanup:
  * snapshots).  */
 virDomainDefPtr
 virDomainDefCopy(virCapsPtr caps,
-                 virDomainXMLConfPtr xmlconf,
+                 virDomainXMLOptionPtr xmlopt,
                  virDomainDefPtr src,
                  bool migratable)
 {
@@ -15971,7 +15971,7 @@ virDomainDefCopy(virCapsPtr caps,
     if (!(xml = virDomainDefFormat(src, write_flags)))
         return NULL;
 
-    ret = virDomainDefParseString(caps, xmlconf, xml, -1, read_flags);
+    ret = virDomainDefParseString(caps, xmlopt, xml, -1, read_flags);
 
     VIR_FREE(xml);
     return ret;
@@ -15979,13 +15979,13 @@ virDomainDefCopy(virCapsPtr caps,
 
 virDomainDefPtr
 virDomainObjCopyPersistentDef(virCapsPtr caps,
-                              virDomainXMLConfPtr xmlconf,
+                              virDomainXMLOptionPtr xmlopt,
                               virDomainObjPtr dom)
 {
     virDomainDefPtr cur;
 
-    cur = virDomainObjGetPersistentDef(caps, xmlconf, dom);
-    return virDomainDefCopy(caps, xmlconf, cur, false);
+    cur = virDomainObjGetPersistentDef(caps, xmlopt, dom);
+    return virDomainDefCopy(caps, xmlopt, cur, false);
 }
 
 
index edddf2545d2a093d00cd7285a13e4d28f1f58645..5fb2023fdaa50b86c6bf57b45bb737065009cabb 100644 (file)
@@ -1930,8 +1930,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 *);
@@ -1947,12 +1947,12 @@ struct _virDomainXMLPrivateDataCallbacks {
     virDomainXMLPrivateDataParseFunc  parse;
 };
 
-virDomainXMLConfPtr
-virDomainXMLConfNew(virDomainXMLPrivateDataCallbacksPtr priv,
+virDomainXMLOptionPtr
+virDomainXMLOptionNew(virDomainXMLPrivateDataCallbacksPtr priv,
                     virDomainXMLNamespacePtr xmlns);
 
 virDomainXMLNamespacePtr
-virDomainXMLConfGetNamespace(virDomainXMLConfPtr xmlconf)
+virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
     ATTRIBUTE_NONNULL(1);
 
 static inline bool
@@ -1961,7 +1961,7 @@ virDomainObjIsActive(virDomainObjPtr dom)
     return dom->def->id != -1;
 }
 
-virDomainObjPtr virDomainObjNew(virDomainXMLConfPtr caps)
+virDomainObjPtr virDomainObjNew(virDomainXMLOptionPtr caps)
     ATTRIBUTE_NONNULL(1);
 
 virDomainObjListPtr virDomainObjListNew(void);
@@ -2038,7 +2038,7 @@ enum {
     VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE = (1 << 1),
 };
 virDomainObjPtr virDomainObjListAdd(virDomainObjListPtr doms,
-                                    virDomainXMLConfPtr xmlconf,
+                                    virDomainXMLOptionPtr xmlopt,
                                     const virDomainDefPtr def,
                                     unsigned int flags,
                                     virDomainDefPtr *oldDef);
@@ -2047,25 +2047,25 @@ 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(virCapsPtr caps, virDomainXMLConfPtr xmlconf,
+virDomainDefPtr virDomainDefCopy(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
                                  virDomainDefPtr src, bool migratable);
 virDomainDefPtr
-virDomainObjCopyPersistentDef(virCapsPtr caps, virDomainXMLConfPtr xmlconf,
+virDomainObjCopyPersistentDef(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
                               virDomainObjPtr dom);
 
 void virDomainObjListRemove(virDomainObjListPtr doms,
@@ -2076,17 +2076,17 @@ virDomainDeviceDefPtr virDomainDeviceDefParse(virCapsPtr caps,
                                               const char *xmlStr,
                                               unsigned int flags);
 virDomainDefPtr virDomainDefParseString(virCapsPtr caps,
-                                        virDomainXMLConfPtr xmlconf,
+                                        virDomainXMLOptionPtr xmlopt,
                                         const char *xmlStr,
                                         unsigned int expectedVirtTypes,
                                         unsigned int flags);
 virDomainDefPtr virDomainDefParseFile(virCapsPtr caps,
-                                      virDomainXMLConfPtr xmlconf,
+                                      virDomainXMLOptionPtr xmlopt,
                                       const char *filename,
                                       unsigned int expectedVirtTypes,
                                       unsigned int flags);
 virDomainDefPtr virDomainDefParseNode(virCapsPtr caps,
-                                      virDomainXMLConfPtr xmlconf,
+                                      virDomainXMLOptionPtr xmlopt,
                                       xmlDocPtr doc,
                                       xmlNodePtr root,
                                       unsigned int expectedVirtTypes,
@@ -2203,7 +2203,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;
 
@@ -2213,7 +2213,7 @@ typedef void (*virDomainLoadConfigNotify)(virDomainObjPtr dom,
 
 int virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
                                    virCapsPtr caps,
-                                   virDomainXMLConfPtr xmlconf,
+                                   virDomainXMLOptionPtr xmlopt,
                                    const char *configDir,
                                    const char *autostartDir,
                                    int liveStatus,
index 1154202379817224b73085bccdb4c9b4bbeb77a7..3a3173ffada7344cbabdeaf2d7a7a572de3c60a4 100644 (file)
@@ -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(caps, xmlconf, xml, domainNode,
+            def->dom = virDomainDefParseNode(caps, xmlopt, xml, domainNode,
                                              expectedVirtTypes,
                                              (VIR_DOMAIN_XML_INACTIVE |
                                               VIR_DOMAIN_XML_SECURE));
index e8bd24a537abb9df801660e48176263a5f7c219f..6d625a7d70ea6cb79e60d18ebd61a8deb191ec6c 100644 (file)
@@ -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);
index fc8a3aeb5659150e6c349440803a1c10d602058e..3e49ec073ad46a70dc805c53597a45bca238890c 100644 (file)
@@ -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);
 }
 
@@ -1100,7 +1100,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
         goto cleanup;
     }
 
-    if (!(priv->xmlconf = virDomainXMLConfNew(NULL, NULL)))
+    if (!(priv->xmlopt = virDomainXMLOptionNew(NULL, NULL)))
         goto cleanup;
 
     conn->privateData = priv;
@@ -2887,7 +2887,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
         return NULL;
     }
 
-    def = virDomainDefParseString(priv->caps, priv->xmlconf,
+    def = virDomainDefParseString(priv->caps, priv->xmlopt,
                                   domainXml, 1 << VIR_DOMAIN_VIRT_VMWARE, 0);
 
     if (def == NULL) {
@@ -3103,7 +3103,7 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml)
     }
 
     /* Parse domain XML */
-    def = virDomainDefParseString(priv->caps, priv->xmlconf,
+    def = virDomainDefParseString(priv->caps, priv->xmlopt,
                                   xml, 1 << VIR_DOMAIN_VIRT_VMWARE,
                                   VIR_DOMAIN_XML_INACTIVE);
 
@@ -4276,7 +4276,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;
index 29731301606269ed516a32f1a67ba9c7240c63ca..83e945f13c91959147967d58ef8cc2029ce76a17 100644 (file)
@@ -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 */
index 96eea0a424930b1e823e7b656d79d9014ef13a4e..2930104da33859bb86db4f761e6a98e381af819f 100644 (file)
@@ -341,8 +341,8 @@ virDomainWatchdogActionTypeFromString;
 virDomainWatchdogActionTypeToString;
 virDomainWatchdogModelTypeFromString;
 virDomainWatchdogModelTypeToString;
-virDomainXMLConfGetNamespace;
-virDomainXMLConfNew;
+virDomainXMLOptionGetNamespace;
+virDomainXMLOptionNew;
 virSecurityDeviceLabelDefFree;
 virSecurityLabelDefFree;
 
index f8602b410054d27946ce491777c2b42b5b5859aa..fed878d898a29e57dbf8c86cc71fb492cee6627c 100644 (file)
@@ -54,7 +54,7 @@ typedef libxlDriverPrivate *libxlDriverPrivatePtr;
 struct _libxlDriverPrivate {
     virMutex lock;
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
     unsigned int version;
 
     FILE *logger_file;
index 40a7a6bb8c55c37695ac32b11c5564a822f62127..7c033fa098c514d1c4a599a42e605ca2cff363a5 100644 (file)
@@ -563,7 +563,7 @@ libxlSaveImageOpen(libxlDriverPrivatePtr driver, const char *from,
         goto error;
     }
 
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt,
                                         xml, 1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto error;
@@ -976,7 +976,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)
@@ -1080,7 +1080,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);
@@ -1239,14 +1239,14 @@ libxlStartup(bool privileged,
         goto error;
     }
 
-    if (!(libxl_driver->xmlconf = virDomainXMLConfNew(&libxlDomainXMLPrivateDataCallbacks,
+    if (!(libxl_driver->xmlopt = virDomainXMLOptionNew(&libxlDomainXMLPrivateDataCallbacks,
                                                       NULL)))
         goto error;
 
     /* Load running domains first. */
     if (virDomainObjListLoadAllConfigs(libxl_driver->domains,
                                        libxl_driver->caps,
-                                       libxl_driver->xmlconf,
+                                       libxl_driver->xmlopt,
                                        libxl_driver->stateDir,
                                        libxl_driver->autostartDir,
                                        1, 1 << VIR_DOMAIN_VIRT_XEN,
@@ -1258,7 +1258,7 @@ libxlStartup(bool privileged,
     /* Then inactive persistent configs */
     if (virDomainObjListLoadAllConfigs(libxl_driver->domains,
                                        libxl_driver->caps,
-                                       libxl_driver->xmlconf,
+                                       libxl_driver->xmlopt,
                                        libxl_driver->configDir,
                                        libxl_driver->autostartDir,
                                        0, 1 << VIR_DOMAIN_VIRT_XEN,
@@ -1296,7 +1296,7 @@ libxlReload(void)
     libxlDriverLock(libxl_driver);
     virDomainObjListLoadAllConfigs(libxl_driver->domains,
                                    libxl_driver->caps,
-                                   libxl_driver->xmlconf,
+                                   libxl_driver->xmlopt,
                                    libxl_driver->configDir,
                                    libxl_driver->autostartDir,
                                    1, 1 << VIR_DOMAIN_VIRT_XEN,
@@ -1454,13 +1454,13 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(VIR_DOMAIN_START_PAUSED, NULL);
 
     libxlDriverLock(driver);
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt,
                                         xml, 1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
@@ -1605,7 +1605,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;
@@ -1665,7 +1665,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;
@@ -1936,7 +1936,7 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
             goto cleanup;
         }
         if (!(persistentDef = virDomainObjGetPersistentDef(driver->caps,
-                                                           driver->xmlconf,
+                                                           driver->xmlopt,
                                                            vm)))
             goto cleanup;
     }
@@ -2242,7 +2242,7 @@ libxlDomainRestoreFlags(virConnectPtr conn, const char *from,
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
@@ -2580,7 +2580,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);
@@ -2758,7 +2758,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;
@@ -2931,7 +2931,7 @@ libxlDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
         goto cleanup;
     }
 
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf, domainXml,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt, domainXml,
                                         1 << VIR_DOMAIN_VIRT_XEN, 0)))
         goto cleanup;
 
@@ -3033,13 +3033,13 @@ libxlDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainDefPtr oldDef = NULL;
 
     libxlDriverLock(driver);
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf, xml,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt, xml,
                                         1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    0,
                                    &oldDef)))
@@ -3562,7 +3562,7 @@ libxlDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
 
         /* Make a copy for updated domain. */
         if (!(vmdef = virDomainObjCopyPersistentDef(driver->caps,
-                                                    driver->xmlconf, vm)))
+                                                    driver->xmlopt, vm)))
             goto cleanup;
 
         switch (action) {
@@ -3609,7 +3609,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;
     }
 
index c723e77b1b02da7184162a963971b2c5d7889d68..ab6c7493f5bebb6074d6b31f91cedf05670e7c60 100644 (file)
@@ -156,10 +156,10 @@ error:
 }
 
 
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
 lxcDomainXMLConfInit(void)
 {
-    return virDomainXMLConfNew(&virLXCDriverPrivateDataCallbacks, NULL);
+    return virDomainXMLOptionNew(&virLXCDriverPrivateDataCallbacks, NULL);
 }
 
 int lxcLoadDriverConfig(virLXCDriverPtr driver)
index f8f7c9ad7132f30f4ed268eeea9ebf6a78215b3a..f7aaff09f11c28ebd425dc183eb3cd75b5317f73 100644 (file)
@@ -52,7 +52,7 @@ struct _virLXCDriver {
     virMutex lock;
 
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
 
     virCgroupPtr cgroup;
 
@@ -87,7 +87,7 @@ struct _virLXCDriver {
 
 int lxcLoadDriverConfig(virLXCDriverPtr driver);
 virCapsPtr lxcCapsInit(virLXCDriverPtr driver);
-virDomainXMLConfPtr lxcDomainXMLConfInit(void);
+virDomainXMLOptionPtr lxcDomainXMLConfInit(void);
 
 static inline void lxcDriverLock(virLXCDriverPtr driver)
 {
index cede4455bb01145f6bf78e7a531c664382f1e076..956d1f32ecb7a930791e7012595342cdac586a51 100644 (file)
@@ -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,14 +162,14 @@ 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,
                                           ctrl->name)) == NULL)
         goto error;
 
-    if ((ctrl->def = virDomainDefParseFile(caps, xmlconf,
+    if ((ctrl->def = virDomainDefParseFile(caps, xmlopt,
                                            configFile,
                                            1 << VIR_DOMAIN_VIRT_LXC,
                                            0)) == NULL)
@@ -183,7 +183,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
 cleanup:
     VIR_FREE(configFile);
     virObjectUnref(caps);
-    virObjectUnref(xmlconf);
+    virObjectUnref(xmlopt);
     return ctrl;
 
 no_memory:
index bb65ac7584251890c5bf5a78b3482ff7430b85b8..c5bc7b26efc55e47203b47d9c320cd8fd5dfecd7 100644 (file)
@@ -413,7 +413,7 @@ static virDomainPtr lxcDomainDefine(virConnectPtr conn, const char *xml)
     virDomainDefPtr oldDef = NULL;
 
     lxcDriverLock(driver);
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf, xml,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt, xml,
                                         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,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    0,
                                    &oldDef)))
@@ -1069,7 +1069,7 @@ lxcDomainCreateAndStart(virConnectPtr conn,
     virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, NULL);
 
     lxcDriverLock(driver);
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf, xml,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt, xml,
                                         1 << VIR_DOMAIN_VIRT_LXC,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
@@ -1085,7 +1085,7 @@ lxcDomainCreateAndStart(virConnectPtr conn,
 
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
@@ -1485,7 +1485,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)
@@ -1494,7 +1494,7 @@ static int lxcStartup(bool privileged,
     /* Get all the running persistent or transient configs first */
     if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
                                        lxc_driver->caps,
-                                       lxc_driver->xmlconf,
+                                       lxc_driver->xmlopt,
                                        lxc_driver->stateDir,
                                        NULL,
                                        1, 1 << VIR_DOMAIN_VIRT_LXC,
@@ -1506,7 +1506,7 @@ static int lxcStartup(bool privileged,
     /* Then inactive persistent configs */
     if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
                                        lxc_driver->caps,
-                                       lxc_driver->xmlconf,
+                                       lxc_driver->xmlopt,
                                        lxc_driver->configDir,
                                        lxc_driver->autostartDir,
                                        0, 1 << VIR_DOMAIN_VIRT_LXC,
@@ -1554,7 +1554,7 @@ lxcReload(void) {
     lxcDriverLock(lxc_driver);
     virDomainObjListLoadAllConfigs(lxc_driver->domains,
                                    lxc_driver->caps,
-                                   lxc_driver->xmlconf,
+                                   lxc_driver->xmlopt,
                                    lxc_driver->configDir,
                                    lxc_driver->autostartDir,
                                    0, 1 << VIR_DOMAIN_VIRT_LXC,
@@ -1581,7 +1581,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);
@@ -1803,13 +1803,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(driver->caps, driver->xmlconf, vm);
+        vmdef = virDomainObjCopyPersistentDef(driver->caps, driver->xmlopt, vm);
         if (!vmdef)
             goto cleanup;
     }
@@ -1875,7 +1875,7 @@ lxcSetSchedulerParametersFlags(virDomainPtr dom,
         }
     }
 
-    if (virDomainSaveStatus(driver->xmlconf, driver->stateDir, vm) < 0)
+    if (virDomainSaveStatus(driver->xmlopt, driver->stateDir, vm) < 0)
         goto cleanup;
 
 
@@ -1945,7 +1945,7 @@ lxcGetSchedulerParametersFlags(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+    if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
                                         vm, &flags, &persistentDef) < 0)
         goto cleanup;
 
@@ -2058,7 +2058,7 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+    if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
                                         vm, &flags, &persistentDef) < 0)
         goto cleanup;
 
@@ -2163,7 +2163,7 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlconf,
+    if (virDomainLiveConfigHelperMethod(driver->caps, driver->xmlopt,
                                         vm, &flags, &persistentDef) < 0)
         goto cleanup;
 
@@ -2529,7 +2529,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;
 
@@ -2595,7 +2595,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;
 
@@ -4374,7 +4374,7 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
             goto cleanup;
 
         /* Make a copy for updated domain. */
-        vmdef = virDomainObjCopyPersistentDef(driver->caps, driver->xmlconf, vm);
+        vmdef = virDomainObjCopyPersistentDef(driver->caps, driver->xmlopt, vm);
         if (!vmdef)
             goto cleanup;
         switch (action) {
@@ -4422,7 +4422,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;
         }
index f2f66e42910d5d224c6d0287bd8eb5eae85f09f1..06090c6bc037a0a5bb209273f419a1f9824eaa44 100644 (file)
@@ -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);
@@ -1090,7 +1090,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 */
@@ -1290,7 +1290,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;
 
@@ -1300,7 +1300,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 */
index f175655c2bb8ee48be7fe59d668de6934f30613a..8858c2dbed8dd0843c49c1f21974669aae09a2d6 100644 (file)
@@ -558,7 +558,7 @@ openvzFreeDriver(struct openvz_driver *driver)
     if (!driver)
         return;
 
-    virObjectUnref(driver->xmlconf);
+    virObjectUnref(driver->xmlopt);
     virObjectUnref(driver->domains);
     virObjectUnref(driver->caps);
     VIR_FREE(driver);
@@ -649,7 +649,7 @@ int openvzLoadDomains(struct openvz_driver *driver) {
             flags |= VIR_DOMAIN_OBJ_LIST_ADD_LIVE;
 
         if (!(dom = virDomainObjListAdd(driver->domains,
-                                        driver->xmlconf,
+                                        driver->xmlopt,
                                         def,
                                         flags,
                                         NULL)))
index a030b429dde0363053faebd681e4820903cbd748..47b512345805c30052b82c6f9b74eed09f2b836b 100644 (file)
@@ -45,7 +45,7 @@ struct openvz_driver {
     virMutex lock;
 
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
     virDomainObjListPtr domains;
     int version;
 };
index 67d66ae60a71ee5f128070834124ffec142ec2a3..2fd6a41a29fe5bbd3bf394aa3cec749dec8ba22f 100644 (file)
@@ -955,7 +955,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainPtr dom = NULL;
 
     openvzDriverLock(driver);
-    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlopt,
                                          xml, 1 << VIR_DOMAIN_VIRT_OPENVZ,
                                          VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -968,7 +968,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
         goto cleanup;
     }
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    vmdef, 0, NULL)))
         goto cleanup;
     vmdef = NULL;
@@ -1042,7 +1042,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(0, NULL);
 
     openvzDriverLock(driver);
-    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlopt,
                                          xml, 1 << VIR_DOMAIN_VIRT_OPENVZ,
                                          VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -1055,7 +1055,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
         goto cleanup;
     }
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    vmdef,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
@@ -1453,7 +1453,7 @@ static virDrvOpenStatus openvzOpen(virConnectPtr conn,
     if (!(driver->caps = openvzCapsInit()))
         goto cleanup;
 
-    if (!(driver->xmlconf = virDomainXMLConfNew(NULL, NULL)))
+    if (!(driver->xmlopt = virDomainXMLOptionNew(NULL, NULL)))
         goto cleanup;
 
     if (openvzLoadDomains(driver) < 0)
@@ -2079,7 +2079,7 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
     }
 
     if (virDomainLiveConfigHelperMethod(driver->caps,
-                                        driver->xmlconf,
+                                        driver->xmlopt,
                                         vm,
                                         &flags,
                                         &vmdef) < 0)
index 88f41f7a2ed209d80b2af201ff69a316377bbf5d..1d74340f34ca3f4c8233d86db5b0f2ef94ef2967 100644 (file)
@@ -831,7 +831,7 @@ parallelsLoadDomain(parallelsConnPtr privconn, virJSONValuePtr jobj)
         goto cleanup;
 
     if (!(dom = virDomainObjListAdd(privconn->domains,
-                                    privconn->xmlconf,
+                                    privconn->xmlopt,
                                     def, 0, NULL)))
         goto cleanup;
     /* dom is locked here */
@@ -929,7 +929,7 @@ parallelsOpenDefault(virConnectPtr conn)
     if (!(privconn->caps = parallelsBuildCapabilities()))
         goto error;
 
-    if (!(privconn->xmlconf = virDomainXMLConfNew(NULL, NULL)))
+    if (!(privconn->xmlopt = virDomainXMLOptionNew(NULL, NULL)))
         goto error;
 
     if (!(privconn->domains = virDomainObjListNew()))
@@ -990,7 +990,7 @@ parallelsClose(virConnectPtr conn)
 
     parallelsDriverLock(privconn);
     virObjectUnref(privconn->caps);
-    virObjectUnref(privconn->xmlconf);
+    virObjectUnref(privconn->xmlopt);
     virObjectUnref(privconn->domains);
     conn->privateData = NULL;
 
@@ -2330,7 +2330,7 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainObjPtr dom = NULL, olddom = NULL;
 
     parallelsDriverLock(privconn);
-    if ((def = virDomainDefParseString(privconn->caps, privconn->xmlconf,
+    if ((def = virDomainDefParseString(privconn->caps, privconn->xmlopt,
                                        xml, 1 << VIR_DOMAIN_VIRT_PARALLELS,
                                        VIR_DOMAIN_XML_INACTIVE)) == NULL) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
@@ -2370,7 +2370,7 @@ parallelsDomainDefineXML(virConnectPtr conn, const char *xml)
     virObjectUnlock(olddom);
 
     if (!(dom = virDomainObjListAdd(privconn->domains,
-                                    privconn->xmlconf,
+                                    privconn->xmlopt,
                                     def, 0, NULL))) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("Can't allocate domobj"));
index 59ef18e35578a4065c889fa3fecce5511debc845..603f2de9cef649ebd56508d5c4bddc7ceedabee2 100644 (file)
@@ -43,7 +43,7 @@ struct _parallelsConn {
     virStoragePoolObjList pools;
     virNetworkObjList networks;
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
     virDomainEventStatePtr domainEventState;
 };
 
index 59cc1ca9e35acc82f5c572764a009df6a09e222d..090581c0730368c55f3000c89ba4183fbb6f2524 100644 (file)
@@ -1204,7 +1204,7 @@ phypOpen(virConnectPtr conn,
         goto failure;
     }
 
-    if (!(phyp_driver->xmlconf = virDomainXMLConfNew(NULL, NULL)))
+    if (!(phyp_driver->xmlopt = virDomainXMLOptionNew(NULL, NULL)))
         goto failure;
 
     conn->privateData = phyp_driver;
@@ -1255,7 +1255,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);
@@ -3637,7 +3637,7 @@ phypDomainCreateAndStart(virConnectPtr conn,
 
     virCheckFlags(0, NULL);
 
-    if (!(def = virDomainDefParseString(phyp_driver->caps, phyp_driver->xmlconf,
+    if (!(def = virDomainDefParseString(phyp_driver->caps, phyp_driver->xmlopt,
                                         xml, 1 << VIR_DOMAIN_VIRT_PHYP,
                                         VIR_DOMAIN_XML_SECURE)))
         goto err;
index 8d4cc16e799a8b9282be88e4b925e08ca1a1bb54..59a43704c1c6e57ada1d4a0ceb0bac9487956830 100644 (file)
@@ -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:
index 29424d6d8077855387c2f2514f434576cb8874bf..5866070779e7be11db4e2857cc901d2a8436328a 100644 (file)
@@ -9035,7 +9035,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,
@@ -9891,7 +9891,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
@@ -9917,7 +9917,7 @@ error:
 
 
 virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
-                                           virDomainXMLConfPtr xmlconf,
+                                           virDomainXMLOptionPtr xmlopt,
                                            const char *args,
                                            char **pidfile,
                                            virDomainChrSourceDefPtr *monConfig,
@@ -9931,7 +9931,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:
@@ -10007,7 +10007,7 @@ cleanup:
 }
 
 virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
-                                        virDomainXMLConfPtr xmlconf,
+                                        virDomainXMLOptionPtr xmlopt,
                                         pid_t pid,
                                         char **pidfile,
                                         virDomainChrSourceDefPtr *monConfig,
@@ -10027,7 +10027,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;
 
index 17687f41d1bd26e24f063f0267e8b5d4091df879..2db1551632a7fc7d9c1aeea9c986c88060b9a4a9 100644 (file)
@@ -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,
index c2e2e1091423556d3cff5b6af2772b934230a6bc..15c6d89d12c34a1f99e23addf7def8c5bcc2dbea 100644 (file)
@@ -551,10 +551,10 @@ virQEMUDriverConfigPtr virQEMUDriverGetConfig(virQEMUDriverPtr driver)
     return conf;
 }
 
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
 virQEMUDriverCreateXMLConf(void)
 {
-    return virDomainXMLConfNew(&virQEMUDriverPrivateDataCallbacks,
+    return virDomainXMLOptionNew(&virQEMUDriverPrivateDataCallbacks,
                                &virQEMUDriverDomainXMLNamespace);
 }
 
index c5ddaad0e64ae243658390b663c87c6265452299..12f74be43650ba1870590e245ea063152a7ee920 100644 (file)
@@ -189,7 +189,7 @@ struct _virQEMUDriver {
     virCapsPtr caps;
 
     /* Immutable pointer, Immutable object */
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
 
     /* Immutable pointer, self-locking APIs */
     virQEMUCapsCachePtr qemuCapsCache;
@@ -301,6 +301,6 @@ void qemuSharedDiskEntryFree(void *payload, const void *name)
     ATTRIBUTE_NONNULL(1);
 
 int qemuDriverAllocateID(virQEMUDriverPtr driver);
-virDomainXMLConfPtr virQEMUDriverCreateXMLConf(void);
+virDomainXMLOptionPtr virQEMUDriverCreateXMLConf(void);
 
 #endif /* __QEMUD_CONF_H */
index c79b05ddad0e6d5f7200ebcc4b7af0c0d2a3fc65..a0a66dd15f6bcd9cb2aae7a76e4c332c48e4e13a 100644 (file)
@@ -668,7 +668,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);
     }
 
@@ -1784,7 +1784,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:
index 552a81b22efb943b6cbb9392f6a19dbd0862fa96..6ba899f8f102e9177922f5d1dc00ed35f365f072 100644 (file)
@@ -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()))
+    if (!(qemu_driver->xmlopt = virQEMUDriverCreateXMLConf()))
         goto error;
 
     /* If hugetlbfs is present, then we need to create a sub-directory within
@@ -767,7 +767,7 @@ qemuStartup(bool privileged,
     /* Get all the running persistent or transient configs first */
     if (virDomainObjListLoadAllConfigs(qemu_driver->domains,
                                        qemu_driver->caps,
-                                       qemu_driver->xmlconf,
+                                       qemu_driver->xmlopt,
                                        cfg->stateDir,
                                        NULL,
                                        1, QEMU_EXPECTED_VIRT_TYPES,
@@ -792,7 +792,7 @@ qemuStartup(bool privileged,
     /* Then inactive persistent configs */
     if (virDomainObjListLoadAllConfigs(qemu_driver->domains,
                                        qemu_driver->caps,
-                                       qemu_driver->xmlconf,
+                                       qemu_driver->xmlopt,
                                        cfg->configDir,
                                        cfg->autostartDir,
                                        0, QEMU_EXPECTED_VIRT_TYPES,
@@ -866,7 +866,7 @@ qemuReload(void) {
     cfg = virQEMUDriverGetConfig(qemu_driver);
     virDomainObjListLoadAllConfigs(qemu_driver->domains,
                                    caps,
-                                   qemu_driver->xmlconf,
+                                   qemu_driver->xmlopt,
                                    cfg->configDir,
                                    cfg->autostartDir,
                                    0, QEMU_EXPECTED_VIRT_TYPES,
@@ -961,7 +961,7 @@ qemuShutdown(void) {
     virObjectUnref(qemu_driver->domains);
     virObjectUnref(qemu_driver->remotePorts);
 
-    virObjectUnref(qemu_driver->xmlconf);
+    virObjectUnref(qemu_driver->xmlopt);
 
     virSysinfoDefFree(qemu_driver->hostsysinfo);
 
@@ -1486,7 +1486,7 @@ static virDomainPtr qemuDomainCreate(virConnectPtr conn, const char *xml,
     if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
         goto cleanup;
 
-    if (!(def = virDomainDefParseString(caps, driver->xmlconf, xml,
+    if (!(def = virDomainDefParseString(caps, driver->xmlopt, xml,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
@@ -1504,7 +1504,7 @@ static virDomainPtr qemuDomainCreate(virConnectPtr conn, const char *xml,
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
@@ -1627,7 +1627,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;
 
@@ -1696,7 +1696,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;
 
@@ -2094,7 +2094,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;
 
@@ -2855,7 +2855,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
     if (xmlin) {
         virDomainDefPtr def = NULL;
 
-        if (!(def = virDomainDefParseString(caps, driver->xmlconf, xmlin,
+        if (!(def = virDomainDefParseString(caps, driver->xmlopt, xmlin,
                                             QEMU_EXPECTED_VIRT_TYPES,
                                             VIR_DOMAIN_XML_INACTIVE))) {
             goto endjob;
@@ -3769,7 +3769,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;
 
@@ -3875,7 +3875,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;
 
@@ -3966,7 +3966,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;
     }
 
@@ -4055,7 +4055,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;
 
@@ -4151,7 +4151,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+    if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
                                         &persistentDef) < 0)
         goto cleanup;
 
@@ -4232,7 +4232,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
             goto cleanup;
         }
 
-        if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+        if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
             goto cleanup;
     }
 
@@ -4297,7 +4297,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;
 
@@ -4454,7 +4454,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;
 
@@ -4767,14 +4767,14 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
         header.was_running = state;
 
     /* Create a domain from this XML */
-    if (!(def = virDomainDefParseString(caps, driver->xmlconf, xml,
+    if (!(def = virDomainDefParseString(caps, driver->xmlopt, xml,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto error;
     if (xmlin) {
         virDomainDefPtr def2 = NULL;
 
-        if (!(def2 = virDomainDefParseString(caps, driver->xmlconf, xmlin,
+        if (!(def2 = virDomainDefParseString(caps, driver->xmlopt, xmlin,
                                              QEMU_EXPECTED_VIRT_TYPES,
                                              VIR_DOMAIN_XML_INACTIVE)))
             goto error;
@@ -4890,7 +4890,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;
         }
@@ -4948,7 +4948,7 @@ qemuDomainRestoreFlags(virConnectPtr conn,
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
@@ -5229,7 +5229,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;
@@ -5277,7 +5277,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
     if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
         goto cleanup;
 
-    def = virDomainDefParseString(caps, driver->xmlconf, xmlData,
+    def = virDomainDefParseString(caps, driver->xmlopt, xmlData,
                                   QEMU_EXPECTED_VIRT_TYPES, 0);
     if (!def)
         goto cleanup;
@@ -5548,7 +5548,7 @@ static virDomainPtr qemuDomainDefine(virConnectPtr conn, const char *xml) {
     if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
         goto cleanup;
 
-    if (!(def = virDomainDefParseString(caps, driver->xmlconf, xml,
+    if (!(def = virDomainDefParseString(caps, driver->xmlopt, xml,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
@@ -5566,7 +5566,7 @@ static virDomainPtr qemuDomainDefine(virConnectPtr conn, const char *xml) {
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    0,
                                    &oldDef)))
@@ -6494,7 +6494,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
             goto endjob;
 
         /* Make a copy for updated domain. */
-        vmdef = virDomainObjCopyPersistentDef(caps, driver->xmlconf, vm);
+        vmdef = virDomainObjCopyPersistentDef(caps, driver->xmlopt, vm);
         if (!vmdef)
             goto endjob;
         switch (action) {
@@ -6545,7 +6545,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;
         }
@@ -6922,7 +6922,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;
 
@@ -7087,7 +7087,7 @@ qemuDomainGetBlkioParameters(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (virDomainLiveConfigHelperMethod(caps, driver->xmlconf, vm, &flags,
+    if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt, vm, &flags,
                                         &persistentDef) < 0)
         goto cleanup;
 
@@ -7276,7 +7276,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;
 
@@ -7406,7 +7406,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;
 
@@ -7572,7 +7572,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;
 
@@ -7725,7 +7725,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;
 
@@ -7935,13 +7935,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(caps, driver->xmlconf, vm);
+        vmdef = virDomainObjCopyPersistentDef(caps, driver->xmlopt, vm);
         if (!vmdef)
             goto cleanup;
     }
@@ -8036,7 +8036,7 @@ qemuSetSchedulerParametersFlags(virDomainPtr dom,
         }
     }
 
-    if (virDomainSaveStatus(driver->xmlconf, cfg->stateDir, vm) < 0)
+    if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
         goto cleanup;
 
 
@@ -8221,7 +8221,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;
 
@@ -8751,7 +8751,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;
 
@@ -8917,7 +8917,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;
 
@@ -11316,7 +11316,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;
     }
@@ -11584,7 +11584,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;
@@ -11760,7 +11760,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(caps, driver->xmlconf, xml,
+            !(def->dom = virDomainDefParseString(caps, driver->xmlopt, xml,
                                                  QEMU_EXPECTED_VIRT_TYPES,
                                                  VIR_DOMAIN_XML_INACTIVE)))
             goto cleanup;
@@ -12331,7 +12331,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
      * than inactive xml?  */
     snap->def->current = true;
     if (snap->def->dom) {
-        config = virDomainDefCopy(caps, driver->xmlconf, snap->def->dom, true);
+        config = virDomainDefCopy(caps, driver->xmlopt, snap->def->dom, true);
         if (!config)
             goto cleanup;
     }
@@ -12791,7 +12791,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;
 
@@ -12825,7 +12825,7 @@ static virDomainPtr qemuDomainAttach(virConnectPtr conn,
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
@@ -13905,7 +13905,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;
 
@@ -14065,7 +14065,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;
 
@@ -14254,7 +14254,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;
 
@@ -14351,7 +14351,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 */
index 3f74add14dff351b75cc2b6657eef81b5d71eeec..2033318a71aeb62d9da4e19be7459d1441ec6da1 100644 (file)
@@ -921,7 +921,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
                            n);
             goto error;
         }
-        mig->persistent = virDomainDefParseNode(caps, driver->xmlconf,
+        mig->persistent = virDomainDefParseNode(caps, driver->xmlopt,
                                                 doc, nodes[0],
                                                 -1, VIR_DOMAIN_XML_INACTIVE);
         if (!mig->persistent) {
@@ -1926,7 +1926,7 @@ char *qemuMigrationBegin(virQEMUDriverPtr driver,
     }
 
     if (xmlin) {
-        if (!(def = virDomainDefParseString(caps, driver->xmlconf, xmlin,
+        if (!(def = virDomainDefParseString(caps, driver->xmlopt, xmlin,
                                             QEMU_EXPECTED_VIRT_TYPES,
                                             VIR_DOMAIN_XML_INACTIVE)))
             goto cleanup;
@@ -2030,7 +2030,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
     if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
         goto cleanup;
 
-    if (!(def = virDomainDefParseString(caps, driver->xmlconf, dom_xml,
+    if (!(def = virDomainDefParseString(caps, driver->xmlopt, dom_xml,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
@@ -2071,7 +2071,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
                 virDomainDefPtr newdef;
 
                 VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
-                newdef = virDomainDefParseString(caps, driver->xmlconf, xmlout,
+                newdef = virDomainDefParseString(caps, driver->xmlopt, xmlout,
                                                  QEMU_EXPECTED_VIRT_TYPES,
                                                  VIR_DOMAIN_XML_INACTIVE);
                 if (!newdef)
@@ -2128,7 +2128,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
     }
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
@@ -3947,7 +3947,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
@@ -4042,7 +4042,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;
         }
@@ -4150,7 +4150,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;
         }
index 8c4bfb76db2e8d0d8cf406276d78d97d6769e693..9f7c087c20857a2c17c99088c2abb084a42763f8 100644 (file)
@@ -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 */
index f764f772ae1683c4161750f8626aef3550f04360..6534bea61f170cab235886a817468be8b1875c5a 100644 (file)
@@ -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);
@@ -711,7 +711,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
         goto exit;
     }
 
-    if (!(ctl->xmlconf = virDomainXMLConfNew(NULL, NULL))) {
+    if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL))) {
         vah_error(ctl, 0, _("Failed to create XML config object"));
         goto exit;
     }
@@ -729,7 +729,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
         goto exit;
     }
 
-    ctl->def = virDomainDefParseString(ctl->caps, ctl->xmlconf,
+    ctl->def = virDomainDefParseString(ctl->caps, ctl->xmlopt,
                                        xmlStr, -1,
                                        VIR_DOMAIN_XML_INACTIVE);
     if (ctl->def == NULL) {
index 4dbd7758d4f69da06892f986544bcbca4afff109..4c8b21bf0ee1272e8eed6ce154439297b812c0ce 100644 (file)
@@ -84,7 +84,7 @@ struct _testConn {
     char *path;
     int nextDomID;
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
     virNodeInfo nodeInfo;
     virDomainObjListPtr domains;
     virNetworkObjList networks;
@@ -159,12 +159,12 @@ static int testDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED,
 }
 
 
-static virDomainXMLConfPtr
+static virDomainXMLOptionPtr
 testBuildXMLConfig(void)
 {
     virDomainXMLPrivateDataCallbacks priv = { .alloc = testDomainObjPrivateAlloc,
                                               .free = testDomainObjPrivateFree };
-    return virDomainXMLConfNew(&priv, NULL);
+    return virDomainXMLOptionNew(&priv, NULL);
 }
 
 
@@ -518,7 +518,7 @@ testDomainStartState(virConnectPtr conn,
     dom->def->id = privconn->nextDomID++;
 
     if (virDomainObjSetDefTransient(privconn->caps,
-                                    privconn->xmlconf,
+                                    privconn->xmlopt,
                                     dom, false) < 0) {
         goto cleanup;
     }
@@ -585,13 +585,13 @@ 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(privconn->caps,
-                                           privconn->xmlconf,
+                                           privconn->xmlopt,
                                            defaultDomainXML,
                                            1 << VIR_DOMAIN_VIRT_TEST,
                                            VIR_DOMAIN_XML_INACTIVE)))
@@ -600,7 +600,7 @@ static int testOpenDefault(virConnectPtr conn) {
     if (testDomainGenerateIfnames(domdef) < 0)
         goto error;
     if (!(domobj = virDomainObjListAdd(privconn->domains,
-                                       privconn->xmlconf,
+                                       privconn->xmlopt,
                                        domdef, 0, NULL)))
         goto error;
     domdef = NULL;
@@ -819,7 +819,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))) {
@@ -934,14 +934,14 @@ static int testOpenFromFile(virConnectPtr conn,
                 goto error;
             }
             def = virDomainDefParseFile(privconn->caps,
-                                        privconn->xmlconf, absFile,
+                                        privconn->xmlopt, absFile,
                                         1 << VIR_DOMAIN_VIRT_TEST,
                                         VIR_DOMAIN_XML_INACTIVE);
             VIR_FREE(absFile);
             if (!def)
                 goto error;
         } else {
-            if ((def = virDomainDefParseNode(privconn->caps, privconn->xmlconf,
+            if ((def = virDomainDefParseNode(privconn->caps, privconn->xmlopt,
                                              xml, domains[i],
                                              1 << VIR_DOMAIN_VIRT_TEST,
                                              VIR_DOMAIN_XML_INACTIVE)) == NULL)
@@ -950,7 +950,7 @@ static int testOpenFromFile(virConnectPtr conn,
 
         if (testDomainGenerateIfnames(def) < 0 ||
             !(dom = virDomainObjListAdd(privconn->domains,
-                                        privconn->xmlconf,
+                                        privconn->xmlopt,
                                         def, 0, NULL))) {
             virDomainDefFree(def);
             goto error;
@@ -1206,7 +1206,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);
@@ -1344,7 +1344,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(0, NULL);
 
     testDriverLock(privconn);
-    if ((def = virDomainDefParseString(privconn->caps, privconn->xmlconf,
+    if ((def = virDomainDefParseString(privconn->caps, privconn->xmlopt,
                                        xml, 1 << VIR_DOMAIN_VIRT_TEST,
                                        VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -1352,7 +1352,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
     if (testDomainGenerateIfnames(def) < 0)
         goto cleanup;
     if (!(dom = virDomainObjListAdd(privconn->domains,
-                                    privconn->xmlconf,
+                                    privconn->xmlopt,
                                     def,
                                     VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                     NULL)))
@@ -1959,7 +1959,7 @@ testDomainRestoreFlags(virConnectPtr conn,
     }
     xml[len] = '\0';
 
-    def = virDomainDefParseString(privconn->caps, privconn->xmlconf,
+    def = virDomainDefParseString(privconn->caps, privconn->xmlopt,
                                   xml, 1 << VIR_DOMAIN_VIRT_TEST,
                                   VIR_DOMAIN_XML_INACTIVE);
     if (!def)
@@ -1968,7 +1968,7 @@ testDomainRestoreFlags(virConnectPtr conn,
     if (testDomainGenerateIfnames(def) < 0)
         goto cleanup;
     if (!(dom = virDomainObjListAdd(privconn->domains,
-                                    privconn->xmlconf,
+                                    privconn->xmlopt,
                                     def,
                                     VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
                                     VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
@@ -2178,7 +2178,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;
 
@@ -2257,7 +2257,7 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned int nrCpus,
     }
 
     if (!(persistentDef = virDomainObjGetPersistentDef(privconn->caps,
-                                                       privconn->xmlconf,
+                                                       privconn->xmlopt,
                                                        privdom)))
         goto cleanup;
 
@@ -2510,7 +2510,7 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
     virDomainDefPtr oldDef = NULL;
 
     testDriverLock(privconn);
-    if ((def = virDomainDefParseString(privconn->caps, privconn->xmlconf,
+    if ((def = virDomainDefParseString(privconn->caps, privconn->xmlopt,
                                        xml, 1 << VIR_DOMAIN_VIRT_TEST,
                                        VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -2518,7 +2518,7 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
     if (testDomainGenerateIfnames(def) < 0)
         goto cleanup;
     if (!(dom = virDomainObjListAdd(privconn->domains,
-                                    privconn->xmlconf,
+                                    privconn->xmlopt,
                                     def,
                                     0,
                                     &oldDef)))
index 488c1b7116ba0277ed0b9c730c31c28c2ef43631..7f7ea053fd1dee5a280da242dd5bad31969ecdf2 100644 (file)
@@ -63,7 +63,7 @@ struct uml_driver {
     int inotifyWatch;
 
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
 
     /* Event handling */
     virDomainEventStatePtr domainEventState;
index 09a777c1f8246c7b4f9df5dfa1ebaefbcc394858..1d21d7169664d2d9948ca36c3981485bb4568558 100644 (file)
@@ -505,7 +505,7 @@ umlStartup(bool privileged,
     if ((uml_driver->caps = umlCapsInit()) == NULL)
         goto out_of_memory;
 
-    if (!(uml_driver->xmlconf = virDomainXMLConfNew(&privcb,
+    if (!(uml_driver->xmlopt = virDomainXMLOptionNew(&privcb,
                                                     NULL)))
         goto error;
 
@@ -543,7 +543,7 @@ umlStartup(bool privileged,
 
     if (virDomainObjListLoadAllConfigs(uml_driver->domains,
                                        uml_driver->caps,
-                                       uml_driver->xmlconf,
+                                       uml_driver->xmlopt,
                                        uml_driver->configDir,
                                        uml_driver->autostartDir,
                                        0, 1 << VIR_DOMAIN_VIRT_UML,
@@ -599,7 +599,7 @@ umlReload(void) {
     umlDriverLock(uml_driver);
     virDomainObjListLoadAllConfigs(uml_driver->domains,
                                    uml_driver->caps,
-                                   uml_driver->xmlconf,
+                                   uml_driver->xmlopt,
                                    uml_driver->configDir,
                                    uml_driver->autostartDir,
                                    0, 1 << VIR_DOMAIN_VIRT_UML,
@@ -640,7 +640,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 */
@@ -1064,7 +1064,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;
@@ -1098,7 +1098,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);
@@ -1505,13 +1505,13 @@ static virDomainPtr umlDomainCreate(virConnectPtr conn, const char *xml,
     virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, NULL);
 
     umlDriverLock(driver);
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt,
                                         xml, 1 << VIR_DOMAIN_VIRT_UML,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
@@ -1926,13 +1926,13 @@ static virDomainPtr umlDomainDefine(virConnectPtr conn, const char *xml) {
     virDomainPtr dom = NULL;
 
     umlDriverLock(driver);
-    if (!(def = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if (!(def = virDomainDefParseString(driver->caps, driver->xmlopt,
                                         xml, 1 << VIR_DOMAIN_VIRT_UML,
                                         VIR_DOMAIN_XML_INACTIVE)))
         goto cleanup;
 
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    def,
                                    0, NULL)))
         goto cleanup;
index aa7466bc6a8f26db7c524d10f101645315075f75..f5d687a79a6c8f196e3099cdef3a233e79fc09ba 100644 (file)
@@ -193,7 +193,7 @@ typedef struct {
     unsigned long version;
 
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
 
     IVirtualBox *vboxObj;
     ISession *vboxSession;
@@ -851,10 +851,10 @@ static int vboxDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED,
 }
 
 
-static virDomainXMLConfPtr
+static virDomainXMLOptionPtr
 vboxXMLConfInit(void)
 {
-    return virDomainXMLConfNew(NULL, NULL);
+    return virDomainXMLOptionNew(NULL, NULL);
 }
 
 
@@ -986,7 +986,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) */
@@ -1046,7 +1046,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;
     }
@@ -5052,7 +5052,7 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml) {
 #endif
     nsresult rc;
 
-    if (!(def = virDomainDefParseString(data->caps, data->xmlconf,
+    if (!(def = virDomainDefParseString(data->caps, data->xmlopt,
                                         xml, 1 << VIR_DOMAIN_VIRT_VBOX,
                                         VIR_DOMAIN_XML_INACTIVE))) {
         goto cleanup;
@@ -5932,7 +5932,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) {
index 19be62ae0f1c3102948e254abec15edf9c375dbd..00a55908c92ec8bd71ddc1f692dbafd4203fd5c3 100644 (file)
@@ -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);
 }
 
@@ -179,7 +179,7 @@ vmwareLoadDomains(struct vmware_driver *driver)
         }
 
         if (!(vm = virDomainObjListAdd(driver->domains,
-                                       driver->xmlconf,
+                                       driver->xmlopt,
                                        vmdef, 0, NULL)))
             goto cleanup;
 
index b3ec96623e3060e598edb56fd1a082b22d9c7c4c..cb11acabdca636dc56474f7cf9fe57da3bb5b5b8 100644 (file)
@@ -36,7 +36,7 @@
 struct vmware_driver {
     virMutex lock;
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
 
     virDomainObjListPtr domains;
     int version;
index 6d82532d5b7e1b7fc5e907f83bc4341b2e61bea6..28b4e1742d8754039e8de89ee055c6cbdfd77481 100644 (file)
@@ -72,13 +72,13 @@ vmwareDataFreeFunc(void *data)
     VIR_FREE(dom);
 }
 
-static virDomainXMLConfPtr
+static virDomainXMLOptionPtr
 vmwareDomainXMLConfigInit(void)
 {
     virDomainXMLPrivateDataCallbacks priv = { .alloc = vmwareDataAllocFunc,
                                               .free = vmwareDataFreeFunc };
 
-    return virDomainXMLConfNew(&priv, NULL);
+    return virDomainXMLOptionNew(&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,7 +324,7 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
     ctx.formatFileName = vmwareCopyVMXFileName;
 
     vmwareDriverLock(driver);
-    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlopt,
                                          xml, 1 << VIR_DOMAIN_VIRT_VMWARE,
                                          VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -346,7 +346,7 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
 
     /* assign def */
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    vmdef,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
@@ -595,7 +595,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
 
     vmwareDriverLock(driver);
 
-    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlconf,
+    if ((vmdef = virDomainDefParseString(driver->caps, driver->xmlopt,
                                          xml, 1 << VIR_DOMAIN_VIRT_VMWARE,
                                          VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -617,7 +617,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
 
     /* assign def */
     if (!(vm = virDomainObjListAdd(driver->domains,
-                                   driver->xmlconf,
+                                   driver->xmlopt,
                                    vmdef,
                                    VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE,
                                    NULL)))
index fd20b734541a4f71932d34299032f093ba2a1190..edb8e98c2cc0f4d522e75cf3b01c7efb5c580a52 100644 (file)
@@ -401,7 +401,7 @@ xenUnifiedOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags)
         goto fail;
     }
 
-    if (!(priv->xmlconf = virDomainXMLConfNew(NULL, NULL)))
+    if (!(priv->xmlopt = virDomainXMLOptionNew(NULL, NULL)))
         goto fail;
 
 #if WITH_XEN_INOTIFY
@@ -451,7 +451,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)
@@ -1434,7 +1434,7 @@ xenUnifiedDomainXMLToNative(virConnectPtr conn,
         goto cleanup;
     }
 
-    if (!(def = virDomainDefParseString(priv->caps, priv->xmlconf,
+    if (!(def = virDomainDefParseString(priv->caps, priv->xmlopt,
                                         xmlData, 1 << VIR_DOMAIN_VIRT_XEN, 0)))
         goto cleanup;
 
index 8e43db3b5e21974cff8e9a09139224de558a123c..f1f5d74be62e46c71b760a13954529958491b8f3 100644 (file)
@@ -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 */
index 7abc03074f190e7f2416a33f6435ea6e86703c3f..ea9814bcca1ddeced69a040fea75fab9cf03700a 100644 (file)
@@ -2409,7 +2409,7 @@ xenDaemonCreateXML(virConnectPtr conn, const char *xmlDesc, unsigned int flags)
 
     virCheckFlags(0, NULL);
 
-    if (!(def = virDomainDefParseString(priv->caps, priv->xmlconf,
+    if (!(def = virDomainDefParseString(priv->caps, priv->xmlopt,
                                         xmlDesc, 1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE)))
         return NULL;
@@ -3127,7 +3127,7 @@ xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc)
     if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4)
         return NULL;
 
-    if (!(def = virDomainDefParseString(priv->caps, priv->xmlconf,
+    if (!(def = virDomainDefParseString(priv->caps, priv->xmlopt,
                                         xmlDesc, 1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE))) {
         virReportError(VIR_ERR_XML_ERROR,
index f6a3593229ec2c1d6d292c7f05048fff7279db98..c406ee31678d098697445ebebeb6b9edc47587b5 100644 (file)
@@ -1013,7 +1013,7 @@ xenXMDomainDefineXML(virConnectPtr conn, const char *xml)
         return NULL;
     }
 
-    if (!(def = virDomainDefParseString(priv->caps, priv->xmlconf, xml,
+    if (!(def = virDomainDefParseString(priv->caps, priv->xmlopt, xml,
                                         1 << VIR_DOMAIN_VIRT_XEN,
                                         VIR_DOMAIN_XML_INACTIVE))) {
         xenUnifiedUnlock(priv);
index b368f4887fb425c3848589bf3c1bd7dd9cb9c479..0e15e26a33db504dcffaa35f2bccc24319c354ad 100644 (file)
@@ -169,7 +169,7 @@ xenapiOpen(virConnectPtr conn, virConnectAuthPtr auth,
         goto error;
     }
 
-    if (!(privP->xmlconf = virDomainXMLConfNew(NULL, NULL))) {
+    if (!(privP->xmlopt = virDomainXMLOptionNew(NULL, NULL))) {
         xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR,
                                   _("Failed to create XML conf object"));
         goto error;
@@ -214,7 +214,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);
@@ -238,7 +238,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);
@@ -533,7 +533,7 @@ xenapiDomainCreateXML(virConnectPtr conn,
 
     virCheckFlags(0, NULL);
 
-    virDomainDefPtr defPtr = virDomainDefParseString(priv->caps, priv->xmlconf,
+    virDomainDefPtr defPtr = virDomainDefParseString(priv->caps, priv->xmlopt,
                                                      xmlDesc,
                                                      1 << VIR_DOMAIN_VIRT_XEN,
                                                      flags);
@@ -1687,7 +1687,7 @@ xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainPtr domP=NULL;
     if (!priv->caps)
         return NULL;
-    virDomainDefPtr defPtr = virDomainDefParseString(priv->caps, priv->xmlconf,
+    virDomainDefPtr defPtr = virDomainDefParseString(priv->caps, priv->xmlopt,
                                                      xml,
                                                      1 << VIR_DOMAIN_VIRT_XEN,
                                                      0);
index 92c18feed26ece117a73b96e1b54856158abde75..b1d00e673b5c058e13d872b957b4e433d9ebbf9c 100644 (file)
@@ -58,7 +58,7 @@ struct _xenapiPrivate {
     char *url;
     int noVerify;
     virCapsPtr caps;
-    virDomainXMLConfPtr xmlconf;
+    virDomainXMLOptionPtr xmlopt;
 };
 
 #endif /* __VIR_XENAPI_H__ */
index 7d9531034c545393cc958e3dbfee42a2fdfc63da..ac5137e5be760bc75132905b37a987e23c899721 100644 (file)
@@ -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()))
+    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf()))
         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;
 }
index 964d4332227668656b2804b88bc0e6b11397de6f..16118bb7e1ad61a80661baecc46e384737316bc9 100644 (file)
@@ -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(caps, xmlconf, inXmlData,
+    if (!(def = virDomainDefParseString(caps, xmlopt, inXmlData,
                                         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;
 }
index 6fd1de6fe69af5af5c4d554a4b676a1ec98280a7..ec250adffc5cef1042d21b61532f60dc4b903e53 100644 (file)
@@ -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()))
+    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf()))
         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;
 }
index 639eeb1efb33ac05c8692c75ab314bd0d29e8ff7..fdf67a1bcc0547ccab1e1aa5cd9c7a16c8725303 100644 (file)
@@ -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()))
+        !(xmlopt = virQEMUDriverCreateXMLConf()))
         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;
 }
index d5bce84000ff94275ef895a33fee252059ae1739..fe98813a187823243ac9a15cacfe6bef5ce24dfd 100644 (file)
@@ -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,
index 09914aeed73e80f548bbd8838bd8ba744f2ac401..9df118fff6d5fecc3d88fb27fc0685254d99c4f3 100644 (file)
@@ -32,7 +32,7 @@ qemuMonitorTestAddItem(qemuMonitorTestPtr test,
                        const char *response);
 
 qemuMonitorTestPtr qemuMonitorTestNew(bool json,
-                                      virDomainXMLConfPtr xmlconf);
+                                      virDomainXMLOptionPtr xmlopt);
 
 
 void qemuMonitorTestFree(qemuMonitorTestPtr test);
index d5d2b3d0d190611dedd7bab838f8c056e6dd44ad..71921e7c38a8a02280ec1ca1544cc6912603b410 100644 (file)
@@ -100,7 +100,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
         goto out;
     conn->secretDriver = &fakeSecretDriver;
 
-    if (!(vmdef = virDomainDefParseFile(driver.caps, driver.xmlconf, xml,
+    if (!(vmdef = virDomainDefParseFile(driver.caps, driver.xmlopt, xml,
                                         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()))
+    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf()))
         return EXIT_FAILURE;
     VIR_FREE(driver.config->stateDir);
     if ((driver.config->stateDir = strdup("/nowhere")) == NULL)
@@ -934,7 +934,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;
index ba9aa96db26701cbf3d2cc5da8f9158a9b0ed796..7305e2d2659822c0d2656f7dc6a97816edbfc8d8 100644 (file)
@@ -32,7 +32,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool live)
     if (virtTestLoadFile(outxml, &outXmlData) < 0)
         goto fail;
 
-    if (!(def = virDomainDefParseString(driver.caps, driver.xmlconf, inXmlData,
+    if (!(def = virDomainDefParseString(driver.caps, driver.xmlopt, inXmlData,
                                         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()))
+    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf()))
         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;
 }
index 76a715d18c70eda99aeaad49cd174ff919bab019..6492bac5222b957e2713c0531ad02b39d7c79463 100644 (file)
@@ -51,7 +51,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     if (len && expectargv[len - 1] == '\n')
         expectargv[len - 1] = '\0';
 
-    if (!(vmdef = virDomainDefParseFile(driver.caps, driver.xmlconf, xml,
+    if (!(vmdef = virDomainDefParseFile(driver.caps, driver.xmlopt, xml,
                                         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()))
+    if (!(driver.xmlopt = virQEMUDriverCreateXMLConf()))
         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;
index 405bc2b5a5927365e9db26bf35e42c11f16ebde0..ac229de82f5362fc0d5eb3691587615c93e53598 100644 (file)
@@ -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(caps, xmlconf, xmlstr,
+    if (!(def = virDomainDefParseString(caps, xmlopt, xmlstr,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         0)))
         goto cleanup;
@@ -328,7 +328,7 @@ mymain(void)
     if ((caps = testQemuCapsInit()) == NULL)
         return EXIT_FAILURE;
 
-    if (!(xmlconf = virQEMUDriverCreateXMLConf()))
+    if (!(xmlopt = virQEMUDriverCreateXMLConf()))
         return EXIT_FAILURE;
 
 #define DO_TEST_LABELING(name) \
index 932becbe8e0996a1645bb28414cb2a6b809093ad..d7d5c0a04b484edb1991b1329b6086e344190642 100644 (file)
@@ -3,4 +3,4 @@
 #include "domain_conf.h"
 
 virCapsPtr testQemuCapsInit(void);
-virDomainXMLConfPtr testQemuXMLConfInit(void);
+virDomainXMLOptionPtr testQemuXMLConfInit(void);
index 201ea2a94e38224fb4d9ed9464f1491273e35b36..bfced0c5ada47b5803fea951ce9d31bb98b52276 100644 (file)
@@ -15,10 +15,10 @@ static int testXenDefaultConsoleType(const char *ostype,
         return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_XEN;
 }
 
-virDomainXMLConfPtr
+virDomainXMLOptionPtr
 testXenXMLConfInit(void)
 {
-    return virDomainXMLConfNew(NULL, NULL);
+    return virDomainXMLOptionNew(NULL, NULL);
 }
 
 virCapsPtr testXenCapsInit(void) {
index d4576cb1a6beb1e5b006f4ea922b722336abbe76..a38b03aca268fcefb61bd1a3d03e56e9b2dcdf6d 100644 (file)
@@ -3,4 +3,4 @@
 #include "domain_conf.h"
 
 virCapsPtr testXenCapsInit(void);
-virDomainXMLConfPtr testXenXMLConfInit(void);
+virDomainXMLOptionPtr testXenXMLConfInit(void);
index a32c11a01dbc8bb01f86842dec1e44bcfcbff0e4..80833eb893291ee7fdb477918f9b702f4dad660e 100644 (file)
@@ -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(caps, xmlconf, xmlData,
+    if (!(def = virDomainDefParseString(caps, xmlopt, xmlData,
                                         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 = testXenXMLConfInit()))
+    if (!(xmlopt = testXenXMLConfInit()))
         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;
 }
index 364601a73b956b8ff5250593389c34319358f0b8..daf4ac68f54d9c131b657978e1a427d37a900d78 100644 (file)
@@ -15,7 +15,7 @@
 #include "testutilsxen.h"
 
 static virCapsPtr caps;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
 
 static int
 testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion)
@@ -32,7 +32,7 @@ testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion)
   if (virtTestLoadFile(sexpr, &sexprData) < 0)
       goto fail;
 
-  if (!(def = virDomainDefParseString(caps, xmlconf, xmlData,
+  if (!(def = virDomainDefParseString(caps, xmlopt, xmlData,
                                       1 << VIR_DOMAIN_VIRT_XEN,
                                       VIR_DOMAIN_XML_INACTIVE)))
       goto fail;
@@ -104,7 +104,7 @@ mymain(void)
     if (!(caps = testXenCapsInit()))
         return EXIT_FAILURE;
 
-    if (!(xmlconf = testXenXMLConfInit()))
+    if (!(xmlopt = testXenXMLConfInit()))
         return EXIT_FAILURE;
 
     DO_TEST("pv", "pv", "pvtest", 1);
@@ -174,7 +174,7 @@ mymain(void)
     DO_TEST("escape", "escape", "fvtest", 1);
 
     virObjectUnref(caps);
-    virObjectUnref(xmlconf);
+    virObjectUnref(xmlopt);
 
     return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
index 800fd2cfe63dd293cd6312431890cc93d743d4ee..344b097be9c7bd61aae2d75c72d923bd110a8568 100644 (file)
@@ -13,7 +13,7 @@
 
 static virCapsPtr caps;
 static virVMXContext ctx;
-static virDomainXMLConfPtr xmlconf;
+static virDomainXMLOptionPtr xmlopt;
 
 static int testDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED,
                                   virArch arch ATTRIBUTE_UNUSED)
@@ -73,7 +73,7 @@ testCapsInit(void)
 
   failure:
     virObjectUnref(caps);
-    virObjectUnref(xmlconf);
+    virObjectUnref(xmlopt);
     caps = NULL;
 }
 
@@ -94,7 +94,7 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
         goto failure;
     }
 
-    def = virDomainDefParseString(caps, xmlconf, xmlData,
+    def = virDomainDefParseString(caps, xmlopt, xmlData,
                                   1 << VIR_DOMAIN_VIRT_VMWARE,
                                   VIR_DOMAIN_XML_INACTIVE);
 
@@ -240,7 +240,7 @@ mymain(void)
         return EXIT_FAILURE;
     }
 
-    if (!(xmlconf = virDomainXMLConfNew(NULL, NULL)))
+    if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL)))
         return EXIT_FAILURE;
 
     ctx.opaque = NULL;