GVirConfigStorageVolBackingStore and GVirConfigStorageVolTarget can be associated with a GVirConfigStorageVol. GVirConfigStoragePoolSource and GVirConfigStoragePoolTarget can be associated with a GVirConfigStoragePool. GVirConfigStoragePermissions can be set on either a GVirConfigStorageVolTarget or a GVirConfigStoragePoolTarget. --- .../libvirt-gconfig-storage-pool-target.c | 10 ++++++++++ .../libvirt-gconfig-storage-pool-target.h | 2 ++ libvirt-gconfig/libvirt-gconfig-storage-pool.c | 20 ++++++++++++++++++++ libvirt-gconfig/libvirt-gconfig-storage-pool.h | 7 +++++++ .../libvirt-gconfig-storage-vol-target.c | 10 ++++++++++ .../libvirt-gconfig-storage-vol-target.h | 2 ++ libvirt-gconfig/libvirt-gconfig-storage-vol.c | 20 ++++++++++++++++++++ libvirt-gconfig/libvirt-gconfig-storage-vol.h | 7 +++++++ libvirt-gconfig/libvirt-gconfig.sym | 6 ++++++ 9 files changed, 84 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c index 314ca2d..a5af381 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c +++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.c @@ -79,3 +79,13 @@ void gvir_config_storage_pool_target_set_path(GVirConfigStoragePoolTarget *targe gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(target), "path", path); } + +void gvir_config_storage_pool_target_set_permissions(GVirConfigStoragePoolTarget *target, + GVirConfigStoragePermissions *perms) +{ + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_POOL_TARGET(target)); + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_PERMISSIONS(perms)); + + gvir_config_object_attach(GVIR_CONFIG_OBJECT(target), + GVIR_CONFIG_OBJECT(perms)); +} diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h index b81473a..eeb00f5 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h +++ b/libvirt-gconfig/libvirt-gconfig-storage-pool-target.h @@ -65,6 +65,8 @@ GVirConfigStoragePoolTarget *gvir_config_storage_pool_target_new_from_xml(const void gvir_config_storage_pool_target_set_path(GVirConfigStoragePoolTarget *target, const char *path); +void gvir_config_storage_pool_target_set_permissions(GVirConfigStoragePoolTarget *target, + GVirConfigStoragePermissions *perms); G_END_DECLS diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool.c b/libvirt-gconfig/libvirt-gconfig-storage-pool.c index 6c64087..97bcbb4 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-pool.c +++ b/libvirt-gconfig/libvirt-gconfig-storage-pool.c @@ -118,3 +118,23 @@ void gvir_config_storage_pool_set_available(GVirConfigStoragePool *pool, gvir_config_object_set_node_content_uint64(GVIR_CONFIG_OBJECT(pool), "available", available); } + +void gvir_config_storage_pool_set_source(GVirConfigStoragePool *pool, + GVirConfigStoragePoolSource *source) +{ + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_POOL(pool)); + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_POOL_SOURCE(source)); + + gvir_config_object_attach(GVIR_CONFIG_OBJECT(pool), + GVIR_CONFIG_OBJECT(source)); +} + +void gvir_config_storage_pool_set_target(GVirConfigStoragePool *pool, + GVirConfigStoragePoolTarget *target) +{ + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_POOL(pool)); + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_POOL_TARGET(target)); + + gvir_config_object_attach(GVIR_CONFIG_OBJECT(pool), + GVIR_CONFIG_OBJECT(target)); +} diff --git a/libvirt-gconfig/libvirt-gconfig-storage-pool.h b/libvirt-gconfig/libvirt-gconfig-storage-pool.h index 8ffdf77..3f2a5bd 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-pool.h +++ b/libvirt-gconfig/libvirt-gconfig-storage-pool.h @@ -27,6 +27,9 @@ #ifndef __LIBVIRT_GCONFIG_STORAGE_POOL_H__ #define __LIBVIRT_GCONFIG_STORAGE_POOL_H__ +#include <libvirt-gconfig/libvirt-gconfig-storage-pool-source.h> +#include <libvirt-gconfig/libvirt-gconfig-storage-pool-target.h> + G_BEGIN_DECLS #define GVIR_TYPE_CONFIG_STORAGE_POOL (gvir_config_storage_pool_get_type ()) @@ -71,6 +74,10 @@ void gvir_config_storage_pool_set_capacity(GVirConfigStoragePool *pool, guint64 capacity); void gvir_config_storage_pool_set_name(GVirConfigStoragePool *pool, const char *name); +void gvir_config_storage_pool_set_source(GVirConfigStoragePool *pool, + GVirConfigStoragePoolSource *source); +void gvir_config_storage_pool_set_target(GVirConfigStoragePool *pool, + GVirConfigStoragePoolTarget *target); void gvir_config_storage_pool_set_uuid(GVirConfigStoragePool *pool, const char *uuid); diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c index 55022de..6a3bb0c 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c +++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.c @@ -83,3 +83,13 @@ void gvir_config_storage_vol_target_set_format(GVirConfigStorageVolTarget *targe gvir_config_object_set_attribute(node, "type", format, NULL); g_object_unref(G_OBJECT(node)); } + +void gvir_config_storage_vol_target_set_permissions(GVirConfigStorageVolTarget *target, + GVirConfigStoragePermissions *perms) +{ + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL_TARGET(target)); + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_PERMISSIONS(perms)); + + gvir_config_object_attach(GVIR_CONFIG_OBJECT(target), + GVIR_CONFIG_OBJECT(perms)); +} diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h index dc3a709..266c34e 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h +++ b/libvirt-gconfig/libvirt-gconfig-storage-vol-target.h @@ -65,6 +65,8 @@ GVirConfigStorageVolTarget *gvir_config_storage_vol_target_new_from_xml(const gc void gvir_config_storage_vol_target_set_format(GVirConfigStorageVolTarget *target, const char *format); +void gvir_config_storage_vol_target_set_permissions(GVirConfigStorageVolTarget *target, + GVirConfigStoragePermissions *perms); G_END_DECLS diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol.c b/libvirt-gconfig/libvirt-gconfig-storage-vol.c index 11e21cc..079a5fd 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-vol.c +++ b/libvirt-gconfig/libvirt-gconfig-storage-vol.c @@ -100,3 +100,23 @@ void gvir_config_storage_vol_set_allocation(GVirConfigStorageVol *vol, gvir_config_object_set_node_content_uint64(GVIR_CONFIG_OBJECT(vol), "allocation", allocation); } + +void gvir_config_storage_vol_set_target(GVirConfigStorageVol *vol, + GVirConfigStorageVolTarget *target) +{ + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL(vol)); + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL_TARGET(target)); + + gvir_config_object_attach(GVIR_CONFIG_OBJECT(vol), + GVIR_CONFIG_OBJECT(target)); +} + +void gvir_config_storage_vol_set_backing_store(GVirConfigStorageVol *vol, + GVirConfigStorageVolBackingStore *backing_store) +{ + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL(vol)); + g_return_if_fail(GVIR_IS_CONFIG_STORAGE_VOL_BACKING_STORE(backing_store)); + + gvir_config_object_attach(GVIR_CONFIG_OBJECT(vol), + GVIR_CONFIG_OBJECT(backing_store)); +} diff --git a/libvirt-gconfig/libvirt-gconfig-storage-vol.h b/libvirt-gconfig/libvirt-gconfig-storage-vol.h index b051671..d1c10f9 100644 --- a/libvirt-gconfig/libvirt-gconfig-storage-vol.h +++ b/libvirt-gconfig/libvirt-gconfig-storage-vol.h @@ -27,6 +27,9 @@ #ifndef __LIBVIRT_GCONFIG_STORAGE_VOL_H__ #define __LIBVIRT_GCONFIG_STORAGE_VOL_H__ +#include <libvirt-gconfig/libvirt-gconfig-storage-vol-backing-store.h> +#include <libvirt-gconfig/libvirt-gconfig-storage-vol-target.h> + G_BEGIN_DECLS #define GVIR_TYPE_CONFIG_STORAGE_VOL (gvir_config_storage_vol_get_type ()) @@ -65,10 +68,14 @@ GVirConfigStorageVol *gvir_config_storage_vol_new_from_xml(const gchar *xml, void gvir_config_storage_vol_set_allocation(GVirConfigStorageVol *vol, guint64 allocation); +void gvir_config_storage_vol_set_backing_store(GVirConfigStorageVol *vol, + GVirConfigStorageVolBackingStore *backing_store); void gvir_config_storage_vol_set_capacity(GVirConfigStorageVol *vol, guint64 capacity); void gvir_config_storage_vol_set_name(GVirConfigStorageVol *vol, const char *name); +void gvir_config_storage_vol_set_target(GVirConfigStorageVol *vol, + GVirConfigStorageVolTarget *target); G_END_DECLS diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index ee7ce16..48e2fd7 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -212,6 +212,8 @@ LIBVIRT_GCONFIG_0.0.1 { gvir_config_storage_pool_set_available; gvir_config_storage_pool_set_capacity; gvir_config_storage_pool_set_name; + gvir_config_storage_pool_set_source; + gvir_config_storage_pool_set_target; gvir_config_storage_pool_set_uuid; gvir_config_storage_pool_source_get_type; @@ -230,13 +232,16 @@ LIBVIRT_GCONFIG_0.0.1 { gvir_config_storage_pool_target_new; gvir_config_storage_pool_target_new_from_xml; gvir_config_storage_pool_target_set_path; + gvir_config_storage_pool_target_set_permissions; gvir_config_storage_vol_get_type; gvir_config_storage_vol_new; gvir_config_storage_vol_new_from_xml; gvir_config_storage_vol_set_allocation; + gvir_config_storage_vol_set_backing_store; gvir_config_storage_vol_set_capacity; gvir_config_storage_vol_set_name; + gvir_config_storage_vol_set_target; gvir_config_storage_vol_backing_store_get_type; gvir_config_storage_vol_backing_store_new; @@ -248,6 +253,7 @@ LIBVIRT_GCONFIG_0.0.1 { gvir_config_storage_vol_target_new; gvir_config_storage_vol_target_new_from_xml; gvir_config_storage_vol_target_set_format; + gvir_config_storage_vol_target_set_permissions; local: *; -- 1.7.7.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list