提交 49df9205 编写于 作者: I Ilias Stamatis 提交者: Erik Skultety

test_driver: implement virDomainSaveImageGetXMLDesc

Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 4d39a991
......@@ -2291,6 +2291,30 @@ testDomainSaveImageDefineXML(virConnectPtr conn,
}
static char *
testDomainSaveImageGetXMLDesc(virConnectPtr conn,
const char *path,
unsigned int flags)
{
int fd = -1;
char *ret = NULL;
virDomainDefPtr def = NULL;
testDriverPtr privconn = conn->privateData;
virCheckFlags(VIR_DOMAIN_SAVE_IMAGE_XML_SECURE, NULL);
if ((fd = testDomainSaveImageOpen(privconn, path, &def)) < 0)
goto cleanup;
ret = virDomainDefFormat(def, privconn->caps, VIR_DOMAIN_DEF_FORMAT_SECURE);
cleanup:
virDomainDefFree(def);
VIR_FORCE_CLOSE(fd);
return ret;
}
static int testDomainCoreDumpWithFormat(virDomainPtr domain,
const char *to,
unsigned int dumpformat,
......@@ -7114,6 +7138,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainRestore = testDomainRestore, /* 0.3.2 */
.domainRestoreFlags = testDomainRestoreFlags, /* 0.9.4 */
.domainSaveImageDefineXML = testDomainSaveImageDefineXML, /* 5.5.0 */
.domainSaveImageGetXMLDesc = testDomainSaveImageGetXMLDesc, /* 5.5.0 */
.domainCoreDump = testDomainCoreDump, /* 0.3.2 */
.domainCoreDumpWithFormat = testDomainCoreDumpWithFormat, /* 1.2.3 */
.domainSetVcpus = testDomainSetVcpus, /* 0.1.4 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册