[libvirt] [PATCH libvirt-java 6/9] Implement virDomainSnapshotListNames with flags option
Wido den Hollander
wido at widodh.nl
Sat Jan 5 11:48:23 UTC 2013
Signed-off-by: Wido den Hollander <wido at widodh.nl>
---
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
More information about the libvir-list
mailing list