[PATCH libvirt-java 6/9] Implement virDomainSnapshotListNames with flags option

[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 |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java
index d393960..932f56c 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -1055,21 +1055,23 @@ public class Domain {
     }
 
     /**
-     * Collect the list of domain snapshots for the given domain.
+     * Collect the list of domain snapshots for the given domain. With flags option
      *
      * @see <a
      *      href="http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotListNames";>Libvirt
      *      Documentation</a>
+     * @param flags
+     *             flags for listing snapshot names. See virDomainSnapshotListFlags for more information
      * @return The list of names, or null if an error
      * @throws LibvirtException
      */
-    public String[] snapshotListNames() throws LibvirtException {
+    public String[] snapshotListNames(int flags) throws LibvirtException {
         String[] returnValue = null;
         int num = snapshotNum();
         if (num >= 0) {
             returnValue = new String[num];
             if (num > 0) {
-                libvirt.virDomainSnapshotListNames(VDP, returnValue, num, 0);
+                libvirt.virDomainSnapshotListNames(VDP, returnValue, num, flags);
                 processError();
             }
         }
@@ -1077,6 +1079,19 @@ public class Domain {
     }
 
     /**
+     * Collect the list of domain snapshots for the given domain.
+     *
+     * @see <a
+     *      href="http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSnapshotListNames";>Libvirt
+     *      Documentation</a>
+     * @return The list of names, or null if an error
+     * @throws LibvirtException
+     */
+    public String[] snapshotListNames() throws LibvirtException {
+        return snapshotListNames(0);
+    }
+
+    /**
      * Retrieve a snapshot by name
      *
      * @see <a
-- 
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]