mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
virDomainXMLOption: Introduce virDomainABIStabilityDomain
While checking for ABI stability, drivers might pose additional checks that are not valid for general case. For instance, qemu driver might check some memory backing attributes because of how qemu works. But those attributes may work well in other drivers. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5d3994d822
commit
4f0aeed871
@ -144,7 +144,7 @@ virBhyveDriverCreateXMLConf(bhyveConnPtr driver)
|
|||||||
virBhyveDriverDomainDefParserConfig.priv = driver;
|
virBhyveDriverDomainDefParserConfig.priv = driver;
|
||||||
return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
|
return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
|
||||||
&virBhyveDriverPrivateDataCallbacks,
|
&virBhyveDriverPrivateDataCallbacks,
|
||||||
NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
virDomainDefParserConfig virBhyveDriverDomainDefParserConfig = {
|
virDomainDefParserConfig virBhyveDriverDomainDefParserConfig = {
|
||||||
|
@ -76,6 +76,9 @@ struct _virDomainXMLOption {
|
|||||||
|
|
||||||
/* XML namespace callbacks */
|
/* XML namespace callbacks */
|
||||||
virDomainXMLNamespace ns;
|
virDomainXMLNamespace ns;
|
||||||
|
|
||||||
|
/* ABI stability callbacks */
|
||||||
|
virDomainABIStability abi;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VIR_DOMAIN_DEF_FORMAT_COMMON_FLAGS \
|
#define VIR_DOMAIN_DEF_FORMAT_COMMON_FLAGS \
|
||||||
@ -1050,7 +1053,8 @@ virDomainKeyWrapDefParseXML(virDomainDefPtr def, xmlXPathContextPtr ctxt)
|
|||||||
virDomainXMLOptionPtr
|
virDomainXMLOptionPtr
|
||||||
virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
|
virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
|
||||||
virDomainXMLPrivateDataCallbacksPtr priv,
|
virDomainXMLPrivateDataCallbacksPtr priv,
|
||||||
virDomainXMLNamespacePtr xmlns)
|
virDomainXMLNamespacePtr xmlns,
|
||||||
|
virDomainABIStabilityPtr abi)
|
||||||
{
|
{
|
||||||
virDomainXMLOptionPtr xmlopt;
|
virDomainXMLOptionPtr xmlopt;
|
||||||
|
|
||||||
@ -1069,6 +1073,9 @@ virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
|
|||||||
if (xmlns)
|
if (xmlns)
|
||||||
xmlopt->ns = *xmlns;
|
xmlopt->ns = *xmlns;
|
||||||
|
|
||||||
|
if (abi)
|
||||||
|
xmlopt->abi = *abi;
|
||||||
|
|
||||||
/* Technically this forbids to use one of Xerox's MAC address prefixes in
|
/* Technically this forbids to use one of Xerox's MAC address prefixes in
|
||||||
* our hypervisor drivers. This shouldn't ever be a problem.
|
* our hypervisor drivers. This shouldn't ever be a problem.
|
||||||
*
|
*
|
||||||
@ -19984,6 +19991,7 @@ virDomainDefVcpuCheckAbiStability(virDomainDefPtr src,
|
|||||||
bool
|
bool
|
||||||
virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
|
virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
|
||||||
virDomainDefPtr dst,
|
virDomainDefPtr dst,
|
||||||
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -20385,6 +20393,10 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
|
|||||||
!virDomainIOMMUDefCheckABIStability(src->iommu, dst->iommu))
|
!virDomainIOMMUDefCheckABIStability(src->iommu, dst->iommu))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
if (xmlopt && xmlopt->abi.domain &&
|
||||||
|
!xmlopt->abi.domain(src, dst))
|
||||||
|
goto error;
|
||||||
|
|
||||||
/* Coverity is not very happy with this - all dead_error_condition */
|
/* Coverity is not very happy with this - all dead_error_condition */
|
||||||
#if !STATIC_ANALYSIS
|
#if !STATIC_ANALYSIS
|
||||||
/* This switch statement is here to trigger compiler warning when adding
|
/* This switch statement is here to trigger compiler warning when adding
|
||||||
@ -20444,9 +20456,10 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
virDomainDefCheckABIStability(virDomainDefPtr src,
|
virDomainDefCheckABIStability(virDomainDefPtr src,
|
||||||
virDomainDefPtr dst)
|
virDomainDefPtr dst,
|
||||||
|
virDomainXMLOptionPtr xmlopt)
|
||||||
{
|
{
|
||||||
return virDomainDefCheckABIStabilityFlags(src, dst, 0);
|
return virDomainDefCheckABIStabilityFlags(src, dst, xmlopt, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2537,9 +2537,19 @@ struct _virDomainXMLPrivateDataCallbacks {
|
|||||||
virDomainXMLPrivateDataParseFunc parse;
|
virDomainXMLPrivateDataParseFunc parse;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef bool (*virDomainABIStabilityDomain)(const virDomainDef *src,
|
||||||
|
const virDomainDef *dst);
|
||||||
|
|
||||||
|
typedef struct _virDomainABIStability virDomainABIStability;
|
||||||
|
typedef virDomainABIStability *virDomainABIStabilityPtr;
|
||||||
|
struct _virDomainABIStability {
|
||||||
|
virDomainABIStabilityDomain domain;
|
||||||
|
};
|
||||||
|
|
||||||
virDomainXMLOptionPtr virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
|
virDomainXMLOptionPtr virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
|
||||||
virDomainXMLPrivateDataCallbacksPtr priv,
|
virDomainXMLPrivateDataCallbacksPtr priv,
|
||||||
virDomainXMLNamespacePtr xmlns);
|
virDomainXMLNamespacePtr xmlns,
|
||||||
|
virDomainABIStabilityPtr abi);
|
||||||
|
|
||||||
void virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt, virMacAddrPtr mac);
|
void virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt, virMacAddrPtr mac);
|
||||||
|
|
||||||
@ -2806,10 +2816,12 @@ virDomainObjPtr virDomainObjParseFile(const char *filename,
|
|||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
bool virDomainDefCheckABIStability(virDomainDefPtr src,
|
bool virDomainDefCheckABIStability(virDomainDefPtr src,
|
||||||
virDomainDefPtr dst);
|
virDomainDefPtr dst,
|
||||||
|
virDomainXMLOptionPtr xmlopt);
|
||||||
|
|
||||||
bool virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
|
bool virDomainDefCheckABIStabilityFlags(virDomainDefPtr src,
|
||||||
virDomainDefPtr dst,
|
virDomainDefPtr dst,
|
||||||
|
virDomainXMLOptionPtr xmlopt,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
int virDomainDefAddImplicitDevices(virDomainDefPtr def);
|
int virDomainDefAddImplicitDevices(virDomainDefPtr def);
|
||||||
|
@ -1198,6 +1198,7 @@ virDomainSnapshotRedefinePrep(virDomainPtr domain,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainSnapshotDefPtr *defptr,
|
virDomainSnapshotDefPtr *defptr,
|
||||||
virDomainSnapshotObjPtr *snap,
|
virDomainSnapshotObjPtr *snap,
|
||||||
|
virDomainXMLOptionPtr xmlopt,
|
||||||
bool *update_current,
|
bool *update_current,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
@ -1286,7 +1287,7 @@ virDomainSnapshotRedefinePrep(virDomainPtr domain,
|
|||||||
if (other->def->dom) {
|
if (other->def->dom) {
|
||||||
if (def->dom) {
|
if (def->dom) {
|
||||||
if (!virDomainDefCheckABIStability(other->def->dom,
|
if (!virDomainDefCheckABIStability(other->def->dom,
|
||||||
def->dom))
|
def->dom, xmlopt))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
/* Transfer the domain def */
|
/* Transfer the domain def */
|
||||||
|
@ -181,6 +181,7 @@ int virDomainSnapshotRedefinePrep(virDomainPtr domain,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainSnapshotDefPtr *def,
|
virDomainSnapshotDefPtr *def,
|
||||||
virDomainSnapshotObjPtr *snap,
|
virDomainSnapshotObjPtr *snap,
|
||||||
|
virDomainXMLOptionPtr xmlopt,
|
||||||
bool *update_current,
|
bool *update_current,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
||||||
|
@ -2255,5 +2255,5 @@ libxlCreateXMLConf(void)
|
|||||||
{
|
{
|
||||||
return virDomainXMLOptionNew(&libxlDomainDefParserConfig,
|
return virDomainXMLOptionNew(&libxlDomainDefParserConfig,
|
||||||
&libxlDomainXMLPrivateDataCallbacks,
|
&libxlDomainXMLPrivateDataCallbacks,
|
||||||
NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -1452,7 +1452,9 @@ libxlDomainDefCheckABIStability(libxlDriverPrivatePtr driver,
|
|||||||
!(migratableDefDst = virDomainDefCopy(dst, cfg->caps, driver->xmlopt, NULL, true)))
|
!(migratableDefDst = virDomainDefCopy(dst, cfg->caps, driver->xmlopt, NULL, true)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virDomainDefCheckABIStability(migratableDefSrc, migratableDefDst);
|
ret = virDomainDefCheckABIStability(migratableDefSrc,
|
||||||
|
migratableDefDst,
|
||||||
|
driver->xmlopt);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainDefFree(migratableDefSrc);
|
virDomainDefFree(migratableDefSrc);
|
||||||
|
@ -215,7 +215,8 @@ lxcDomainXMLConfInit(void)
|
|||||||
{
|
{
|
||||||
return virDomainXMLOptionNew(&virLXCDriverDomainDefParserConfig,
|
return virDomainXMLOptionNew(&virLXCDriverDomainDefParserConfig,
|
||||||
&virLXCDriverPrivateDataCallbacks,
|
&virLXCDriverPrivateDataCallbacks,
|
||||||
&virLXCDriverDomainXMLNamespace);
|
&virLXCDriverDomainXMLNamespace,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1483,7 +1483,7 @@ static virDrvOpenStatus openvzConnectOpen(virConnectPtr conn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(driver->xmlopt = virDomainXMLOptionNew(&openvzDomainDefParserConfig,
|
if (!(driver->xmlopt = virDomainXMLOptionNew(&openvzDomainDefParserConfig,
|
||||||
NULL, NULL)))
|
NULL, NULL, NULL)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (openvzLoadDomains(driver) < 0)
|
if (openvzLoadDomains(driver) < 0)
|
||||||
|
@ -1202,7 +1202,7 @@ phypConnectOpen(virConnectPtr conn,
|
|||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
if (!(phyp_driver->xmlopt = virDomainXMLOptionNew(&virPhypDriverDomainDefParserConfig,
|
if (!(phyp_driver->xmlopt = virDomainXMLOptionNew(&virPhypDriverDomainDefParserConfig,
|
||||||
NULL, NULL)))
|
NULL, NULL, NULL)))
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
conn->privateData = phyp_driver;
|
conn->privateData = phyp_driver;
|
||||||
|
@ -5026,7 +5026,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
|
|||||||
goto ignore;
|
goto ignore;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)) ||
|
if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL)) ||
|
||||||
!(cmd->vm = virDomainObjNew(xmlopt)))
|
!(cmd->vm = virDomainObjNew(xmlopt)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -909,7 +909,8 @@ virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver)
|
|||||||
virQEMUDriverDomainDefParserConfig.priv = driver;
|
virQEMUDriverDomainDefParserConfig.priv = driver;
|
||||||
return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
|
return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
|
||||||
&virQEMUDriverPrivateDataCallbacks,
|
&virQEMUDriverPrivateDataCallbacks,
|
||||||
&virQEMUDriverDomainXMLNamespace);
|
&virQEMUDriverDomainXMLNamespace,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5839,6 +5839,7 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
if (!virDomainDefCheckABIStabilityFlags(migratableDefSrc,
|
if (!virDomainDefCheckABIStabilityFlags(migratableDefSrc,
|
||||||
migratableDefDst,
|
migratableDefDst,
|
||||||
|
driver->xmlopt,
|
||||||
check_flags))
|
check_flags))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -6142,7 +6142,7 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
|
|||||||
VIR_DOMAIN_XML_MIGRATABLE)))
|
VIR_DOMAIN_XML_MIGRATABLE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, newdef_migr)) {
|
if (!virDomainDefCheckABIStability(def, newdef_migr, driver->xmlopt)) {
|
||||||
virErrorPtr err = virSaveLastError();
|
virErrorPtr err = virSaveLastError();
|
||||||
|
|
||||||
/* Due to a bug in older version of external snapshot creation
|
/* Due to a bug in older version of external snapshot creation
|
||||||
@ -6151,7 +6151,7 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
|
|||||||
* saved XML type, we need to check the ABI compatibility against
|
* saved XML type, we need to check the ABI compatibility against
|
||||||
* the user provided XML if the check against the migratable XML
|
* the user provided XML if the check against the migratable XML
|
||||||
* fails. Snapshots created prior to v1.1.3 have this issue. */
|
* fails. Snapshots created prior to v1.1.3 have this issue. */
|
||||||
if (!virDomainDefCheckABIStability(def, newdef)) {
|
if (!virDomainDefCheckABIStability(def, newdef, driver->xmlopt)) {
|
||||||
virSetError(err);
|
virSetError(err);
|
||||||
virFreeError(err);
|
virFreeError(err);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -14588,6 +14588,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
|
|||||||
|
|
||||||
if (redefine) {
|
if (redefine) {
|
||||||
if (virDomainSnapshotRedefinePrep(domain, vm, &def, &snap,
|
if (virDomainSnapshotRedefinePrep(domain, vm, &def, &snap,
|
||||||
|
driver->xmlopt,
|
||||||
&update_current, flags) < 0)
|
&update_current, flags) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
} else {
|
} else {
|
||||||
|
@ -667,7 +667,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL))) {
|
if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL))) {
|
||||||
vah_error(ctl, 0, _("Failed to create XML config object"));
|
vah_error(ctl, 0, _("Failed to create XML config object"));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,7 @@ testDriverNew(void)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns)) ||
|
if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns, NULL)) ||
|
||||||
!(ret->eventState = virObjectEventStateNew()) ||
|
!(ret->eventState = virObjectEventStateNew()) ||
|
||||||
!(ret->ifaces = virInterfaceObjListNew()) ||
|
!(ret->ifaces = virInterfaceObjListNew()) ||
|
||||||
!(ret->domains = virDomainObjListNew()) ||
|
!(ret->domains = virDomainObjListNew()) ||
|
||||||
@ -6373,6 +6373,7 @@ testDomainSnapshotCreateXML(virDomainPtr domain,
|
|||||||
|
|
||||||
if (redefine) {
|
if (redefine) {
|
||||||
if (virDomainSnapshotRedefinePrep(domain, vm, &def, &snap,
|
if (virDomainSnapshotRedefinePrep(domain, vm, &def, &snap,
|
||||||
|
privconn->xmlopt,
|
||||||
&update_current, flags) < 0)
|
&update_current, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
@ -6648,7 +6649,8 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
|||||||
if (virDomainObjIsActive(vm)) {
|
if (virDomainObjIsActive(vm)) {
|
||||||
/* Transitions 5, 6, 8, 9 */
|
/* Transitions 5, 6, 8, 9 */
|
||||||
/* Check for ABI compatibility. */
|
/* Check for ABI compatibility. */
|
||||||
if (!virDomainDefCheckABIStability(vm->def, config)) {
|
if (!virDomainDefCheckABIStability(vm->def, config,
|
||||||
|
privconn->xmlopt)) {
|
||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
|
|
||||||
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
|
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
|
||||||
|
@ -533,7 +533,7 @@ umlStateInitialize(bool privileged,
|
|||||||
goto out_of_memory;
|
goto out_of_memory;
|
||||||
|
|
||||||
if (!(uml_driver->xmlopt = virDomainXMLOptionNew(¨DriverDomainDefParserConfig,
|
if (!(uml_driver->xmlopt = virDomainXMLOptionNew(¨DriverDomainDefParserConfig,
|
||||||
&privcb, NULL)))
|
&privcb, NULL, NULL)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if ((uml_driver->inotifyFD = inotify_init()) < 0) {
|
if ((uml_driver->inotifyFD = inotify_init()) < 0) {
|
||||||
|
@ -142,7 +142,7 @@ vboxDriverObjNew(void)
|
|||||||
|
|
||||||
if (!(driver->caps = vboxCapsInit()) ||
|
if (!(driver->caps = vboxCapsInit()) ||
|
||||||
!(driver->xmlopt = virDomainXMLOptionNew(&vboxDomainDefParserConfig,
|
!(driver->xmlopt = virDomainXMLOptionNew(&vboxDomainDefParserConfig,
|
||||||
NULL, NULL)))
|
NULL, NULL, NULL)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
return driver;
|
return driver;
|
||||||
|
@ -114,7 +114,7 @@ vmwareDomainXMLConfigInit(void)
|
|||||||
virDomainXMLPrivateDataCallbacks priv = { .alloc = vmwareDataAllocFunc,
|
virDomainXMLPrivateDataCallbacks priv = { .alloc = vmwareDataAllocFunc,
|
||||||
.free = vmwareDataFreeFunc };
|
.free = vmwareDataFreeFunc };
|
||||||
|
|
||||||
return virDomainXMLOptionNew(&vmwareDomainDefParserConfig, &priv, NULL);
|
return virDomainXMLOptionNew(&vmwareDomainDefParserConfig, &priv, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static virDrvOpenStatus
|
static virDrvOpenStatus
|
||||||
|
@ -591,7 +591,7 @@ virDomainXMLOptionPtr
|
|||||||
virVMXDomainXMLConfInit(void)
|
virVMXDomainXMLConfInit(void)
|
||||||
{
|
{
|
||||||
return virDomainXMLOptionNew(&virVMXDomainDefParserConfig, NULL,
|
return virDomainXMLOptionNew(&virVMXDomainDefParserConfig, NULL,
|
||||||
&virVMXDomainXMLNamespace);
|
&virVMXDomainXMLNamespace, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
@ -328,7 +328,7 @@ vzDriverObjNew(void)
|
|||||||
if (!(driver->caps = vzBuildCapabilities()) ||
|
if (!(driver->caps = vzBuildCapabilities()) ||
|
||||||
!(driver->xmlopt = virDomainXMLOptionNew(&vzDomainDefParserConfig,
|
!(driver->xmlopt = virDomainXMLOptionNew(&vzDomainDefParserConfig,
|
||||||
&vzDomainXMLPrivateDataCallbacksPtr,
|
&vzDomainXMLPrivateDataCallbacksPtr,
|
||||||
NULL)) ||
|
NULL, NULL)) ||
|
||||||
!(driver->domains = virDomainObjListNew()) ||
|
!(driver->domains = virDomainObjListNew()) ||
|
||||||
!(driver->domainEventState = virObjectEventStateNew()) ||
|
!(driver->domainEventState = virObjectEventStateNew()) ||
|
||||||
(vzInitVersion(driver) < 0) ||
|
(vzInitVersion(driver) < 0) ||
|
||||||
|
@ -401,7 +401,7 @@ virDomainXMLOptionPtr
|
|||||||
xenDomainXMLConfInit(void)
|
xenDomainXMLConfInit(void)
|
||||||
{
|
{
|
||||||
return virDomainXMLOptionNew(&xenDomainDefParserConfig,
|
return virDomainXMLOptionNew(&xenDomainDefParserConfig,
|
||||||
NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(privP->xmlopt = virDomainXMLOptionNew(&xenapiDomainDefParserConfig,
|
if (!(privP->xmlopt = virDomainXMLOptionNew(&xenapiDomainDefParserConfig,
|
||||||
NULL, NULL))) {
|
NULL, NULL, NULL))) {
|
||||||
xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR,
|
xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Failed to create XML conf object"));
|
_("Failed to create XML conf object"));
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -130,7 +130,8 @@ mymain(void)
|
|||||||
if ((driver.caps = virBhyveCapsBuild()) == NULL)
|
if ((driver.caps = virBhyveCapsBuild()) == NULL)
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)) == NULL)
|
if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL,
|
||||||
|
NULL, NULL)) == NULL)
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
# define DO_TEST_FULL(name, flags) \
|
# define DO_TEST_FULL(name, flags) \
|
||||||
|
@ -95,7 +95,7 @@ static int testCompareXMLToArgvFiles(const char *xmlfile,
|
|||||||
if (testSanitizeDef(vmdef) < 0)
|
if (testSanitizeDef(vmdef) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(vmdef, vmdef)) {
|
if (!virDomainDefCheckABIStability(vmdef, vmdef, driver.xmlopt)) {
|
||||||
VIR_TEST_DEBUG("ABI stability check failed on %s", xmlfile);
|
VIR_TEST_DEBUG("ABI stability check failed on %s", xmlfile);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ testCompareXMLToArgv(const void *data)
|
|||||||
if (virBitmapParse("0-3", &priv->autoNodeset, 4) < 0)
|
if (virBitmapParse("0-3", &priv->autoNodeset, 4) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(vm->def, vm->def)) {
|
if (!virDomainDefCheckABIStability(vm->def, vm->def, driver.xmlopt)) {
|
||||||
VIR_TEST_DEBUG("ABI stability check failed on %s", xml);
|
VIR_TEST_DEBUG("ABI stability check failed on %s", xml);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ testCompareFiles(const char *xml, const char *sexpr)
|
|||||||
tty, vncport, caps, xmlopt)))
|
tty, vncport, caps, xmlopt)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
fprintf(stderr, "ABI stability check failed on %s", xml);
|
fprintf(stderr, "ABI stability check failed on %s", xml);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -1136,7 +1136,7 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
|
|||||||
{
|
{
|
||||||
return virDomainXMLOptionNew(&virTestGenericDomainDefParserConfig,
|
return virDomainXMLOptionNew(&virTestGenericDomainDefParserConfig,
|
||||||
&virTestGenericPrivateDataCallbacks,
|
&virTestGenericPrivateDataCallbacks,
|
||||||
NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1169,7 +1169,7 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
VIR_TEST_DEBUG("ABI stability check failed on %s", infile);
|
VIR_TEST_DEBUG("ABI stability check failed on %s", infile);
|
||||||
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_STABILITY;
|
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_STABILITY;
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -81,7 +81,7 @@ testCompareFiles(const char *vmx, const char *xml)
|
|||||||
if (!(def = virVMXParseConfig(&ctx, xmlopt, caps, vmxData)))
|
if (!(def = virVMXParseConfig(&ctx, xmlopt, caps, vmxData)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
fprintf(stderr, "ABI stability check failed on %s", vmx);
|
fprintf(stderr, "ABI stability check failed on %s", vmx);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ testCompareParseXML(const char *xlcfg, const char *xml, bool replaceVars)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
fprintf(stderr, "ABI stability check failed on %s", xml);
|
fprintf(stderr, "ABI stability check failed on %s", xml);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ testCompareParseXML(const char *xmcfg, const char *xml)
|
|||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
fprintf(stderr, "ABI stability check failed on %s", xml);
|
fprintf(stderr, "ABI stability check failed on %s", xml);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ testCompareFiles(const char *xml, const char *sexpr)
|
|||||||
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
fprintf(stderr, "ABI stability check failed on %s", xml);
|
fprintf(stderr, "ABI stability check failed on %s", xml);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ testCompareFiles(const char *xml, const char *vmx, int virtualHW_version)
|
|||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
|
||||||
if (!virDomainDefCheckABIStability(def, def)) {
|
if (!virDomainDefCheckABIStability(def, def, xmlopt)) {
|
||||||
fprintf(stderr, "ABI stability check failed on %s", xml);
|
fprintf(stderr, "ABI stability check failed on %s", xml);
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user