summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-09-04 23:16:24 +0800
committerOsier Yang <jyang@redhat.com>2012-09-06 21:58:36 +0800
commit075c754af0fe28dc88563125fe5635cc3410f604 (patch)
treefb1de4493203367830c77e323af421796ea0ae22 /include
parentesx: Add implementation for virConnectListAllDomains() (diff)
downloadlibvirt-075c754af0fe28dc88563125fe5635cc3410f604.tar.gz
libvirt-075c754af0fe28dc88563125fe5635cc3410f604.tar.bz2
libvirt-075c754af0fe28dc88563125fe5635cc3410f604.zip
list: Define new API virStorageListAllStoragePools
This introduces a new API to list the storage pool objects, 4 groups of flags are provided to filter the returned pools: * Active or not * Autostarting or not * Persistent or not * And the pool type. include/libvirt/libvirt.h.in: New enum virConnectListAllStoragePoolFlags; Declare the API. python/generator.py: Skip the generating src/driver.h: (virDrvConnectListAllStoragePools) src/libvirt.c: Implementation for the API. src/libvirt_public.syms: Export the symbol.
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index cfe504722..0c522716a 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -2554,6 +2554,39 @@ int virConnectListDefinedStoragePools(virConnectPtr conn,
int maxnames);
/*
+ * virConnectListAllStoragePoolsFlags:
+ *
+ * Flags used to tune pools returned by virConnectListAllStoragePools().
+ * Note that these flags come in groups; if all bits from a group are 0,
+ * then that group is not used to filter results.
+ */
+typedef enum {
+ VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE = 1 << 0,
+ VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE = 1 << 1,
+
+ VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT = 1 << 2,
+ VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT = 1 << 3,
+
+ VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART = 1 << 4,
+ VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART = 1 << 5,
+
+ /* List pools by type */
+ VIR_CONNECT_LIST_STORAGE_POOLS_DIR = 1 << 6,
+ VIR_CONNECT_LIST_STORAGE_POOLS_FS = 1 << 7,
+ VIR_CONNECT_LIST_STORAGE_POOLS_NETFS = 1 << 8,
+ VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL = 1 << 9,
+ VIR_CONNECT_LIST_STORAGE_POOLS_DISK = 1 << 10,
+ VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI = 1 << 11,
+ VIR_CONNECT_LIST_STORAGE_POOLS_SCSI = 1 << 12,
+ VIR_CONNECT_LIST_STORAGE_POOLS_MPATH = 1 << 13,
+ VIR_CONNECT_LIST_STORAGE_POOLS_RBD = 1 << 14,
+ VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG = 1 << 15,
+} virConnectListAllStoragePoolsFlags;
+
+int virConnectListAllStoragePools(virConnectPtr conn,
+ virStoragePoolPtr **pools,
+ unsigned int flags);
+/*
* Query a host for storage pools of a particular type
*/
char * virConnectFindStoragePoolSources(virConnectPtr conn,