[PATCH] test_driver: implement virDomainReset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 src/test/test_driver.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index d9a7f815d5..6bca4e277f 100755
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -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 */
--
2.22.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux