提交 e149443b 编写于 作者: N Nikolay Shirokovskiy

vz: fixes: snapshot: Factor out virDomainMomentDef class

Fix for commit ffc0fbeb refactoring snapshot code.
Reviewed-by: NCole Robinson <crobinso@redhat.com>
ACKed-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
上级 17b9149b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册