提交 76c4de66 编写于 作者: I Ilias Stamatis 提交者: Erik Skultety

test_driver: implement virDomainReset

The qemu and vz implementations don't emit any signals when this API is
called, so we can do the same here for now and succeed by doing nothing.
Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 d1830fba
...@@ -2004,6 +2004,28 @@ static int testDomainReboot(virDomainPtr domain, ...@@ -2004,6 +2004,28 @@ static int testDomainReboot(virDomainPtr domain,
} }
static int
testDomainReset(virDomainPtr dom,
unsigned int flags)
{
virDomainObjPtr vm;
int ret = -1;
virCheckFlags(0, -1);
if (!(vm = testDomObjFromDomain(dom)))
return -1;
if (virDomainObjCheckActive(vm) < 0)
goto cleanup;
ret = 0;
cleanup:
virDomainObjEndAPI(&vm);
return ret;
}
static char * static char *
testDomainGetHostname(virDomainPtr domain, testDomainGetHostname(virDomainPtr domain,
unsigned int flags) unsigned int flags)
...@@ -8878,6 +8900,7 @@ static virHypervisorDriver testHypervisorDriver = { ...@@ -8878,6 +8900,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainShutdown = testDomainShutdown, /* 0.1.1 */ .domainShutdown = testDomainShutdown, /* 0.1.1 */
.domainShutdownFlags = testDomainShutdownFlags, /* 0.9.10 */ .domainShutdownFlags = testDomainShutdownFlags, /* 0.9.10 */
.domainReboot = testDomainReboot, /* 0.1.1 */ .domainReboot = testDomainReboot, /* 0.1.1 */
.domainReset = testDomainReset, /* 5.7.0 */
.domainDestroy = testDomainDestroy, /* 0.1.1 */ .domainDestroy = testDomainDestroy, /* 0.1.1 */
.domainDestroyFlags = testDomainDestroyFlags, /* 4.2.0 */ .domainDestroyFlags = testDomainDestroyFlags, /* 4.2.0 */
.domainGetOSType = testDomainGetOSType, /* 0.1.9 */ .domainGetOSType = testDomainGetOSType, /* 0.1.9 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册