[PATCH libvirt-java 5/9] Implement virDomainUndefineFlags

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

 



Signed-off-by: Wido den Hollander <wido@xxxxxxxxx>
---
 src/main/java/org/libvirt/Domain.java      |   15 +++++++++++++++
 src/main/java/org/libvirt/jna/Libvirt.java |    1 +
 2 files changed, 16 insertions(+)

diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java
index e0be43d..d393960 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -1134,6 +1134,21 @@ public class Domain {
     }
 
     /**
+     * undefines this domain but does not stop if it it is running. With flags option
+     *
+     * @see <a href="http://libvirt.org/html/libvirt-libvirt.html#virDomainUndefineFlags";>Libvirt Documentation</a>
+     * @param flags
+     *            flags for undefining the domain. See virDomainUndefineFlagsValues for more information
+     * @return 0 on success, -1 on error
+     * @throws LibvirtException
+     */
+    public int undefineFlags(int flags) throws LibvirtException {
+        int returnValue = libvirt.virDomainUndefineFlags(VDP, flags);
+        processError();
+        return returnValue;
+    }
+
+    /**
      * Change a virtual device on a domain
      *
      * @see <a href="http://www.libvirt.org/html/libvirt-libvirt.html#virDomainUpdateDeviceFlags";>Libvirt Documentation</a>
diff --git a/src/main/java/org/libvirt/jna/Libvirt.java b/src/main/java/org/libvirt/jna/Libvirt.java
index dbd8f6c..2bbc8c3 100644
--- a/src/main/java/org/libvirt/jna/Libvirt.java
+++ b/src/main/java/org/libvirt/jna/Libvirt.java
@@ -228,6 +228,7 @@ public interface Libvirt extends Library {
     public int virDomainSuspend(DomainPointer virDomainPtr);
     public int virDomainUpdateDeviceFlags(DomainPointer virDomainPtr, String xml, int flags);
     public int virDomainUndefine(DomainPointer virDomainPtr);
+    public int virDomainUndefineFlags(DomainPointer virDomainPtr, int flags);
 
     // Network functions
     public ConnectionPointer virNetworkGetConnect(NetworkPointer virnetworkPtr);
-- 
1.7.9.5

--
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]