mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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: Ilias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
d1830fba7f
commit
76c4de66ad
@ -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 *
|
||||
testDomainGetHostname(virDomainPtr domain,
|
||||
unsigned int flags)
|
||||
@ -8878,6 +8900,7 @@ static virHypervisorDriver testHypervisorDriver = {
|
||||
.domainShutdown = testDomainShutdown, /* 0.1.1 */
|
||||
.domainShutdownFlags = testDomainShutdownFlags, /* 0.9.10 */
|
||||
.domainReboot = testDomainReboot, /* 0.1.1 */
|
||||
.domainReset = testDomainReset, /* 5.7.0 */
|
||||
.domainDestroy = testDomainDestroy, /* 0.1.1 */
|
||||
.domainDestroyFlags = testDomainDestroyFlags, /* 4.2.0 */
|
||||
.domainGetOSType = testDomainGetOSType, /* 0.1.9 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user