--- This goes on top of the "[libvirt-glib 1/4] gobject: don't try to use pool's volumes before a successful refresh" series. Christophe libvirt-gobject/libvirt-gobject-storage-pool.c | 15 +++++++++++++++ libvirt-gobject/libvirt-gobject-storage-pool.h | 2 ++ libvirt-gobject/libvirt-gobject.sym | 2 ++ 3 files changed, 19 insertions(+) diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.c b/libvirt-gobject/libvirt-gobject-storage-pool.c index 96670df..8f579a1 100644 --- a/libvirt-gobject/libvirt-gobject-storage-pool.c +++ b/libvirt-gobject/libvirt-gobject-storage-pool.c @@ -223,6 +223,21 @@ const gchar *gvir_storage_pool_get_uuid(GVirStoragePool *pool) } +gboolean gvir_storage_pool_get_active(GVirStoragePool *pool) +{ + g_return_val_if_fail(GVIR_IS_STORAGE_POOL(pool), FALSE); + + return virStoragePoolIsActive(pool->priv->handle); +} + + +gboolean gvir_storage_pool_get_persistent(GVirStoragePool *pool) +{ + g_return_val_if_fail(GVIR_IS_STORAGE_POOL(pool), FALSE); + + return virStoragePoolIsPersistent(pool->priv->handle); +} + /** * gvir_storage_pool_get_config: * @pool: the storage_pool diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.h b/libvirt-gobject/libvirt-gobject-storage-pool.h index 1a1aae5..467f8f8 100644 --- a/libvirt-gobject/libvirt-gobject-storage-pool.h +++ b/libvirt-gobject/libvirt-gobject-storage-pool.h @@ -82,6 +82,8 @@ GType gvir_storage_pool_handle_get_type(void); const gchar *gvir_storage_pool_get_name(GVirStoragePool *pool); const gchar *gvir_storage_pool_get_uuid(GVirStoragePool *pool); +gboolean gvir_storage_pool_get_active(GVirStoragePool *pool); +gboolean gvir_storage_pool_get_persistent(GVirStoragePool *pool); GVirConfigStoragePool *gvir_storage_pool_get_config(GVirStoragePool *pool, guint flags, diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym index a06d35f..8b9b605 100644 --- a/libvirt-gobject/libvirt-gobject.sym +++ b/libvirt-gobject/libvirt-gobject.sym @@ -208,6 +208,8 @@ LIBVIRT_GOBJECT_0.1.4 { gvir_storage_pool_delete; gvir_storage_pool_delete_async; gvir_storage_pool_delete_finish; + gvir_storage_pool_get_active; + gvir_storage_pool_get_persistent; gvir_storage_pool_stop; gvir_storage_pool_stop_async; gvir_storage_pool_stop_finish; -- 1.8.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list