Signed-off-by: Wido den Hollander <wido(a)widodh.nl>
---
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#virDomainUndefine...
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#virDomainUpda...
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