mirror of https://gitee.com/openkylin/libvirt.git
domain: conf: Drop expectedVirtTypes
This needs to specified in way too many places for a simple validation check. The ostype/arch/virttype validation checks later in DomainDefParseXML should catch most of the cases that this was covering.
This commit is contained in:
parent
747761a79a
commit
835cf84b7e
|
@ -507,7 +507,6 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_BHYVE,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -695,7 +694,6 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, caps, privconn->xmlopt,
|
if (!(def = virDomainDefParseString(xmlData, caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_BHYVE,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -910,7 +908,6 @@ bhyveDomainCreateXML(virConnectPtr conn,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_BHYVE,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1220,7 +1217,6 @@ bhyveStateInitialize(bool privileged,
|
||||||
NULL, 1,
|
NULL, 1,
|
||||||
bhyve_driver->caps,
|
bhyve_driver->caps,
|
||||||
bhyve_driver->xmlopt,
|
bhyve_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_BHYVE,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1229,7 +1225,6 @@ bhyveStateInitialize(bool privileged,
|
||||||
BHYVE_AUTOSTART_DIR, 0,
|
BHYVE_AUTOSTART_DIR, 0,
|
||||||
bhyve_driver->caps,
|
bhyve_driver->caps,
|
||||||
bhyve_driver->xmlopt,
|
bhyve_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_BHYVE,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <strings.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -37,7 +36,6 @@
|
||||||
#include "domain_conf.h"
|
#include "domain_conf.h"
|
||||||
#include "snapshot_conf.h"
|
#include "snapshot_conf.h"
|
||||||
#include "viralloc.h"
|
#include "viralloc.h"
|
||||||
#include "verify.h"
|
|
||||||
#include "virxml.h"
|
#include "virxml.h"
|
||||||
#include "viruuid.h"
|
#include "viruuid.h"
|
||||||
#include "virbuffer.h"
|
#include "virbuffer.h"
|
||||||
|
@ -61,11 +59,6 @@
|
||||||
|
|
||||||
VIR_LOG_INIT("conf.domain_conf");
|
VIR_LOG_INIT("conf.domain_conf");
|
||||||
|
|
||||||
/* virDomainVirtType is used to set bits in the expectedVirtTypes bitmask,
|
|
||||||
* verify that it doesn't overflow an unsigned int when shifting */
|
|
||||||
verify(VIR_DOMAIN_VIRT_LAST <= 32);
|
|
||||||
|
|
||||||
|
|
||||||
struct _virDomainObjList {
|
struct _virDomainObjList {
|
||||||
virObjectLockable parent;
|
virObjectLockable parent;
|
||||||
|
|
||||||
|
@ -13590,7 +13583,6 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
xmlNodePtr *nodes = NULL, node = NULL;
|
xmlNodePtr *nodes = NULL, node = NULL;
|
||||||
|
@ -13642,42 +13634,6 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||||
}
|
}
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
|
|
||||||
if ((expectedVirtTypes & (1 << def->virtType)) == 0) {
|
|
||||||
if (count_one_bits(expectedVirtTypes) == 1) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("unexpected domain type %s, expecting %s"),
|
|
||||||
virDomainVirtTypeToString(def->virtType),
|
|
||||||
virDomainVirtTypeToString(ffs(expectedVirtTypes) - 1));
|
|
||||||
} else {
|
|
||||||
virBuffer buffer = VIR_BUFFER_INITIALIZER;
|
|
||||||
char *string;
|
|
||||||
|
|
||||||
for (i = 0; i < VIR_DOMAIN_VIRT_LAST; ++i) {
|
|
||||||
if ((expectedVirtTypes & (1 << i)) != 0) {
|
|
||||||
if (virBufferUse(&buffer) > 0)
|
|
||||||
virBufferAddLit(&buffer, ", ");
|
|
||||||
|
|
||||||
virBufferAdd(&buffer, virDomainVirtTypeToString(i), -1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (virBufferCheckError(&buffer) < 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
string = virBufferContentAndReset(&buffer);
|
|
||||||
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("unexpected domain type %s, "
|
|
||||||
"expecting one of these: %s"),
|
|
||||||
virDomainVirtTypeToString(def->virtType),
|
|
||||||
string);
|
|
||||||
|
|
||||||
VIR_FREE(string);
|
|
||||||
}
|
|
||||||
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
def->os.bootloader = virXPathString("string(./bootloader)", ctxt);
|
def->os.bootloader = virXPathString("string(./bootloader)", ctxt);
|
||||||
def->os.bootloaderArgs = virXPathString("string(./bootloader_args)", ctxt);
|
def->os.bootloaderArgs = virXPathString("string(./bootloader_args)", ctxt);
|
||||||
|
|
||||||
|
@ -15472,7 +15428,6 @@ virDomainObjParseXML(xmlDocPtr xml,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
char *tmp = NULL;
|
char *tmp = NULL;
|
||||||
|
@ -15497,8 +15452,7 @@ virDomainObjParseXML(xmlDocPtr xml,
|
||||||
|
|
||||||
oldnode = ctxt->node;
|
oldnode = ctxt->node;
|
||||||
ctxt->node = config;
|
ctxt->node = config;
|
||||||
obj->def = virDomainDefParseXML(xml, config, ctxt, caps, xmlopt,
|
obj->def = virDomainDefParseXML(xml, config, ctxt, caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
ctxt->node = oldnode;
|
ctxt->node = oldnode;
|
||||||
if (!obj->def)
|
if (!obj->def)
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -15571,7 +15525,6 @@ virDomainDefParse(const char *xmlStr,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
xmlDocPtr xml;
|
xmlDocPtr xml;
|
||||||
|
@ -15580,7 +15533,7 @@ virDomainDefParse(const char *xmlStr,
|
||||||
|
|
||||||
if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) {
|
if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) {
|
||||||
def = virDomainDefParseNode(xml, xmlDocGetRootElement(xml), caps,
|
def = virDomainDefParseNode(xml, xmlDocGetRootElement(xml), caps,
|
||||||
xmlopt, expectedVirtTypes, flags);
|
xmlopt, flags);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15592,22 +15545,18 @@ virDomainDefPtr
|
||||||
virDomainDefParseString(const char *xmlStr,
|
virDomainDefParseString(const char *xmlStr,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
return virDomainDefParse(xmlStr, NULL, caps, xmlopt,
|
return virDomainDefParse(xmlStr, NULL, caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virDomainDefPtr
|
virDomainDefPtr
|
||||||
virDomainDefParseFile(const char *filename,
|
virDomainDefParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
return virDomainDefParse(NULL, filename, caps, xmlopt,
|
return virDomainDefParse(NULL, filename, caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15616,7 +15565,6 @@ virDomainDefParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
xmlXPathContextPtr ctxt = NULL;
|
xmlXPathContextPtr ctxt = NULL;
|
||||||
|
@ -15637,8 +15585,7 @@ virDomainDefParseNode(xmlDocPtr xml,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt->node = root;
|
ctxt->node = root;
|
||||||
def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt,
|
def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
|
@ -15651,7 +15598,6 @@ virDomainObjParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
xmlXPathContextPtr ctxt = NULL;
|
xmlXPathContextPtr ctxt = NULL;
|
||||||
|
@ -15671,7 +15617,7 @@ virDomainObjParseNode(xmlDocPtr xml,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt->node = root;
|
ctxt->node = root;
|
||||||
obj = virDomainObjParseXML(xml, ctxt, caps, xmlopt, expectedVirtTypes, flags);
|
obj = virDomainObjParseXML(xml, ctxt, caps, xmlopt, flags);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
|
@ -15683,7 +15629,6 @@ virDomainObjPtr
|
||||||
virDomainObjParseFile(const char *filename,
|
virDomainObjParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
xmlDocPtr xml;
|
xmlDocPtr xml;
|
||||||
|
@ -15692,8 +15637,7 @@ virDomainObjParseFile(const char *filename,
|
||||||
|
|
||||||
if ((xml = virXMLParseFile(filename))) {
|
if ((xml = virXMLParseFile(filename))) {
|
||||||
obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
|
obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
|
||||||
caps, xmlopt,
|
caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21548,7 +21492,6 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
|
||||||
const char *configDir,
|
const char *configDir,
|
||||||
const char *autostartDir,
|
const char *autostartDir,
|
||||||
const char *name,
|
const char *name,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
virDomainLoadConfigNotify notify,
|
virDomainLoadConfigNotify notify,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
@ -21561,7 +21504,6 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
|
||||||
if ((configFile = virDomainConfigFile(configDir, name)) == NULL)
|
if ((configFile = virDomainConfigFile(configDir, name)) == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
if (!(def = virDomainDefParseFile(configFile, caps, xmlopt,
|
if (!(def = virDomainDefParseFile(configFile, caps, xmlopt,
|
||||||
expectedVirtTypes,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS)))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -21598,7 +21540,6 @@ virDomainObjListLoadStatus(virDomainObjListPtr doms,
|
||||||
const char *name,
|
const char *name,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
virDomainLoadConfigNotify notify,
|
virDomainLoadConfigNotify notify,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
@ -21609,7 +21550,7 @@ virDomainObjListLoadStatus(virDomainObjListPtr doms,
|
||||||
if ((statusFile = virDomainConfigFile(statusDir, name)) == NULL)
|
if ((statusFile = virDomainConfigFile(statusDir, name)) == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!(obj = virDomainObjParseFile(statusFile, caps, xmlopt, expectedVirtTypes,
|
if (!(obj = virDomainObjParseFile(statusFile, caps, xmlopt,
|
||||||
VIR_DOMAIN_DEF_PARSE_STATUS |
|
VIR_DOMAIN_DEF_PARSE_STATUS |
|
||||||
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
|
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
|
||||||
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
|
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
|
||||||
|
@ -21648,7 +21589,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||||
int liveStatus,
|
int liveStatus,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
virDomainLoadConfigNotify notify,
|
virDomainLoadConfigNotify notify,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
@ -21687,7 +21627,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||||
entry->d_name,
|
entry->d_name,
|
||||||
caps,
|
caps,
|
||||||
xmlopt,
|
xmlopt,
|
||||||
expectedVirtTypes,
|
|
||||||
notify,
|
notify,
|
||||||
opaque);
|
opaque);
|
||||||
else
|
else
|
||||||
|
@ -21697,7 +21636,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||||
configDir,
|
configDir,
|
||||||
autostartDir,
|
autostartDir,
|
||||||
entry->d_name,
|
entry->d_name,
|
||||||
expectedVirtTypes,
|
|
||||||
notify,
|
notify,
|
||||||
opaque);
|
opaque);
|
||||||
if (dom) {
|
if (dom) {
|
||||||
|
@ -22148,7 +22086,7 @@ virDomainDefCopy(virDomainDefPtr src,
|
||||||
if (!(xml = virDomainDefFormat(src, format_flags)))
|
if (!(xml = virDomainDefFormat(src, format_flags)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ret = virDomainDefParseString(xml, caps, xmlopt, -1, parse_flags);
|
ret = virDomainDefParseString(xml, caps, xmlopt, parse_flags);
|
||||||
|
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -2577,29 +2577,24 @@ virStorageSourcePtr virDomainDiskDefSourceParse(const char *xmlStr,
|
||||||
virDomainDefPtr virDomainDefParseString(const char *xmlStr,
|
virDomainDefPtr virDomainDefParseString(const char *xmlStr,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainDefPtr virDomainDefParseFile(const char *filename,
|
virDomainDefPtr virDomainDefParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc,
|
virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainObjPtr virDomainObjParseNode(xmlDocPtr xml,
|
virDomainObjPtr virDomainObjParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainObjPtr virDomainObjParseFile(const char *filename,
|
virDomainObjPtr virDomainObjParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
bool virDomainDefCheckABIStability(virDomainDefPtr src,
|
bool virDomainDefCheckABIStability(virDomainDefPtr src,
|
||||||
|
@ -2803,7 +2798,6 @@ int virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||||
int liveStatus,
|
int liveStatus,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
virDomainLoadConfigNotify notify,
|
virDomainLoadConfigNotify notify,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
|
|
||||||
|
|
|
@ -196,13 +196,12 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
|
||||||
|
|
||||||
/* flags is bitwise-or of virDomainSnapshotParseFlags.
|
/* flags is bitwise-or of virDomainSnapshotParseFlags.
|
||||||
* If flags does not include VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE, then
|
* If flags does not include VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE, then
|
||||||
* caps and expectedVirtTypes are ignored.
|
* caps are ignored.
|
||||||
*/
|
*/
|
||||||
static virDomainSnapshotDefPtr
|
static virDomainSnapshotDefPtr
|
||||||
virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainSnapshotDefPtr def = NULL;
|
virDomainSnapshotDefPtr def = NULL;
|
||||||
|
@ -282,8 +281,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
def->dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
|
def->dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
|
||||||
caps, xmlopt,
|
caps, xmlopt, domainflags);
|
||||||
expectedVirtTypes, domainflags);
|
|
||||||
if (!def->dom)
|
if (!def->dom)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
|
@ -387,7 +385,6 @@ virDomainSnapshotDefParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
xmlXPathContextPtr ctxt = NULL;
|
xmlXPathContextPtr ctxt = NULL;
|
||||||
|
@ -405,8 +402,7 @@ virDomainSnapshotDefParseNode(xmlDocPtr xml,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt->node = root;
|
ctxt->node = root;
|
||||||
def = virDomainSnapshotDefParse(ctxt, caps, xmlopt,
|
def = virDomainSnapshotDefParse(ctxt, caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
return def;
|
return def;
|
||||||
|
@ -416,7 +412,6 @@ virDomainSnapshotDefPtr
|
||||||
virDomainSnapshotDefParseString(const char *xmlStr,
|
virDomainSnapshotDefParseString(const char *xmlStr,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainSnapshotDefPtr ret = NULL;
|
virDomainSnapshotDefPtr ret = NULL;
|
||||||
|
@ -426,8 +421,7 @@ virDomainSnapshotDefParseString(const char *xmlStr,
|
||||||
if ((xml = virXMLParse(NULL, xmlStr, _("(domain_snapshot)")))) {
|
if ((xml = virXMLParse(NULL, xmlStr, _("(domain_snapshot)")))) {
|
||||||
xmlKeepBlanksDefault(keepBlanksDefault);
|
xmlKeepBlanksDefault(keepBlanksDefault);
|
||||||
ret = virDomainSnapshotDefParseNode(xml, xmlDocGetRootElement(xml),
|
ret = virDomainSnapshotDefParseNode(xml, xmlDocGetRootElement(xml),
|
||||||
caps, xmlopt,
|
caps, xmlopt, flags);
|
||||||
expectedVirtTypes, flags);
|
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
}
|
}
|
||||||
xmlKeepBlanksDefault(keepBlanksDefault);
|
xmlKeepBlanksDefault(keepBlanksDefault);
|
||||||
|
|
|
@ -104,13 +104,11 @@ typedef enum {
|
||||||
virDomainSnapshotDefPtr virDomainSnapshotDefParseString(const char *xmlStr,
|
virDomainSnapshotDefPtr virDomainSnapshotDefParseString(const char *xmlStr,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainSnapshotDefPtr virDomainSnapshotDefParseNode(xmlDocPtr xml,
|
virDomainSnapshotDefPtr virDomainSnapshotDefParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int expectedVirtTypes,
|
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def);
|
void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def);
|
||||||
char *virDomainSnapshotDefFormat(const char *domain_uuid,
|
char *virDomainSnapshotDefFormat(const char *domain_uuid,
|
||||||
|
|
|
@ -2841,7 +2841,6 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
def = virDomainDefParseString(domainXml, priv->caps, priv->xmlopt,
|
def = virDomainDefParseString(domainXml, priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_VMWARE,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
|
|
||||||
if (!def)
|
if (!def)
|
||||||
|
@ -3056,7 +3055,6 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||||
|
|
||||||
/* Parse domain XML */
|
/* Parse domain XML */
|
||||||
def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_VMWARE,
|
|
||||||
parse_flags);
|
parse_flags);
|
||||||
|
|
||||||
if (!def)
|
if (!def)
|
||||||
|
@ -4188,7 +4186,7 @@ esxDomainSnapshotCreateXML(virDomainPtr domain, const char *xmlDesc,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
def = virDomainSnapshotDefParseString(xmlDesc, priv->caps,
|
def = virDomainSnapshotDefParseString(xmlDesc, priv->caps,
|
||||||
priv->xmlopt, 0, 0);
|
priv->xmlopt, 0);
|
||||||
|
|
||||||
if (!def)
|
if (!def)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -607,7 +607,6 @@ libxlDomainSaveImageOpen(libxlDriverPrivatePtr driver,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
@ -605,7 +605,6 @@ libxlStateInitialize(bool privileged,
|
||||||
1,
|
1,
|
||||||
cfg->caps,
|
cfg->caps,
|
||||||
libxl_driver->xmlopt,
|
libxl_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -618,7 +617,6 @@ libxlStateInitialize(bool privileged,
|
||||||
0,
|
0,
|
||||||
cfg->caps,
|
cfg->caps,
|
||||||
libxl_driver->xmlopt,
|
libxl_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -658,7 +656,6 @@ libxlStateReload(void)
|
||||||
1,
|
1,
|
||||||
cfg->caps,
|
cfg->caps,
|
||||||
libxl_driver->xmlopt,
|
libxl_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
NULL, libxl_driver);
|
NULL, libxl_driver);
|
||||||
|
|
||||||
virDomainObjListForEach(libxl_driver->domains, libxlAutostartDomain,
|
virDomainObjListForEach(libxl_driver->domains, libxlAutostartDomain,
|
||||||
|
@ -879,7 +876,6 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -2520,7 +2516,6 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(domainXml,
|
if (!(def = virDomainDefParseString(domainXml,
|
||||||
cfg->caps, driver->xmlopt,
|
cfg->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -2647,7 +2642,6 @@ libxlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,6 @@ libxlDomainMigrationBegin(virConnectPtr conn,
|
||||||
if (xmlin) {
|
if (xmlin) {
|
||||||
if (!(tmpdef = virDomainDefParseString(xmlin, cfg->caps,
|
if (!(tmpdef = virDomainDefParseString(xmlin, cfg->caps,
|
||||||
driver->xmlopt,
|
driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
|
@ -285,7 +284,6 @@ libxlDomainMigrationPrepareDef(libxlDriverPrivatePtr driver,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(dom_xml, cfg->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,6 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
|
||||||
|
|
||||||
if ((ctrl->vm = virDomainObjParseFile(configFile,
|
if ((ctrl->vm = virDomainObjParseFile(configFile,
|
||||||
caps, xmlopt,
|
caps, xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
0)) == NULL)
|
0)) == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
ctrl->def = ctrl->vm->def;
|
ctrl->def = ctrl->vm->def;
|
||||||
|
|
|
@ -467,7 +467,6 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1213,7 +1212,6 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1661,7 +1659,6 @@ static int lxcStateInitialize(bool privileged,
|
||||||
NULL, 1,
|
NULL, 1,
|
||||||
caps,
|
caps,
|
||||||
lxc_driver->xmlopt,
|
lxc_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1673,7 +1670,6 @@ static int lxcStateInitialize(bool privileged,
|
||||||
cfg->autostartDir, 0,
|
cfg->autostartDir, 0,
|
||||||
caps,
|
caps,
|
||||||
lxc_driver->xmlopt,
|
lxc_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1738,7 +1734,6 @@ lxcStateReload(void)
|
||||||
cfg->autostartDir, 0,
|
cfg->autostartDir, 0,
|
||||||
caps,
|
caps,
|
||||||
lxc_driver->xmlopt,
|
lxc_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
lxcNotifyLoadDomain, lxc_driver);
|
lxcNotifyLoadDomain, lxc_driver);
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
|
|
|
@ -999,7 +999,6 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
|
||||||
|
|
||||||
openvzDriverLock(driver);
|
openvzDriverLock(driver);
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_OPENVZ,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1096,7 +1095,6 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||||
|
|
||||||
openvzDriverLock(driver);
|
openvzDriverLock(driver);
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_OPENVZ,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -2331,7 +2329,6 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_OPENVZ,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
@ -705,7 +705,6 @@ parallelsDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int
|
||||||
|
|
||||||
parallelsDriverLock(privconn);
|
parallelsDriverLock(privconn);
|
||||||
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_PARALLELS,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -3568,7 +3568,6 @@ phypDomainCreateXML(virConnectPtr conn,
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
|
if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
|
||||||
phyp_driver->xmlopt,
|
phyp_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_PHYP,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
|
|
@ -1788,7 +1788,6 @@ qemuDomainDefCopy(virQEMUDriverPtr driver,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(ret = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(ret = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,6 @@
|
||||||
# include "qemu_capabilities.h"
|
# include "qemu_capabilities.h"
|
||||||
# include "virchrdev.h"
|
# include "virchrdev.h"
|
||||||
|
|
||||||
# define QEMU_EXPECTED_VIRT_TYPES \
|
|
||||||
((1 << VIR_DOMAIN_VIRT_QEMU) | \
|
|
||||||
(1 << VIR_DOMAIN_VIRT_KQEMU) | \
|
|
||||||
(1 << VIR_DOMAIN_VIRT_KVM) | \
|
|
||||||
(1 << VIR_DOMAIN_VIRT_XEN))
|
|
||||||
|
|
||||||
# define QEMU_DOMAIN_FORMAT_LIVE_FLAGS \
|
# define QEMU_DOMAIN_FORMAT_LIVE_FLAGS \
|
||||||
(VIR_DOMAIN_XML_SECURE | \
|
(VIR_DOMAIN_XML_SECURE | \
|
||||||
VIR_DOMAIN_XML_UPDATE_CPU)
|
VIR_DOMAIN_XML_UPDATE_CPU)
|
||||||
|
|
|
@ -517,7 +517,6 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
|
||||||
|
|
||||||
def = virDomainSnapshotDefParseString(xmlStr, caps,
|
def = virDomainSnapshotDefParseString(xmlStr, caps,
|
||||||
qemu_driver->xmlopt,
|
qemu_driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
flags);
|
flags);
|
||||||
if (def == NULL) {
|
if (def == NULL) {
|
||||||
/* Nothing we can do here, skip this one */
|
/* Nothing we can do here, skip this one */
|
||||||
|
@ -847,7 +846,6 @@ qemuStateInitialize(bool privileged,
|
||||||
NULL, 1,
|
NULL, 1,
|
||||||
qemu_driver->caps,
|
qemu_driver->caps,
|
||||||
qemu_driver->xmlopt,
|
qemu_driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -870,7 +868,6 @@ qemuStateInitialize(bool privileged,
|
||||||
cfg->autostartDir, 0,
|
cfg->autostartDir, 0,
|
||||||
qemu_driver->caps,
|
qemu_driver->caps,
|
||||||
qemu_driver->xmlopt,
|
qemu_driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -952,7 +949,6 @@ qemuStateReload(void)
|
||||||
cfg->configDir,
|
cfg->configDir,
|
||||||
cfg->autostartDir, 0,
|
cfg->autostartDir, 0,
|
||||||
caps, qemu_driver->xmlopt,
|
caps, qemu_driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
qemuNotifyLoadDomain, qemu_driver);
|
qemuNotifyLoadDomain, qemu_driver);
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
|
@ -1692,7 +1688,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -3210,7 +3205,6 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
|
@ -6371,7 +6365,6 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(newdef = virDomainDefParseString(newxml, caps, driver->xmlopt,
|
if (!(newdef = virDomainDefParseString(newxml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -6528,7 +6521,6 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
||||||
|
|
||||||
/* Create a domain from this XML */
|
/* Create a domain from this XML */
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -7108,7 +7100,6 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
def = virDomainDefParseString(xmlData, caps, driver->xmlopt,
|
def = virDomainDefParseString(xmlData, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!def)
|
if (!def)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -7437,7 +7428,6 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -14704,7 +14694,6 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||||
parse_flags |= VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE;
|
parse_flags |= VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE;
|
||||||
|
|
||||||
if (!(def = virDomainSnapshotDefParseString(xmlDesc, caps, driver->xmlopt,
|
if (!(def = virDomainSnapshotDefParseString(xmlDesc, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -14782,7 +14771,6 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
||||||
* conversion in and back out of xml. */
|
* conversion in and back out of xml. */
|
||||||
if (!(xml = qemuDomainDefFormatLive(driver, vm->def, true, true)) ||
|
if (!(xml = qemuDomainDefFormatLive(driver, vm->def, true, true)) ||
|
||||||
!(def->dom = virDomainDefParseString(xml, caps, driver->xmlopt,
|
!(def->dom = virDomainDefParseString(xml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
|
|
|
@ -1246,7 +1246,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
||||||
}
|
}
|
||||||
mig->persistent = virDomainDefParseNode(doc, nodes[0],
|
mig->persistent = virDomainDefParseNode(doc, nodes[0],
|
||||||
caps, driver->xmlopt,
|
caps, driver->xmlopt,
|
||||||
-1, VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!mig->persistent) {
|
if (!mig->persistent) {
|
||||||
/* virDomainDefParseNode already reported
|
/* virDomainDefParseNode already reported
|
||||||
* an error for us */
|
* an error for us */
|
||||||
|
@ -2704,7 +2704,6 @@ static char
|
||||||
|
|
||||||
if (xmlin) {
|
if (xmlin) {
|
||||||
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -2907,7 +2906,6 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
||||||
|
|
||||||
VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
|
VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
|
||||||
newdef = virDomainDefParseString(xmlout, caps, driver->xmlopt,
|
newdef = virDomainDefParseString(xmlout, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!newdef)
|
if (!newdef)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -3393,7 +3391,6 @@ qemuMigrationPrepareDef(virQEMUDriverPtr driver,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -745,7 +745,6 @@ get_definition(vahControl * ctl, const char *xmlStr)
|
||||||
|
|
||||||
ctl->def = virDomainDefParseString(xmlStr,
|
ctl->def = virDomainDefParseString(xmlStr,
|
||||||
ctl->caps, ctl->xmlopt,
|
ctl->caps, ctl->xmlopt,
|
||||||
-1,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (ctl->def == NULL) {
|
if (ctl->def == NULL) {
|
||||||
vah_error(ctl, 0, _("could not parse XML"));
|
vah_error(ctl, 0, _("could not parse XML"));
|
||||||
|
|
|
@ -758,7 +758,6 @@ testOpenDefault(virConnectPtr conn)
|
||||||
if (!(domdef = virDomainDefParseString(defaultDomainXML,
|
if (!(domdef = virDomainDefParseString(defaultDomainXML,
|
||||||
privconn->caps,
|
privconn->caps,
|
||||||
privconn->xmlopt,
|
privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -1024,7 +1023,6 @@ testParseDomainSnapshots(testConnPtr privconn,
|
||||||
def = virDomainSnapshotDefParseNode(ctxt->doc, node,
|
def = virDomainSnapshotDefParseNode(ctxt->doc, node,
|
||||||
privconn->caps,
|
privconn->caps,
|
||||||
privconn->xmlopt,
|
privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
|
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL |
|
VIR_DOMAIN_SNAPSHOT_PARSE_INTERNAL |
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
|
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
|
||||||
|
@ -1082,7 +1080,6 @@ testParseDomains(testConnPtr privconn,
|
||||||
|
|
||||||
def = virDomainDefParseNode(ctxt->doc, node,
|
def = virDomainDefParseNode(ctxt->doc, node,
|
||||||
privconn->caps, privconn->xmlopt,
|
privconn->caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!def)
|
if (!def)
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -1754,7 +1751,6 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -2367,7 +2363,6 @@ testDomainRestoreFlags(virConnectPtr conn,
|
||||||
xml[len] = '\0';
|
xml[len] = '\0';
|
||||||
|
|
||||||
def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!def)
|
if (!def)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -2952,7 +2947,6 @@ static virDomainPtr testDomainDefineXMLFlags(virConnectPtr conn,
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -6716,7 +6710,6 @@ testDomainSnapshotCreateXML(virDomainPtr domain,
|
||||||
if (!(def = virDomainSnapshotDefParseString(xmlDesc,
|
if (!(def = virDomainSnapshotDefParseString(xmlDesc,
|
||||||
privconn->caps,
|
privconn->caps,
|
||||||
privconn->xmlopt,
|
privconn->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_TEST,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -588,7 +588,6 @@ umlStateInitialize(bool privileged,
|
||||||
uml_driver->autostartDir, 0,
|
uml_driver->autostartDir, 0,
|
||||||
uml_driver->caps,
|
uml_driver->caps,
|
||||||
uml_driver->xmlopt,
|
uml_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_UML,
|
|
||||||
NULL, NULL) < 0)
|
NULL, NULL) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -657,7 +656,6 @@ umlStateReload(void)
|
||||||
uml_driver->autostartDir, 0,
|
uml_driver->autostartDir, 0,
|
||||||
uml_driver->caps,
|
uml_driver->caps,
|
||||||
uml_driver->xmlopt,
|
uml_driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_UML,
|
|
||||||
umlNotifyLoadDomain, uml_driver);
|
umlNotifyLoadDomain, uml_driver);
|
||||||
umlDriverUnlock(uml_driver);
|
umlDriverUnlock(uml_driver);
|
||||||
|
|
||||||
|
@ -1620,7 +1618,6 @@ static virDomainPtr umlDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||||
virNWFilterReadLockFilterUpdates();
|
virNWFilterReadLockFilterUpdates();
|
||||||
umlDriverLock(driver);
|
umlDriverLock(driver);
|
||||||
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_UML,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -2100,7 +2097,6 @@ umlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||||
|
|
||||||
umlDriverLock(driver);
|
umlDriverLock(driver);
|
||||||
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_UML,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -1868,7 +1868,6 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
|
||||||
|
|
||||||
VBOX_IID_INITIALIZE(&mchiid);
|
VBOX_IID_INITIALIZE(&mchiid);
|
||||||
if (!(def = virDomainDefParseString(xml, data->caps, data->xmlopt,
|
if (!(def = virDomainDefParseString(xml, data->caps, data->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_VBOX,
|
|
||||||
parse_flags))) {
|
parse_flags))) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -5335,7 +5334,7 @@ vboxDomainSnapshotCreateXML(virDomainPtr dom,
|
||||||
VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT, NULL);
|
VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT, NULL);
|
||||||
|
|
||||||
if (!(def = virDomainSnapshotDefParseString(xmlDesc, data->caps,
|
if (!(def = virDomainSnapshotDefParseString(xmlDesc, data->caps,
|
||||||
data->xmlopt, -1,
|
data->xmlopt,
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
|
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE)))
|
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -6756,7 +6755,6 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
|
||||||
def = virDomainSnapshotDefParseString(defXml,
|
def = virDomainSnapshotDefParseString(defXml,
|
||||||
data->caps,
|
data->caps,
|
||||||
data->xmlopt,
|
data->xmlopt,
|
||||||
-1,
|
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
|
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
|
||||||
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
|
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
|
||||||
if (!def) {
|
if (!def) {
|
||||||
|
|
|
@ -385,7 +385,6 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
|
||||||
|
|
||||||
vmwareDriverLock(driver);
|
vmwareDriverLock(driver);
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_VMWARE,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -677,7 +676,6 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
|
||||||
vmwareDriverLock(driver);
|
vmwareDriverLock(driver);
|
||||||
|
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_VMWARE,
|
|
||||||
parse_flags)) == NULL)
|
parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -783,7 +783,6 @@ xenUnifiedDomainCreateXML(virConnectPtr conn,
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1695,7 +1694,6 @@ xenUnifiedConnectDomainXMLToNative(virConnectPtr conn,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, priv->caps, priv->xmlopt,
|
if (!(def = virDomainDefParseString(xmlData, priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1905,7 +1903,6 @@ xenUnifiedDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -565,7 +565,6 @@ xenapiDomainCreateXML(virConnectPtr conn,
|
||||||
|
|
||||||
virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
|
virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
|
||||||
priv->caps, priv->xmlopt,
|
priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
parse_flags);
|
parse_flags);
|
||||||
if (!defPtr)
|
if (!defPtr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1740,7 +1739,6 @@ xenapiDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
|
||||||
return NULL;
|
return NULL;
|
||||||
virDomainDefPtr defPtr = virDomainDefParseString(xml,
|
virDomainDefPtr defPtr = virDomainDefParseString(xml,
|
||||||
priv->caps, priv->xmlopt,
|
priv->caps, priv->xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
parse_flags);
|
parse_flags);
|
||||||
if (!defPtr)
|
if (!defPtr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -56,8 +56,7 @@ static int testGetFilesystem(const void *opaque)
|
||||||
if (virtTestLoadFile(filename, &xmlData) < 0)
|
if (virtTestLoadFile(filename, &xmlData) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt, 0)))
|
||||||
1 << VIR_DOMAIN_VIRT_TEST, 0)))
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
fsdef = virDomainGetFilesystemForTarget(def,
|
fsdef = virDomainGetFilesystemForTarget(def,
|
||||||
|
|
|
@ -97,7 +97,6 @@ testCompareXMLToXMLFiles(const char *inxml,
|
||||||
|
|
||||||
if (!(def = virDomainSnapshotDefParseString(inXmlData, driver.caps,
|
if (!(def = virDomainSnapshotDefParseString(inXmlData, driver.caps,
|
||||||
driver.xmlopt,
|
driver.xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
flags)))
|
flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml, bool live)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(inXmlData, caps, xmlopt,
|
if (!(def = virDomainDefParseString(inXmlData, caps, xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_LXC,
|
|
||||||
live ? 0 : VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
live ? 0 : VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,6 @@ testQemuAgentGetFSInfo(const void *data)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(domain_xml, caps, xmlopt,
|
if (!(def = virDomainDefParseString(domain_xml, caps, xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,6 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
|
||||||
if (!((*vm)->def = virDomainDefParseString(domxml,
|
if (!((*vm)->def = virDomainDefParseString(domxml,
|
||||||
driver.caps,
|
driver.caps,
|
||||||
driver.xmlopt,
|
driver.xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
|
if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
||||||
if (!virtTestOOMActive() &&
|
if (!virtTestOOMActive() &&
|
||||||
(flags & FLAG_EXPECT_PARSE_ERROR))
|
(flags & FLAG_EXPECT_PARSE_ERROR))
|
||||||
|
|
|
@ -55,7 +55,7 @@ testXML2XMLHelper(const char *inxml,
|
||||||
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;
|
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(inXmlData, driver.caps, driver.xmlopt,
|
if (!(def = virDomainDefParseString(inXmlData, driver.caps, driver.xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES, parse_flags)))
|
parse_flags)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def)) {
|
||||||
|
@ -177,7 +177,6 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
|
||||||
if (!(xml = virXMLParseString(source, "(domain_status_test_XML)")) ||
|
if (!(xml = virXMLParseString(source, "(domain_status_test_XML)")) ||
|
||||||
!(obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
|
!(obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
|
||||||
driver.caps, driver.xmlopt,
|
driver.caps, driver.xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_STATUS |
|
VIR_DOMAIN_DEF_PARSE_STATUS |
|
||||||
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
|
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
|
||||||
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
|
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
|
||||||
|
|
|
@ -55,7 +55,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||||
expectargv[len - 1] = '\0';
|
expectargv[len - 1] = '\0';
|
||||||
|
|
||||||
if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
|
if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -193,9 +193,7 @@ testSELinuxLoadDef(const char *testname)
|
||||||
if (virFileReadAll(xmlfile, 1024*1024, &xmlstr) < 0)
|
if (virFileReadAll(xmlfile, 1024*1024, &xmlstr) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlstr, caps, xmlopt,
|
if (!(def = virDomainDefParseString(xmlstr, caps, xmlopt, 0)))
|
||||||
QEMU_EXPECTED_VIRT_TYPES,
|
|
||||||
0)))
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
|
|
|
@ -70,7 +70,6 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_XML_INACTIVE)))
|
VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion)
|
||||||
conn->privateData = &priv;
|
conn->privateData = &priv;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_XEN,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,6 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
def = virDomainDefParseString(xmlData, caps, xmlopt,
|
def = virDomainDefParseString(xmlData, caps, xmlopt,
|
||||||
1 << VIR_DOMAIN_VIRT_VMWARE,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
|
|
||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
|
|
Loading…
Reference in New Issue