mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
conf: drop virCapsPtr param from domain parse APIs
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b5f591cdb4
commit
bf9d812956
@ -519,7 +519,7 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
|
|||||||
if (!caps)
|
if (!caps)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, privconn->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -681,7 +681,6 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
|
|||||||
bhyveConnPtr privconn = conn->privateData;
|
bhyveConnPtr privconn = conn->privateData;
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
virCommandPtr cmd = NULL, loadcmd = NULL;
|
virCommandPtr cmd = NULL, loadcmd = NULL;
|
||||||
virCapsPtr caps = NULL;
|
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
|
|
||||||
virCheckFlags(0, NULL);
|
virCheckFlags(0, NULL);
|
||||||
@ -695,10 +694,7 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(caps = bhyveDriverGetCapabilities(privconn)))
|
if (!(def = virDomainDefParseString(xmlData, privconn->xmlopt,
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlData, caps, privconn->xmlopt,
|
|
||||||
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -741,7 +737,6 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
|
|||||||
virCommandFree(loadcmd);
|
virCommandFree(loadcmd);
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
virDomainDefFree(def);
|
virDomainDefFree(def);
|
||||||
virObjectUnref(caps);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -898,7 +893,6 @@ bhyveDomainCreateXML(virConnectPtr conn,
|
|||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
virObjectEventPtr event = NULL;
|
virObjectEventPtr event = NULL;
|
||||||
virCapsPtr caps = NULL;
|
|
||||||
unsigned int start_flags = 0;
|
unsigned int start_flags = 0;
|
||||||
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
||||||
|
|
||||||
@ -910,11 +904,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
|
|||||||
if (flags & VIR_DOMAIN_START_AUTODESTROY)
|
if (flags & VIR_DOMAIN_START_AUTODESTROY)
|
||||||
start_flags |= VIR_BHYVE_PROCESS_START_AUTODESTROY;
|
start_flags |= VIR_BHYVE_PROCESS_START_AUTODESTROY;
|
||||||
|
|
||||||
caps = bhyveDriverGetCapabilities(privconn);
|
if ((def = virDomainDefParseString(xml, privconn->xmlopt,
|
||||||
if (!caps)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
|
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -947,7 +937,6 @@ bhyveDomainCreateXML(virConnectPtr conn,
|
|||||||
dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
|
dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(caps);
|
|
||||||
virDomainDefFree(def);
|
virDomainDefFree(def);
|
||||||
virDomainObjEndAPI(&vm);
|
virDomainObjEndAPI(&vm);
|
||||||
virObjectEventStateQueue(privconn->domainEventState, event);
|
virObjectEventStateQueue(privconn->domainEventState, event);
|
||||||
|
@ -121,7 +121,7 @@ virDomainCheckpointDiskDefParseXML(xmlNodePtr node,
|
|||||||
*/
|
*/
|
||||||
static virDomainCheckpointDefPtr
|
static virDomainCheckpointDefPtr
|
||||||
virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
|
virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -170,7 +170,7 @@ virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
def->parent.dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
|
def->parent.dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
|
||||||
caps, xmlopt, parseOpaque,
|
xmlopt, parseOpaque,
|
||||||
domainflags);
|
domainflags);
|
||||||
if (!def->parent.dom)
|
if (!def->parent.dom)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -16419,7 +16419,6 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt,
|
|||||||
virDomainDeviceDefPtr
|
virDomainDeviceDefPtr
|
||||||
virDomainDeviceDefParse(const char *xmlStr,
|
virDomainDeviceDefParse(const char *xmlStr,
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virCapsPtr caps G_GNUC_UNUSED,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -19773,7 +19772,6 @@ virDomainMemorytuneDefParse(virDomainDefPtr def,
|
|||||||
static virDomainDefPtr
|
static virDomainDefPtr
|
||||||
virDomainDefParseXML(xmlDocPtr xml,
|
virDomainDefParseXML(xmlDocPtr xml,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps G_GNUC_UNUSED,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -21478,7 +21476,6 @@ virDomainDefParseXML(xmlDocPtr xml,
|
|||||||
static virDomainObjPtr
|
static virDomainObjPtr
|
||||||
virDomainObjParseXML(xmlDocPtr xml,
|
virDomainObjParseXML(xmlDocPtr xml,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -21505,7 +21502,7 @@ virDomainObjParseXML(xmlDocPtr xml,
|
|||||||
|
|
||||||
oldnode = ctxt->node;
|
oldnode = ctxt->node;
|
||||||
ctxt->node = config;
|
ctxt->node = config;
|
||||||
obj->def = virDomainDefParseXML(xml, ctxt, caps, xmlopt, flags);
|
obj->def = virDomainDefParseXML(xml, ctxt, xmlopt, flags);
|
||||||
ctxt->node = oldnode;
|
ctxt->node = oldnode;
|
||||||
if (!obj->def)
|
if (!obj->def)
|
||||||
goto error;
|
goto error;
|
||||||
@ -21582,7 +21579,6 @@ virDomainObjParseXML(xmlDocPtr xml,
|
|||||||
static virDomainDefPtr
|
static virDomainDefPtr
|
||||||
virDomainDefParse(const char *xmlStr,
|
virDomainDefParse(const char *xmlStr,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -21604,7 +21600,7 @@ virDomainDefParse(const char *xmlStr,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
def = virDomainDefParseNode(xml, root, caps, xmlopt, parseOpaque, flags);
|
def = virDomainDefParseNode(xml, root, xmlopt, parseOpaque, flags);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
@ -21614,29 +21610,26 @@ virDomainDefParse(const char *xmlStr,
|
|||||||
|
|
||||||
virDomainDefPtr
|
virDomainDefPtr
|
||||||
virDomainDefParseString(const char *xmlStr,
|
virDomainDefParseString(const char *xmlStr,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
return virDomainDefParse(xmlStr, NULL, caps, xmlopt, parseOpaque, flags);
|
return virDomainDefParse(xmlStr, NULL, xmlopt, parseOpaque, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
virDomainDefPtr
|
virDomainDefPtr
|
||||||
virDomainDefParseFile(const char *filename,
|
virDomainDefParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
return virDomainDefParse(NULL, filename, caps, xmlopt, parseOpaque, flags);
|
return virDomainDefParse(NULL, filename, xmlopt, parseOpaque, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virDomainDefPtr
|
virDomainDefPtr
|
||||||
virDomainDefParseNode(xmlDocPtr xml,
|
virDomainDefParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
@ -21649,7 +21642,7 @@ virDomainDefParseNode(xmlDocPtr xml,
|
|||||||
|
|
||||||
ctxt->node = root;
|
ctxt->node = root;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseXML(xml, ctxt, caps, xmlopt, flags)))
|
if (!(def = virDomainDefParseXML(xml, ctxt, xmlopt, flags)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* callback to fill driver specific domain aspects */
|
/* callback to fill driver specific domain aspects */
|
||||||
@ -21667,7 +21660,6 @@ virDomainDefParseNode(xmlDocPtr xml,
|
|||||||
virDomainObjPtr
|
virDomainObjPtr
|
||||||
virDomainObjParseNode(xmlDocPtr xml,
|
virDomainObjParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -21685,13 +21677,12 @@ virDomainObjParseNode(xmlDocPtr xml,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ctxt->node = root;
|
ctxt->node = root;
|
||||||
return virDomainObjParseXML(xml, ctxt, caps, xmlopt, flags);
|
return virDomainObjParseXML(xml, ctxt, xmlopt, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virDomainObjPtr
|
virDomainObjPtr
|
||||||
virDomainObjParseFile(const char *filename,
|
virDomainObjParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -21701,7 +21692,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, flags);
|
xmlopt, flags);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29378,7 +29369,7 @@ virDomainDefCopy(virDomainDefPtr src,
|
|||||||
if (!(xml = virDomainDefFormat(src, xmlopt, format_flags)))
|
if (!(xml = virDomainDefFormat(src, xmlopt, format_flags)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return virDomainDefParseString(xml, caps, xmlopt, parseOpaque, parse_flags);
|
return virDomainDefParseString(xml, xmlopt, parseOpaque, parse_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
virDomainDefPtr
|
virDomainDefPtr
|
||||||
@ -29835,7 +29826,7 @@ virDomainNetFindByName(virDomainDefPtr def,
|
|||||||
virDomainDeviceDefPtr
|
virDomainDeviceDefPtr
|
||||||
virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
|
virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque)
|
void *parseOpaque)
|
||||||
{
|
{
|
||||||
@ -29923,7 +29914,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
xmlStr = virBufferContentAndReset(&buf);
|
xmlStr = virBufferContentAndReset(&buf);
|
||||||
return virDomainDeviceDefParse(xmlStr, def, caps, xmlopt, parseOpaque,
|
return virDomainDeviceDefParse(xmlStr, def, xmlopt, parseOpaque,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
}
|
}
|
||||||
|
@ -3035,7 +3035,6 @@ typedef enum {
|
|||||||
|
|
||||||
virDomainDeviceDefPtr virDomainDeviceDefParse(const char *xmlStr,
|
virDomainDeviceDefPtr virDomainDeviceDefParse(const char *xmlStr,
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
@ -3043,28 +3042,23 @@ virDomainDiskDefPtr virDomainDiskDefParse(const char *xmlStr,
|
|||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainDefPtr virDomainDefParseString(const char *xmlStr,
|
virDomainDefPtr virDomainDefParseString(const char *xmlStr,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainDefPtr virDomainDefParseFile(const char *filename,
|
virDomainDefPtr virDomainDefParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc,
|
virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainObjPtr virDomainObjParseNode(xmlDocPtr xml,
|
virDomainObjPtr virDomainObjParseNode(xmlDocPtr xml,
|
||||||
xmlNodePtr root,
|
xmlNodePtr root,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
virDomainObjPtr virDomainObjParseFile(const char *filename,
|
virDomainObjPtr virDomainObjParseFile(const char *filename,
|
||||||
virCapsPtr caps,
|
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
|
|||||||
*/
|
*/
|
||||||
static virDomainSnapshotDefPtr
|
static virDomainSnapshotDefPtr
|
||||||
virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
void *parseOpaque,
|
void *parseOpaque,
|
||||||
bool *current,
|
bool *current,
|
||||||
@ -301,7 +301,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
def->parent.dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
|
def->parent.dom = virDomainDefParseNode(ctxt->node->doc, domainNode,
|
||||||
caps, xmlopt, parseOpaque,
|
xmlopt, parseOpaque,
|
||||||
domainflags);
|
domainflags);
|
||||||
if (!def->parent.dom)
|
if (!def->parent.dom)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -314,7 +314,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
|
|||||||
* parent.dom for config and live XML. */
|
* parent.dom for config and live XML. */
|
||||||
if ((inactiveDomNode = virXPathNode("./inactiveDomain", ctxt))) {
|
if ((inactiveDomNode = virXPathNode("./inactiveDomain", ctxt))) {
|
||||||
def->parent.inactiveDom = virDomainDefParseNode(ctxt->node->doc, inactiveDomNode,
|
def->parent.inactiveDom = virDomainDefParseNode(ctxt->node->doc, inactiveDomNode,
|
||||||
caps, xmlopt, NULL, domainflags);
|
xmlopt, NULL, domainflags);
|
||||||
if (!def->parent.inactiveDom)
|
if (!def->parent.inactiveDom)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -483,7 +483,7 @@ virDomainObjListRename(virDomainObjListPtr doms,
|
|||||||
|
|
||||||
static virDomainObjPtr
|
static virDomainObjPtr
|
||||||
virDomainObjListLoadConfig(virDomainObjListPtr doms,
|
virDomainObjListLoadConfig(virDomainObjListPtr doms,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
const char *configDir,
|
const char *configDir,
|
||||||
const char *autostartDir,
|
const char *autostartDir,
|
||||||
@ -499,7 +499,7 @@ 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, NULL,
|
if (!(def = virDomainDefParseFile(configFile, xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
|
||||||
VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL)))
|
VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL)))
|
||||||
@ -536,7 +536,7 @@ static virDomainObjPtr
|
|||||||
virDomainObjListLoadStatus(virDomainObjListPtr doms,
|
virDomainObjListLoadStatus(virDomainObjListPtr doms,
|
||||||
const char *statusDir,
|
const char *statusDir,
|
||||||
const char *name,
|
const char *name,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
virDomainLoadConfigNotify notify,
|
virDomainLoadConfigNotify notify,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
@ -548,7 +548,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,
|
if (!(obj = virDomainObjParseFile(statusFile, 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 |
|
||||||
|
@ -2744,7 +2744,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
|
|||||||
if (virtualHW_version < 0)
|
if (virtualHW_version < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
def = virDomainDefParseString(domainXml, priv->caps, priv->xmlopt,
|
def = virDomainDefParseString(domainXml, priv->xmlopt,
|
||||||
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
|
|
||||||
if (!def)
|
if (!def)
|
||||||
@ -2960,7 +2960,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Parse domain XML */
|
/* Parse domain XML */
|
||||||
def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
|
def = virDomainDefParseString(xml, priv->xmlopt,
|
||||||
NULL, parse_flags);
|
NULL, parse_flags);
|
||||||
|
|
||||||
if (!def)
|
if (!def)
|
||||||
|
@ -732,7 +732,7 @@ libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
libxlDomainSaveImageOpen(libxlDriverPrivatePtr driver,
|
libxlDomainSaveImageOpen(libxlDriverPrivatePtr driver,
|
||||||
libxlDriverConfigPtr cfg,
|
libxlDriverConfigPtr cfg G_GNUC_UNUSED,
|
||||||
const char *from,
|
const char *from,
|
||||||
virDomainDefPtr *ret_def,
|
virDomainDefPtr *ret_def,
|
||||||
libxlSavefileHeaderPtr ret_hdr)
|
libxlSavefileHeaderPtr ret_hdr)
|
||||||
@ -780,7 +780,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivatePtr driver,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt, NULL,
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -1042,7 +1042,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
if (flags & VIR_DOMAIN_START_VALIDATE)
|
if (flags & VIR_DOMAIN_START_VALIDATE)
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -2730,7 +2730,7 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(domainXml,
|
if (!(def = virDomainDefParseString(domainXml,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -2850,7 +2850,7 @@ libxlDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
|
|||||||
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -4116,7 +4116,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
|
|
||||||
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
|
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
@ -4133,7 +4133,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
/* If dev exists it was created to modify the domain config. Free it. */
|
/* If dev exists it was created to modify the domain config. Free it. */
|
||||||
virDomainDeviceDefFree(dev);
|
virDomainDeviceDefFree(dev);
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
@ -4205,7 +4205,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
|
|
||||||
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
|
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -4223,7 +4223,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
/* If dev exists it was created to modify the domain config. Free it. */
|
/* If dev exists it was created to modify the domain config. Free it. */
|
||||||
virDomainDeviceDefFree(dev);
|
virDomainDeviceDefFree(dev);
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -4293,7 +4293,7 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
|
|
||||||
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
|
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -4312,7 +4312,7 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
/* If dev exists it was created to modify the domain config. Free it. */
|
/* If dev exists it was created to modify the domain config. Free it. */
|
||||||
virDomainDeviceDefFree(dev);
|
virDomainDeviceDefFree(dev);
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
|
||||||
cfg->caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ libxlDomainMigrationSrcBegin(virConnectPtr conn,
|
|||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
if (xmlin) {
|
if (xmlin) {
|
||||||
if (!(tmpdef = virDomainDefParseString(xmlin, cfg->caps,
|
if (!(tmpdef = virDomainDefParseString(xmlin,
|
||||||
driver->xmlopt,
|
driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
@ -450,7 +450,7 @@ libxlDomainMigrationDstPrepareDef(libxlDriverPrivatePtr driver,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
@ -477,7 +477,6 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn,
|
|||||||
bool *taint_hook)
|
bool *taint_hook)
|
||||||
{
|
{
|
||||||
libxlDriverPrivatePtr driver = dconn->privateData;
|
libxlDriverPrivatePtr driver = dconn->privateData;
|
||||||
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
|
|
||||||
|
|
||||||
if (libxlMigrationEatCookie(cookiein, cookieinlen, mig) < 0)
|
if (libxlMigrationEatCookie(cookiein, cookieinlen, mig) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -514,7 +513,7 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn,
|
|||||||
virDomainDefPtr newdef;
|
virDomainDefPtr newdef;
|
||||||
|
|
||||||
VIR_DEBUG("Using hook-filtered domain XML: %s", *xmlout);
|
VIR_DEBUG("Using hook-filtered domain XML: %s", *xmlout);
|
||||||
newdef = virDomainDefParseString(*xmlout, cfg->caps, driver->xmlopt,
|
newdef = virDomainDefParseString(*xmlout, driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
|
@ -212,7 +212,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if ((ctrl->vm = virDomainObjParseFile(configFile,
|
if ((ctrl->vm = virDomainObjParseFile(configFile,
|
||||||
driver->caps, driver->xmlopt,
|
driver->xmlopt,
|
||||||
0)) == NULL)
|
0)) == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
ctrl->def = ctrl->vm->def;
|
ctrl->def = ctrl->vm->def;
|
||||||
|
@ -416,7 +416,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
|||||||
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
|
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -1164,7 +1164,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
|
|||||||
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
|
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -4699,7 +4699,7 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
|
|||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
|
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
|
||||||
caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
@ -4818,7 +4818,7 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr dom,
|
|||||||
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
|
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
if (!(dev = virDomainDeviceDefParse(xml, vm->def, caps, driver->xmlopt, NULL,
|
if (!(dev = virDomainDeviceDefParse(xml, vm->def, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
@ -4882,7 +4882,7 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
|
|||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
|
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
|
||||||
caps, driver->xmlopt, NULL,
|
driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
|
@ -858,7 +858,7 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
|
|||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
openvzDriverLock(driver);
|
openvzDriverLock(driver);
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -948,7 +948,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
openvzDriverLock(driver);
|
openvzDriverLock(driver);
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -1909,7 +1909,7 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
|
|||||||
if (!(def = virDomainObjGetOneDef(vm, flags)))
|
if (!(def = virDomainObjGetOneDef(vm, flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
dev = virDomainDeviceDefParse(xml, def, driver->caps, driver->xmlopt, NULL,
|
dev = virDomainDeviceDefParse(xml, def, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2113,7 +2113,7 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
|
@ -1684,7 +1684,7 @@ phypDomainAttachDeviceFlags(virDomainPtr domain,
|
|||||||
|
|
||||||
def->os.type = VIR_DOMAIN_OSTYPE_LINUX;
|
def->os.type = VIR_DOMAIN_OSTYPE_LINUX;
|
||||||
|
|
||||||
dev = virDomainDeviceDefParse(xml, def, phyp_driver->caps, NULL, NULL,
|
dev = virDomainDeviceDefParse(xml, def, NULL, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -3531,7 +3531,7 @@ phypDomainCreateXML(virConnectPtr conn,
|
|||||||
if (flags & VIR_DOMAIN_START_VALIDATE)
|
if (flags & VIR_DOMAIN_START_VALIDATE)
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
|
if (!(def = virDomainDefParseString(xml,
|
||||||
phyp_driver->xmlopt,
|
phyp_driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
|
@ -239,7 +239,7 @@ qemuCheckpointDiscardAllMetadata(virQEMUDriverPtr driver,
|
|||||||
/* Called inside job lock */
|
/* Called inside job lock */
|
||||||
static int
|
static int
|
||||||
qemuCheckpointPrepare(virQEMUDriverPtr driver,
|
qemuCheckpointPrepare(virQEMUDriverPtr driver,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainCheckpointDefPtr def)
|
virDomainCheckpointDefPtr def)
|
||||||
{
|
{
|
||||||
@ -253,7 +253,7 @@ qemuCheckpointPrepare(virQEMUDriverPtr driver,
|
|||||||
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
|
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
|
||||||
vm->def, priv->origCPU,
|
vm->def, priv->origCPU,
|
||||||
true, true)) ||
|
true, true)) ||
|
||||||
!(def->parent.dom = virDomainDefParseString(xml, caps, driver->xmlopt,
|
!(def->parent.dom = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
priv->qemuCaps,
|
priv->qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
|
@ -8975,17 +8975,12 @@ qemuDomainDefFromXML(virQEMUDriverPtr driver,
|
|||||||
virQEMUCapsPtr qemuCaps,
|
virQEMUCapsPtr qemuCaps,
|
||||||
const char *xml)
|
const char *xml)
|
||||||
{
|
{
|
||||||
virCapsPtr caps;
|
|
||||||
virDomainDefPtr def;
|
virDomainDefPtr def;
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
def = virDomainDefParseString(xml, driver->xmlopt, qemuCaps,
|
||||||
return NULL;
|
|
||||||
|
|
||||||
def = virDomainDefParseString(xml, caps, driver->xmlopt, qemuCaps,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
|
|
||||||
virObjectUnref(caps);
|
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1748,7 +1748,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
|
|||||||
virObjectEventPtr event = NULL;
|
virObjectEventPtr event = NULL;
|
||||||
virObjectEventPtr event2 = NULL;
|
virObjectEventPtr event2 = NULL;
|
||||||
unsigned int start_flags = VIR_QEMU_PROCESS_START_COLD;
|
unsigned int start_flags = VIR_QEMU_PROCESS_START_COLD;
|
||||||
g_autoptr(virCaps) caps = NULL;
|
|
||||||
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
|
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
|
||||||
|
|
||||||
@ -1765,10 +1764,7 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
|
|||||||
|
|
||||||
virNWFilterReadLockFilterUpdates();
|
virNWFilterReadLockFilterUpdates();
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -3277,13 +3273,9 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
virObjectEventPtr event = NULL;
|
virObjectEventPtr event = NULL;
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
g_autoptr(virCaps) caps = NULL;
|
|
||||||
virQEMUSaveDataPtr data = NULL;
|
virQEMUSaveDataPtr data = NULL;
|
||||||
qemuDomainSaveCookiePtr cookie = NULL;
|
qemuDomainSaveCookiePtr cookie = NULL;
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
|
if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -3326,7 +3318,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver,
|
|||||||
if (xmlin) {
|
if (xmlin) {
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(xmlin, driver->xmlopt,
|
||||||
priv->qemuCaps,
|
priv->qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE))) {
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE))) {
|
||||||
@ -6581,12 +6573,8 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
|
|||||||
virDomainDefPtr ret = NULL;
|
virDomainDefPtr ret = NULL;
|
||||||
virDomainDefPtr newdef_migr = NULL;
|
virDomainDefPtr newdef_migr = NULL;
|
||||||
virDomainDefPtr newdef = NULL;
|
virDomainDefPtr newdef = NULL;
|
||||||
g_autoptr(virCaps) caps = NULL;
|
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
if (!(newdef = virDomainDefParseString(newxml, driver->xmlopt, NULL,
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(newdef = virDomainDefParseString(newxml, caps, driver->xmlopt, NULL,
|
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -6659,7 +6647,6 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
|||||||
virQEMUSaveHeaderPtr header;
|
virQEMUSaveHeaderPtr header;
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
int oflags = open_write ? O_RDWR : O_RDONLY;
|
int oflags = open_write ? O_RDWR : O_RDONLY;
|
||||||
g_autoptr(virCaps) caps = NULL;
|
|
||||||
size_t xml_len;
|
size_t xml_len;
|
||||||
size_t cookie_len;
|
size_t cookie_len;
|
||||||
|
|
||||||
@ -6673,9 +6660,6 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
|||||||
oflags |= directFlag;
|
oflags |= directFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
if ((fd = qemuOpenFile(driver, NULL, path, oflags, NULL)) < 0)
|
if ((fd = qemuOpenFile(driver, NULL, path, oflags, NULL)) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
if (bypass_cache &&
|
if (bypass_cache &&
|
||||||
@ -6770,7 +6754,7 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create a domain from this XML */
|
/* Create a domain from this XML */
|
||||||
if (!(def = virDomainDefParseString(data->xml, caps, driver->xmlopt, qemuCaps,
|
if (!(def = virDomainDefParseString(data->xml, driver->xmlopt, qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto error;
|
goto error;
|
||||||
@ -7343,7 +7327,6 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
|
|||||||
virCommandPtr cmd = NULL;
|
virCommandPtr cmd = NULL;
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
g_autoptr(virCaps) caps = NULL;
|
|
||||||
|
|
||||||
virCheckFlags(0, NULL);
|
virCheckFlags(0, NULL);
|
||||||
|
|
||||||
@ -7356,13 +7339,10 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(vm = virDomainObjNew(driver->xmlopt)))
|
if (!(vm = virDomainObjNew(driver->xmlopt)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(vm->def = virDomainDefParseString(xmlData, caps, driver->xmlopt, NULL,
|
if (!(vm->def = virDomainDefParseString(xmlData, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE)))
|
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -7587,7 +7567,6 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
|
|||||||
virDomainPtr dom = NULL;
|
virDomainPtr dom = NULL;
|
||||||
virObjectEventPtr event = NULL;
|
virObjectEventPtr event = NULL;
|
||||||
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
g_autoptr(virCaps) caps = NULL;
|
|
||||||
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
|
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
|
||||||
|
|
||||||
@ -7596,10 +7575,7 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
|
|||||||
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
|
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -8651,7 +8627,7 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr vm,
|
|||||||
if (!vmdef)
|
if (!vmdef)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(devConf = virDomainDeviceDefParse(xml, vmdef, caps,
|
if (!(devConf = virDomainDeviceDefParse(xml, vmdef,
|
||||||
driver->xmlopt, priv->qemuCaps,
|
driver->xmlopt, priv->qemuCaps,
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -8672,7 +8648,7 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
|
||||||
if (!(devLive = virDomainDeviceDefParse(xml, vm->def, caps,
|
if (!(devLive = virDomainDeviceDefParse(xml, vm->def,
|
||||||
driver->xmlopt, priv->qemuCaps,
|
driver->xmlopt, priv->qemuCaps,
|
||||||
parse_flags)))
|
parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -8803,7 +8779,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
|
|||||||
!(flags & VIR_DOMAIN_AFFECT_LIVE))
|
!(flags & VIR_DOMAIN_AFFECT_LIVE))
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
||||||
|
|
||||||
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def, caps,
|
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
|
||||||
driver->xmlopt, priv->qemuCaps,
|
driver->xmlopt, priv->qemuCaps,
|
||||||
parse_flags);
|
parse_flags);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
@ -8900,7 +8876,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
|
|||||||
!(flags & VIR_DOMAIN_AFFECT_LIVE))
|
!(flags & VIR_DOMAIN_AFFECT_LIVE))
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
||||||
|
|
||||||
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def, caps,
|
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
|
||||||
driver->xmlopt, priv->qemuCaps,
|
driver->xmlopt, priv->qemuCaps,
|
||||||
parse_flags);
|
parse_flags);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
@ -15972,7 +15948,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
|||||||
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
|
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
|
||||||
vm->def, priv->origCPU,
|
vm->def, priv->origCPU,
|
||||||
true, true)) ||
|
true, true)) ||
|
||||||
!(def->parent.dom = virDomainDefParseString(xml, caps, driver->xmlopt,
|
!(def->parent.dom = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
priv->qemuCaps,
|
priv->qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
|
@ -1974,7 +1974,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
|
|||||||
qemuMigrationCookiePtr mig = NULL;
|
qemuMigrationCookiePtr mig = NULL;
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
virCapsPtr caps = NULL;
|
|
||||||
unsigned int cookieFlags = QEMU_MIGRATION_COOKIE_LOCKSTATE;
|
unsigned int cookieFlags = QEMU_MIGRATION_COOKIE_LOCKSTATE;
|
||||||
|
|
||||||
VIR_DEBUG("driver=%p, vm=%p, xmlin=%s, dname=%s,"
|
VIR_DEBUG("driver=%p, vm=%p, xmlin=%s, dname=%s,"
|
||||||
@ -1984,9 +1983,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
|
|||||||
cookieout, cookieoutlen, nmigrate_disks,
|
cookieout, cookieoutlen, nmigrate_disks,
|
||||||
migrate_disks, flags);
|
migrate_disks, flags);
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
/* Only set the phase if we are inside QEMU_ASYNC_JOB_MIGRATION_OUT.
|
/* Only set the phase if we are inside QEMU_ASYNC_JOB_MIGRATION_OUT.
|
||||||
* Otherwise we will start the async job later in the perform phase losing
|
* Otherwise we will start the async job later in the perform phase losing
|
||||||
* change protection.
|
* change protection.
|
||||||
@ -2103,7 +2099,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (xmlin) {
|
if (xmlin) {
|
||||||
if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt, priv->qemuCaps,
|
if (!(def = virDomainDefParseString(xmlin, driver->xmlopt, priv->qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2119,7 +2115,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuMigrationCookieFree(mig);
|
qemuMigrationCookieFree(mig);
|
||||||
virObjectUnref(caps);
|
|
||||||
virDomainDefFree(def);
|
virDomainDefFree(def);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
@ -2318,7 +2313,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
|
|||||||
char *xmlout = NULL;
|
char *xmlout = NULL;
|
||||||
unsigned int cookieFlags;
|
unsigned int cookieFlags;
|
||||||
unsigned int startFlags;
|
unsigned int startFlags;
|
||||||
virCapsPtr caps = NULL;
|
|
||||||
qemuProcessIncomingDefPtr incoming = NULL;
|
qemuProcessIncomingDefPtr incoming = NULL;
|
||||||
bool taint_hook = false;
|
bool taint_hook = false;
|
||||||
bool stopProcess = false;
|
bool stopProcess = false;
|
||||||
@ -2369,9 +2363,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (!qemuMigrationSrcIsAllowedHostdev(*def))
|
if (!qemuMigrationSrcIsAllowedHostdev(*def))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -2400,7 +2391,7 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
|
|||||||
virDomainDefPtr newdef;
|
virDomainDefPtr newdef;
|
||||||
|
|
||||||
VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
|
VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
|
||||||
newdef = virDomainDefParseString(xmlout, caps, driver->xmlopt, NULL,
|
newdef = virDomainDefParseString(xmlout, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
if (!newdef)
|
if (!newdef)
|
||||||
@ -2648,7 +2639,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
|
|||||||
virDomainObjEndAPI(&vm);
|
virDomainObjEndAPI(&vm);
|
||||||
virObjectEventStateQueue(driver->domainEventState, event);
|
virObjectEventStateQueue(driver->domainEventState, event);
|
||||||
qemuMigrationCookieFree(mig);
|
qemuMigrationCookieFree(mig);
|
||||||
virObjectUnref(caps);
|
|
||||||
virNWFilterUnlockFilterUpdates();
|
virNWFilterUnlockFilterUpdates();
|
||||||
virErrorRestore(&origErr);
|
virErrorRestore(&origErr);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2886,7 +2876,6 @@ qemuMigrationAnyPrepareDef(virQEMUDriverPtr driver,
|
|||||||
const char *dname,
|
const char *dname,
|
||||||
char **origname)
|
char **origname)
|
||||||
{
|
{
|
||||||
virCapsPtr caps = NULL;
|
|
||||||
virDomainDefPtr def;
|
virDomainDefPtr def;
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
|
|
||||||
@ -2896,10 +2885,7 @@ qemuMigrationAnyPrepareDef(virQEMUDriverPtr driver,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlopt,
|
|
||||||
qemuCaps,
|
qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
@ -2911,7 +2897,6 @@ qemuMigrationAnyPrepareDef(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(caps);
|
|
||||||
if (def && origname)
|
if (def && origname)
|
||||||
*origname = name;
|
*origname = name;
|
||||||
else
|
else
|
||||||
|
@ -1198,10 +1198,6 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
|||||||
xmlNodePtr *nodes = NULL;
|
xmlNodePtr *nodes = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
int n;
|
int n;
|
||||||
virCapsPtr caps = NULL;
|
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* We don't store the uuid, name, hostname, or hostuuid
|
/* We don't store the uuid, name, hostname, or hostuuid
|
||||||
* values. We just compare them to local data to do some
|
* values. We just compare them to local data to do some
|
||||||
@ -1330,7 +1326,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
mig->persistent = virDomainDefParseNode(doc, nodes[0],
|
mig->persistent = virDomainDefParseNode(doc, nodes[0],
|
||||||
caps, driver->xmlopt, qemuCaps,
|
driver->xmlopt, qemuCaps,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION |
|
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
@ -1369,13 +1365,11 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
|||||||
!(mig->caps = qemuMigrationCookieCapsXMLParse(ctxt)))
|
!(mig->caps = qemuMigrationCookieCapsXMLParse(ctxt)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
virObjectUnref(caps);
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
virObjectUnref(caps);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,7 +690,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctl->def = virDomainDefParseString(xmlStr,
|
ctl->def = virDomainDefParseString(xmlStr,
|
||||||
ctl->caps, ctl->xmlopt, NULL,
|
ctl->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_SECLABEL |
|
VIR_DOMAIN_DEF_PARSE_SKIP_SECLABEL |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ testParseDomains(testDriverPtr privconn,
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
def = virDomainDefParseNode(ctxt->doc, node,
|
def = virDomainDefParseNode(ctxt->doc, node,
|
||||||
privconn->caps, privconn->xmlopt, NULL,
|
privconn->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (!def)
|
if (!def)
|
||||||
goto error;
|
goto error;
|
||||||
@ -1678,7 +1678,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
virObjectLock(privconn);
|
virObjectLock(privconn);
|
||||||
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, privconn->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -2294,7 +2294,7 @@ testDomainSaveImageOpen(testDriverPtr driver,
|
|||||||
}
|
}
|
||||||
xml[len] = '\0';
|
xml[len] = '\0';
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt, NULL,
|
if (!(def = virDomainDefParseString(xml, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto error;
|
goto error;
|
||||||
@ -2437,7 +2437,7 @@ testDomainSaveImageDefineXML(virConnectPtr conn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
VIR_FORCE_CLOSE(fd);
|
VIR_FORCE_CLOSE(fd);
|
||||||
|
|
||||||
if ((newdef = virDomainDefParseString(dxml, privconn->caps, privconn->xmlopt, NULL,
|
if ((newdef = virDomainDefParseString(dxml, privconn->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)) == NULL)
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -3989,7 +3989,7 @@ static virDomainPtr testDomainDefineXMLFlags(virConnectPtr conn,
|
|||||||
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
|
if ((def = virDomainDefParseString(xml, privconn->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1858,7 +1858,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags
|
|||||||
if (!data->vboxObj)
|
if (!data->vboxObj)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(xml, data->caps, data->xmlopt,
|
if (!(def = virDomainDefParseString(xml, data->xmlopt,
|
||||||
NULL, parse_flags)))
|
NULL, parse_flags)))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -4257,7 +4257,7 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
|
|||||||
|
|
||||||
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
|
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
|
||||||
|
|
||||||
dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt, NULL,
|
dev = virDomainDeviceDefParse(xml, def, data->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -4376,7 +4376,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
|
|||||||
|
|
||||||
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
|
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
|
||||||
|
|
||||||
dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt, NULL,
|
dev = virDomainDeviceDefParse(xml, def, data->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
VIR_DOMAIN_DEF_PARSE_INACTIVE |
|
||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
|
@ -421,7 +421,7 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
|
|||||||
ctx.datacenterPath = NULL;
|
ctx.datacenterPath = NULL;
|
||||||
|
|
||||||
vmwareDriverLock(driver);
|
vmwareDriverLock(driver);
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -683,7 +683,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
|
|
||||||
vmwareDriverLock(driver);
|
vmwareDriverLock(driver);
|
||||||
|
|
||||||
if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -792,7 +792,7 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
|||||||
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
|
||||||
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
|
||||||
|
|
||||||
if ((def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
|
if ((def = virDomainDefParseString(xml, driver->xmlopt,
|
||||||
NULL, parse_flags)) == NULL)
|
NULL, parse_flags)) == NULL)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -2992,7 +2992,7 @@ vzDomainMigratePrepare3Params(virConnectPtr conn,
|
|||||||
| VZ_MIGRATION_COOKIE_DOMAIN_NAME) < 0)
|
| VZ_MIGRATION_COOKIE_DOMAIN_NAME) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -35,7 +35,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
|||||||
if (!(conn = virGetConnect()))
|
if (!(conn = virGetConnect()))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
|
if (!(vmdef = virDomainDefParseFile(xml, driver.xmlopt,
|
||||||
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
||||||
if (flags & FLAG_EXPECT_PARSE_ERROR) {
|
if (flags & FLAG_EXPECT_PARSE_ERROR) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -49,7 +49,7 @@ static int testGetFilesystem(const void *opaque)
|
|||||||
filename = g_strdup_printf("%s/domainconfdata/%s.xml", abs_srcdir,
|
filename = g_strdup_printf("%s/domainconfdata/%s.xml", abs_srcdir,
|
||||||
data->filename);
|
data->filename);
|
||||||
|
|
||||||
if (!(def = virDomainDefParseFile(filename, caps, xmlopt, NULL, 0)))
|
if (!(def = virDomainDefParseFile(filename, xmlopt, NULL, 0)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
fsdef = virDomainGetFilesystemForTarget(def,
|
fsdef = virDomainGetFilesystemForTarget(def,
|
||||||
|
@ -76,7 +76,7 @@ testCompareXMLToDomConfig(const char *xmlfile,
|
|||||||
if (!(gports = virPortAllocatorRangeNew("vnc", 5900, 6000)))
|
if (!(gports = virPortAllocatorRangeNew("vnc", 5900, 6000)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(vmdef = virDomainDefParseFile(xmlfile, cfg->caps, driver->xmlopt,
|
if (!(vmdef = virDomainDefParseFile(xmlfile, driver->xmlopt,
|
||||||
NULL, VIR_DOMAIN_XML_INACTIVE)))
|
NULL, VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ testQemuAgentGetFSInfoCommon(virDomainXMLOptionPtr xmlopt,
|
|||||||
|
|
||||||
domain_filename = g_strdup_printf("%s/qemuagentdata/fsinfo.xml", abs_srcdir);
|
domain_filename = g_strdup_printf("%s/qemuagentdata/fsinfo.xml", abs_srcdir);
|
||||||
|
|
||||||
if (!(ret_def = virDomainDefParseFile(domain_filename, driver.caps, xmlopt,
|
if (!(ret_def = virDomainDefParseFile(domain_filename, xmlopt,
|
||||||
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -87,7 +87,6 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!((*vm)->def = virDomainDefParseString(domxml,
|
if (!((*vm)->def = virDomainDefParseString(domxml,
|
||||||
driver.caps,
|
|
||||||
driver.xmlopt,
|
driver.xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
parseFlags)))
|
parseFlags)))
|
||||||
@ -277,7 +276,7 @@ testQemuHotplug(const void *data)
|
|||||||
device_parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
device_parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
||||||
|
|
||||||
if (!(dev = virDomainDeviceDefParse(device_xml, vm->def,
|
if (!(dev = virDomainDeviceDefParse(device_xml, vm->def,
|
||||||
caps, driver.xmlopt, NULL,
|
driver.xmlopt, NULL,
|
||||||
device_parse_flags)))
|
device_parse_flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ testCompareMemLock(const void *data)
|
|||||||
xml = g_strdup_printf("%s/qemumemlockdata/qemumemlock-%s.xml", abs_srcdir,
|
xml = g_strdup_printf("%s/qemumemlockdata/qemumemlock-%s.xml", abs_srcdir,
|
||||||
info->name);
|
info->name);
|
||||||
|
|
||||||
if (!(def = virDomainDefParseFile(xml, driver.caps, driver.xmlopt, NULL,
|
if (!(def = virDomainDefParseFile(xml, driver.xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,6 @@ prepareObjects(virQEMUDriverPtr driver,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(vm->def = virDomainDefParseString(domxml,
|
if (!(vm->def = virDomainDefParseString(domxml,
|
||||||
driver->caps,
|
|
||||||
driver->xmlopt,
|
driver->xmlopt,
|
||||||
NULL,
|
NULL,
|
||||||
0)))
|
0)))
|
||||||
|
@ -450,7 +450,7 @@ testCompareXMLToArgv(const void *data)
|
|||||||
|
|
||||||
parseFlags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
parseFlags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
|
||||||
if (!(vm->def = virDomainDefParseFile(info->infile,
|
if (!(vm->def = virDomainDefParseFile(info->infile,
|
||||||
driver.caps, driver.xmlopt,
|
driver.xmlopt,
|
||||||
NULL, parseFlags))) {
|
NULL, parseFlags))) {
|
||||||
if (flags & FLAG_EXPECT_PARSE_ERROR)
|
if (flags & FLAG_EXPECT_PARSE_ERROR)
|
||||||
goto ok;
|
goto ok;
|
||||||
|
@ -58,7 +58,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
|
|||||||
char *actual = NULL;
|
char *actual = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (!(obj = virDomainObjParseFile(data->infile, driver.caps, driver.xmlopt,
|
if (!(obj = virDomainObjParseFile(data->infile, driver.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 |
|
||||||
|
@ -175,7 +175,7 @@ testSELinuxLoadDef(const char *testname)
|
|||||||
xmlfile = g_strdup_printf("%s/securityselinuxlabeldata/%s.xml", abs_srcdir,
|
xmlfile = g_strdup_printf("%s/securityselinuxlabeldata/%s.xml", abs_srcdir,
|
||||||
testname);
|
testname);
|
||||||
|
|
||||||
if (!(def = virDomainDefParseFile(xmlfile, driver.caps, driver.xmlopt,
|
if (!(def = virDomainDefParseFile(xmlfile, driver.xmlopt,
|
||||||
NULL, 0)))
|
NULL, 0)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1107,7 +1107,8 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
|
testCompareDomXML2XMLFiles(virCapsPtr caps G_GNUC_UNUSED,
|
||||||
|
virDomainXMLOptionPtr xmlopt,
|
||||||
const char *infile, const char *outfile, bool live,
|
const char *infile, const char *outfile, bool live,
|
||||||
unsigned int parseFlags,
|
unsigned int parseFlags,
|
||||||
testCompareDomXML2XMLResult expectResult)
|
testCompareDomXML2XMLResult expectResult)
|
||||||
@ -1129,7 +1130,7 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
|
|||||||
if (!live)
|
if (!live)
|
||||||
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;
|
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseFile(infile, caps, xmlopt, NULL, parse_flags))) {
|
if (!(def = virDomainDefParseFile(infile, xmlopt, NULL, parse_flags))) {
|
||||||
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE;
|
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -83,11 +83,11 @@ testCompareParseXML(const char *xlcfg, const char *xml, bool replaceVars)
|
|||||||
if (replaceVars) {
|
if (replaceVars) {
|
||||||
if (!(replacedXML = testReplaceVarsXML(xml)))
|
if (!(replacedXML = testReplaceVarsXML(xml)))
|
||||||
goto fail;
|
goto fail;
|
||||||
if (!(def = virDomainDefParseString(replacedXML, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseString(replacedXML, driver->xmlopt,
|
||||||
NULL, VIR_DOMAIN_XML_INACTIVE)))
|
NULL, VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
} else {
|
} else {
|
||||||
if (!(def = virDomainDefParseFile(xml, cfg->caps, driver->xmlopt,
|
if (!(def = virDomainDefParseFile(xml, driver->xmlopt,
|
||||||
NULL, VIR_DOMAIN_XML_INACTIVE)))
|
NULL, VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ testCompareParseXML(const char *xmcfg, const char *xml)
|
|||||||
conn = virGetConnect();
|
conn = virGetConnect();
|
||||||
if (!conn) goto fail;
|
if (!conn) goto fail;
|
||||||
|
|
||||||
if (!(def = virDomainDefParseFile(xml, cfg->caps, driver->xmlopt, NULL,
|
if (!(def = virDomainDefParseFile(xml, driver->xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
|
|||||||
char *formatted = NULL;
|
char *formatted = NULL;
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
|
|
||||||
def = virDomainDefParseFile(xml, caps, xmlopt, NULL,
|
def = virDomainDefParseFile(xml, xmlopt, NULL,
|
||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
VIR_DOMAIN_DEF_PARSE_INACTIVE);
|
||||||
|
|
||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user