return NULL;
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_BHYVE,
parse_flags)) == NULL)
goto cleanup;
goto cleanup;
if (!(def = virDomainDefParseString(xmlData, caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_BHYVE,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
return NULL;
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_BHYVE,
parse_flags)) == NULL)
goto cleanup;
NULL, 1,
bhyve_driver->caps,
bhyve_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_BHYVE,
NULL, NULL) < 0)
goto cleanup;
BHYVE_AUTOSTART_DIR, 0,
bhyve_driver->caps,
bhyve_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_BHYVE,
NULL, NULL) < 0)
goto cleanup;
#include <dirent.h>
#include <fcntl.h>
-#include <strings.h>
#include <sys/stat.h>
#include <unistd.h>
#include "domain_conf.h"
#include "snapshot_conf.h"
#include "viralloc.h"
-#include "verify.h"
#include "virxml.h"
#include "viruuid.h"
#include "virbuffer.h"
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;
xmlXPathContextPtr ctxt,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
xmlNodePtr *nodes = NULL, node = NULL;
}
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);
xmlXPathContextPtr ctxt,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
char *tmp = NULL;
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;
const char *filename,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
xmlDocPtr xml;
if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) {
def = virDomainDefParseNode(xml, xmlDocGetRootElement(xml), caps,
- xmlopt, expectedVirtTypes, flags);
+ xmlopt, flags);
xmlFreeDoc(xml);
}
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);
}
xmlNodePtr root,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
xmlXPathContextPtr ctxt = NULL;
}
ctxt->node = root;
- def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt,
- expectedVirtTypes, flags);
+ def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt, flags);
cleanup:
xmlXPathFreeContext(ctxt);
xmlNodePtr root,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
xmlXPathContextPtr ctxt = NULL;
}
ctxt->node = root;
- obj = virDomainObjParseXML(xml, ctxt, caps, xmlopt, expectedVirtTypes, flags);
+ obj = virDomainObjParseXML(xml, ctxt, caps, xmlopt, flags);
cleanup:
xmlXPathFreeContext(ctxt);
virDomainObjParseFile(const char *filename,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
xmlDocPtr xml;
if ((xml = virXMLParseFile(filename))) {
obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
- caps, xmlopt,
- expectedVirtTypes, flags);
+ caps, xmlopt, flags);
xmlFreeDoc(xml);
}
const char *configDir,
const char *autostartDir,
const char *name,
- unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque)
{
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;
const char *name,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque)
{
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 |
int liveStatus,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque)
{
entry->d_name,
caps,
xmlopt,
- expectedVirtTypes,
notify,
opaque);
else
configDir,
autostartDir,
entry->d_name,
- expectedVirtTypes,
notify,
opaque);
if (dom) {
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;
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,
int liveStatus,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
virDomainLoadConfigNotify notify,
void *opaque);
/* 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;
goto cleanup;
}
def->dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
- caps, xmlopt,
- expectedVirtTypes, domainflags);
+ caps, xmlopt, domainflags);
if (!def->dom)
goto cleanup;
} else {
xmlNodePtr root,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
xmlXPathContextPtr ctxt = NULL;
}
ctxt->node = root;
- def = virDomainSnapshotDefParse(ctxt, caps, xmlopt,
- expectedVirtTypes, flags);
+ def = virDomainSnapshotDefParse(ctxt, caps, xmlopt, flags);
cleanup:
xmlXPathFreeContext(ctxt);
return def;
virDomainSnapshotDefParseString(const char *xmlStr,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
- unsigned int expectedVirtTypes,
unsigned int flags)
{
virDomainSnapshotDefPtr ret = NULL;
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);
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,
return NULL;
def = virDomainDefParseString(domainXml, priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_VMWARE,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!def)
/* Parse domain XML */
def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_VMWARE,
parse_flags);
if (!def)
return NULL;
def = virDomainSnapshotDefParseString(xmlDesc, priv->caps,
- priv->xmlopt, 0, 0);
+ priv->xmlopt, 0);
if (!def)
return NULL;
}
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto error;
1,
cfg->caps,
libxl_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
NULL, NULL) < 0)
goto error;
0,
cfg->caps,
libxl_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
NULL, NULL) < 0)
goto error;
1,
cfg->caps,
libxl_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
NULL, libxl_driver);
virDomainObjListForEach(libxl_driver->domains, libxlAutostartDomain,
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
parse_flags)))
goto cleanup;
if (!(def = virDomainDefParseString(domainXml,
cfg->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
parse_flags)))
goto cleanup;
if (xmlin) {
if (!(tmpdef = virDomainDefParseString(xmlin, cfg->caps,
driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
}
if (!(def = virDomainDefParseString(dom_xml, cfg->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
if ((ctrl->vm = virDomainObjParseFile(configFile,
caps, xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
0)) == NULL)
goto error;
ctrl->def = ctrl->vm->def;
goto cleanup;
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
parse_flags)))
goto cleanup;
goto cleanup;
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
parse_flags)))
goto cleanup;
NULL, 1,
caps,
lxc_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
NULL, NULL) < 0)
goto cleanup;
cfg->autostartDir, 0,
caps,
lxc_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
NULL, NULL) < 0)
goto cleanup;
cfg->autostartDir, 0,
caps,
lxc_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
lxcNotifyLoadDomain, lxc_driver);
virObjectUnref(caps);
virObjectUnref(cfg);
openvzDriverLock(driver);
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_OPENVZ,
parse_flags)) == NULL)
goto cleanup;
openvzDriverLock(driver);
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_OPENVZ,
parse_flags)) == NULL)
goto cleanup;
}
if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_OPENVZ,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto error;
parallelsDriverLock(privconn);
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_PARALLELS,
parse_flags)) == NULL)
goto cleanup;
if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
phyp_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_PHYP,
parse_flags)))
goto err;
goto cleanup;
if (!(ret = virDomainDefParseString(xml, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
# 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)
def = virDomainSnapshotDefParseString(xmlStr, caps,
qemu_driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
flags);
if (def == NULL) {
/* Nothing we can do here, skip this one */
NULL, 1,
qemu_driver->caps,
qemu_driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
NULL, NULL) < 0)
goto error;
cfg->autostartDir, 0,
qemu_driver->caps,
qemu_driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
NULL, NULL) < 0)
goto error;
cfg->configDir,
cfg->autostartDir, 0,
caps, qemu_driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
qemuNotifyLoadDomain, qemu_driver);
cleanup:
virObjectUnref(cfg);
goto cleanup;
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
parse_flags)))
goto cleanup;
virDomainDefPtr def = NULL;
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
goto endjob;
}
goto cleanup;
if (!(newdef = virDomainDefParseString(newxml, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
/* Create a domain from this XML */
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto error;
goto cleanup;
def = virDomainDefParseString(xmlData, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!def)
goto cleanup;
goto cleanup;
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
parse_flags)))
goto cleanup;
parse_flags |= VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE;
if (!(def = virDomainSnapshotDefParseString(xmlDesc, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
parse_flags)))
goto cleanup;
* 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;
}
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 */
if (xmlin) {
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
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;
return NULL;
if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
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"));
if (!(domdef = virDomainDefParseString(defaultDomainXML,
privconn->caps,
privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto error;
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);
def = virDomainDefParseNode(ctxt->doc, node,
privconn->caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!def)
goto error;
testDriverLock(privconn);
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_TEST,
parse_flags)) == NULL)
goto cleanup;
xml[len] = '\0';
def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_TEST,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!def)
goto cleanup;
testDriverLock(privconn);
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_TEST,
parse_flags)) == NULL)
goto cleanup;
if (!(def = virDomainSnapshotDefParseString(xmlDesc,
privconn->caps,
privconn->xmlopt,
- 1 << VIR_DOMAIN_VIRT_TEST,
parse_flags)))
goto cleanup;
uml_driver->autostartDir, 0,
uml_driver->caps,
uml_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_UML,
NULL, NULL) < 0)
goto error;
uml_driver->autostartDir, 0,
uml_driver->caps,
uml_driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_UML,
umlNotifyLoadDomain, uml_driver);
umlDriverUnlock(uml_driver);
virNWFilterReadLockFilterUpdates();
umlDriverLock(driver);
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_UML,
parse_flags)))
goto cleanup;
umlDriverLock(driver);
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_UML,
parse_flags)))
goto cleanup;
VBOX_IID_INITIALIZE(&mchiid);
if (!(def = virDomainDefParseString(xml, data->caps, data->xmlopt,
- 1 << VIR_DOMAIN_VIRT_VBOX,
parse_flags))) {
goto cleanup;
}
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;
def = virDomainSnapshotDefParseString(defXml,
data->caps,
data->xmlopt,
- -1,
VIR_DOMAIN_SNAPSHOT_PARSE_DISKS |
VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE);
if (!def) {
vmwareDriverLock(driver);
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_VMWARE,
parse_flags)) == NULL)
goto cleanup;
vmwareDriverLock(driver);
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
- 1 << VIR_DOMAIN_VIRT_VMWARE,
parse_flags)) == NULL)
goto cleanup;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
parse_flags)))
goto cleanup;
}
if (!(def = virDomainDefParseString(xmlData, priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE;
if (!(def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
parse_flags)))
goto cleanup;
virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
parse_flags);
if (!defPtr)
return NULL;
return NULL;
virDomainDefPtr defPtr = virDomainDefParseString(xml,
priv->caps, priv->xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
parse_flags);
if (!defPtr)
return NULL;
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,
if (!(def = virDomainSnapshotDefParseString(inXmlData, driver.caps,
driver.xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
flags)))
goto cleanup;
goto fail;
if (!(def = virDomainDefParseString(inXmlData, caps, xmlopt,
- 1 << VIR_DOMAIN_VIRT_LXC,
live ? 0 : VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto fail;
goto cleanup;
if (!(def = virDomainDefParseString(domain_xml, caps, xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
if (!((*vm)->def = virDomainDefParseString(domxml,
driver.caps,
driver.xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
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))
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)) {
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 |
expectargv[len - 1] = '\0';
if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
- QEMU_EXPECTED_VIRT_TYPES,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto fail;
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++) {
goto fail;
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_XML_INACTIVE)))
goto fail;
conn->privateData = &priv;
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto fail;
goto fail;
if (!(def = virDomainDefParseString(xmlData, caps, xmlopt,
- 1 << VIR_DOMAIN_VIRT_XEN,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto fail;
goto failure;
def = virDomainDefParseString(xmlData, caps, xmlopt,
- 1 << VIR_DOMAIN_VIRT_VMWARE,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (def == NULL)