mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
vz: fixes: snapshot: Factor out virDomainMomentDef class
Fix for commit ffc0fbebe refactoring snapshot code. Reviewed-by: Cole Robinson <crobinso@redhat.com> ACKed-by: Maxim Nestratov <mnestratov@virtuozzo.com> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
17b9149b33
commit
e149443b8b
@ -2619,7 +2619,7 @@ vzDomainSnapshotCreateXML(virDomainPtr domain,
|
||||
goto cleanup;
|
||||
|
||||
/* snaphot name is ignored, it will be set to auto generated by sdk uuid */
|
||||
if (prlsdkCreateSnapshot(dom, def->description) < 0)
|
||||
if (prlsdkCreateSnapshot(dom, def->common.description) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(snapshots = prlsdkLoadSnapshots(dom)))
|
||||
|
@ -4696,14 +4696,14 @@ prlsdkParseSnapshotTree(const char *treexml)
|
||||
|
||||
ctxt->node = nodes[i];
|
||||
|
||||
def->name = virXPathString("string(./@guid)", ctxt);
|
||||
if (!def->name) {
|
||||
def->common.name = virXPathString("string(./@guid)", ctxt);
|
||||
if (!def->common.name) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("missing 'guid' attribute"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
def->parent = virXPathString("string(../@guid)", ctxt);
|
||||
def->common.parent = virXPathString("string(../@guid)", ctxt);
|
||||
|
||||
xmlstr = virXPathString("string(./DateTime)", ctxt);
|
||||
if (!xmlstr) {
|
||||
@ -4711,11 +4711,11 @@ prlsdkParseSnapshotTree(const char *treexml)
|
||||
_("missing 'DateTime' element"));
|
||||
goto cleanup;
|
||||
}
|
||||
if ((def->creationTime = prlsdkParseDateTime(xmlstr)) < 0)
|
||||
if ((def->common.creationTime = prlsdkParseDateTime(xmlstr)) < 0)
|
||||
goto cleanup;
|
||||
VIR_FREE(xmlstr);
|
||||
|
||||
def->description = virXPathString("string(./Description)", ctxt);
|
||||
def->common.description = virXPathString("string(./Description)", ctxt);
|
||||
|
||||
def->memory = VIR_DOMAIN_SNAPSHOT_LOCATION_NONE;
|
||||
xmlstr = virXPathString("string(./@state)", ctxt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user