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