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

[libvirt] [libvirt-java] [PATCH 55/65] Implement Domain.reset



This wraps the virDomainReset libvirt function available since
version 0.9.7.

Signed-off-by: Claudio Bley <cbley av-test de>
---
 src/main/java/org/libvirt/Domain.java      |    7 +++++++
 src/main/java/org/libvirt/jna/Libvirt.java |    1 +
 2 files changed, 8 insertions(+)

diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java
index fae95fe..89bc659 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -1223,6 +1223,13 @@ public class Domain {
     }
 
     /**
+     * Reset a domain immediately without any guest OS shutdown.
+     */
+    public void reset() throws LibvirtException {
+        processError(libvirt.virDomainReset(this.VDP, 0));
+    }
+
+    /**
      * Revert the domain to a given snapshot.
      *
      * @see <a href=
diff --git a/src/main/java/org/libvirt/jna/Libvirt.java b/src/main/java/org/libvirt/jna/Libvirt.java
index 2c75018..7183d5b 100644
--- a/src/main/java/org/libvirt/jna/Libvirt.java
+++ b/src/main/java/org/libvirt/jna/Libvirt.java
@@ -297,6 +297,7 @@ public interface Libvirt extends Library {
     int virDomainPinVcpu(DomainPointer virDomainPtr, int vcpu, byte[] cpumap, int maplen);
     int virDomainReboot(DomainPointer virDomainPtr, int flags);
     int virDomainRef(DomainPointer virDomainPtr);
+    int virDomainReset(DomainPointer virDomainPtr, int flags);
     int virDomainRestore(ConnectionPointer virConnectPtr, String from);
     int virDomainRevertToSnapshot(DomainSnapshotPointer virDomainSnapshotPtr, int flags);
     int virDomainResume(DomainPointer virDomainPtr);
-- 
1.7.9.5


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