Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
daemon/libvirtd.c | 10 +
daemon/remote.c | 35 +++
src/driver.h | 1 +
src/remote/remote_driver.c | 72 +++++-
src/remote/remote_protocol.x | 522 ++++++++++++++++++++++++++++++++++++++++++-
src/rpc/gendispatch.pl | 19 +-
6 files changed, 650 insertions(+), 9 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 95c1b1c..b6d4d80 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -92,6 +92,9 @@
# ifdef WITH_STORAGE
# include "storage/storage_driver.h"
# endif
+# ifdef WITH_FS
+# include "fs/fs_driver.h"
+# endif
# ifdef WITH_NODE_DEVICES
# include "node_device/node_device_driver.h"
# endif
@@ -374,6 +377,9 @@ static void daemonInitialize(void)
# ifdef WITH_NWFILTER
virDriverLoadModule("nwfilter");
# endif
+# ifdef WITH_FS
+ virDriverLoadModule("fs");
+# endif
# ifdef WITH_XEN
virDriverLoadModule("xen");
# endif
@@ -398,6 +404,7 @@ static void daemonInitialize(void)
# ifdef WITH_VZ
virDriverLoadModule("vz");
# endif
+
#else
# ifdef WITH_NETWORK
networkRegister();
@@ -408,6 +415,9 @@ static void daemonInitialize(void)
# ifdef WITH_STORAGE
storageRegister();
# endif
+# ifdef WITH_FS
+ fsRegister();
+# endif
# ifdef WITH_NODE_DEVICES
nodedevRegister();
# endif
diff --git a/daemon/remote.c b/daemon/remote.c
index 9e75472..bf60246 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -88,6 +88,8 @@ static virNetworkPtr get_nonnull_network(virConnectPtr conn,
remote_nonnull_netw
static virInterfacePtr get_nonnull_interface(virConnectPtr conn, remote_nonnull_interface
iface);
static virStoragePoolPtr get_nonnull_storage_pool(virConnectPtr conn,
remote_nonnull_storage_pool pool);
static virStorageVolPtr get_nonnull_storage_vol(virConnectPtr conn,
remote_nonnull_storage_vol vol);
+static virFsPoolPtr get_nonnull_fs_pool(virConnectPtr conn, remote_nonnull_fs_pool
fspool);
+static virFsItemPtr get_nonnull_fs_item(virConnectPtr conn, remote_nonnull_fs_item
item);
static virSecretPtr get_nonnull_secret(virConnectPtr conn, remote_nonnull_secret
secret);
static virNWFilterPtr get_nonnull_nwfilter(virConnectPtr conn, remote_nonnull_nwfilter
nwfilter);
static virDomainSnapshotPtr get_nonnull_domain_snapshot(virDomainPtr dom,
remote_nonnull_domain_snapshot snapshot);
@@ -97,6 +99,8 @@ static void make_nonnull_network(remote_nonnull_network *net_dst,
virNetworkPtr
static void make_nonnull_interface(remote_nonnull_interface *interface_dst,
virInterfacePtr interface_src);
static void make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst,
virStoragePoolPtr pool_src);
static void make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst,
virStorageVolPtr vol_src);
+static void make_nonnull_fs_pool(remote_nonnull_fs_pool *fspool_dst, virFsPoolPtr
fspool_src);
+static void make_nonnull_fs_item(remote_nonnull_fs_item *item_dst, virFsItemPtr
item_src);
static void make_nonnull_node_device(remote_nonnull_node_device *dev_dst,
virNodeDevicePtr dev_src);
static void make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr
secret_src);
static void make_nonnull_nwfilter(remote_nonnull_nwfilter *net_dst, virNWFilterPtr
nwfilter_src);
@@ -6631,6 +6635,22 @@ get_nonnull_domain_snapshot(virDomainPtr dom,
remote_nonnull_domain_snapshot sna
return virGetDomainSnapshot(dom, snapshot.name);
}
+static virFsPoolPtr
+get_nonnull_fs_pool(virConnectPtr conn, remote_nonnull_fs_pool fspool)
+{
+ return virGetFsPool(conn, fspool.name, BAD_CAST fspool.uuid,
+ NULL, NULL);
+}
+
+static virFsItemPtr
+get_nonnull_fs_item(virConnectPtr conn, remote_nonnull_fs_item item)
+{
+ virFsItemPtr ret;
+ ret = virGetFsItem(conn, item.fspool, item.name, item.key,
+ NULL, NULL);
+ return ret;
+}
+
static virNodeDevicePtr
get_nonnull_node_device(virConnectPtr conn, remote_nonnull_node_device dev)
{
@@ -6677,6 +6697,21 @@ make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst,
virStorageVolPtr v
}
static void
+make_nonnull_fs_pool(remote_nonnull_fs_pool *fspool_dst, virFsPoolPtr fspool_src)
+{
+ ignore_value(VIR_STRDUP_QUIET(fspool_dst->name, fspool_src->name));
+ memcpy(fspool_dst->uuid, fspool_src->uuid, VIR_UUID_BUFLEN);
+}
+
+static void
+make_nonnull_fs_item(remote_nonnull_fs_item *item_dst, virFsItemPtr item_src)
+{
+ ignore_value(VIR_STRDUP_QUIET(item_dst->fspool, item_src->fspool));
+ ignore_value(VIR_STRDUP_QUIET(item_dst->name, item_src->name));
+ ignore_value(VIR_STRDUP_QUIET(item_dst->key, item_src->key));
+}
+
+static void
make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src)
{
ignore_value(VIR_STRDUP_QUIET(dev_dst->name, dev_src->name));
diff --git a/src/driver.h b/src/driver.h
index fb93083..57ad1f7 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -87,6 +87,7 @@ struct _virConnectDriver {
virNWFilterDriverPtr nwfilterDriver;
virSecretDriverPtr secretDriver;
virStorageDriverPtr storageDriver;
+ virFsDriverPtr fsDriver;
};
int virRegisterConnectDriver(virConnectDriverPtr driver,
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 6637a1d..2aa765c 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -144,6 +144,8 @@ static virNWFilterPtr get_nonnull_nwfilter(virConnectPtr conn,
remote_nonnull_nw
static virInterfacePtr get_nonnull_interface(virConnectPtr conn, remote_nonnull_interface
iface);
static virStoragePoolPtr get_nonnull_storage_pool(virConnectPtr conn,
remote_nonnull_storage_pool pool);
static virStorageVolPtr get_nonnull_storage_vol(virConnectPtr conn,
remote_nonnull_storage_vol vol);
+static virFsPoolPtr get_nonnull_fs_pool(virConnectPtr conn, remote_nonnull_fs_pool
fspool);
+static virFsItemPtr get_nonnull_fs_item(virConnectPtr conn, remote_nonnull_fs_item
item);
static virNodeDevicePtr get_nonnull_node_device(virConnectPtr conn,
remote_nonnull_node_device dev);
static virSecretPtr get_nonnull_secret(virConnectPtr conn, remote_nonnull_secret
secret);
static virDomainSnapshotPtr get_nonnull_domain_snapshot(virDomainPtr domain,
remote_nonnull_domain_snapshot snapshot);
@@ -152,6 +154,8 @@ static void make_nonnull_network(remote_nonnull_network *net_dst,
virNetworkPtr
static void make_nonnull_interface(remote_nonnull_interface *interface_dst,
virInterfacePtr interface_src);
static void make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst,
virStoragePoolPtr vol_src);
static void make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst,
virStorageVolPtr vol_src);
+static void make_nonnull_fs_pool(remote_nonnull_fs_pool *fspool_dst, virFsPoolPtr
fspool_src);
+static void make_nonnull_fs_item(remote_nonnull_fs_item *item_dst, virFsItemPtr
item_src);
static void
make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src);
static void make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr
secret_src);
@@ -7501,7 +7505,7 @@ remoteDomainGetFSInfo(virDomainPtr dom,
if (ret.info.info_len > REMOTE_DOMAIN_FSINFO_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Too many mountpoints in fsinfo: %d for limit %d"),
+ _("Too many mountpoints in = remoteFsinfo: %d for limit
%d"),
ret.info.info_len, REMOTE_DOMAIN_FSINFO_MAX);
goto cleanup;
}
@@ -7811,6 +7815,19 @@ get_nonnull_storage_vol(virConnectPtr conn,
remote_nonnull_storage_vol vol)
NULL, NULL);
}
+static virFsPoolPtr
+get_nonnull_fs_pool(virConnectPtr conn, remote_nonnull_fs_pool fspool)
+{
+ return virGetFsPool(conn, fspool.name, BAD_CAST fspool.uuid,
+ NULL, NULL);
+}
+
+static virFsItemPtr
+get_nonnull_fs_item(virConnectPtr conn, remote_nonnull_fs_item item)
+{
+ return virGetFsItem(conn, item.fspool, item.name, item.key,
+ NULL, NULL);
+}
static virNodeDevicePtr
get_nonnull_node_device(virConnectPtr conn, remote_nonnull_node_device dev)
{
@@ -7876,6 +7893,21 @@ make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst,
virStorageVolPtr v
}
static void
+make_nonnull_fs_pool(remote_nonnull_fs_pool *fspool_dst, virFsPoolPtr fspool_src)
+{
+ fspool_dst->name = fspool_src->name;
+ memcpy(fspool_dst->uuid, fspool_src->uuid, VIR_UUID_BUFLEN);
+}
+
+static void
+make_nonnull_fs_item(remote_nonnull_fs_item *item_dst, virFsItemPtr item_src)
+{
+ item_dst->fspool = item_src->fspool;
+ item_dst->name = item_src->name;
+ item_dst->key = item_src->key;
+}
+
+static void
make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src)
{
memcpy(secret_dst->uuid, secret_src->uuid, VIR_UUID_BUFLEN);
@@ -8266,6 +8298,43 @@ static virNWFilterDriver nwfilter_driver = {
.connectListAllNWFilters = remoteConnectListAllNWFilters, /* 0.10.2 */
};
+static virFsDriver fs_driver = {
+ .connectNumOfFsPools = remoteConnectNumOfFsPools,
+ .connectListFsPools = remoteConnectListFsPools,
+ .connectNumOfDefinedFsPools = remoteConnectNumOfDefinedFsPools,
+ .connectListDefinedFsPools = remoteConnectListDefinedFsPools,
+ .connectListAllFsPools = remoteConnectListAllFsPools,
+ .fsPoolLookupByName = remoteFsPoolLookupByName,
+ .fsPoolLookupByUUID = remoteFsPoolLookupByUUID,
+ .fsPoolLookupByItem = remoteFsPoolLookupByItem,
+ .fsPoolCreateXML = remoteFsPoolCreateXML,
+ .fsPoolDefineXML = remoteFsPoolDefineXML,
+ .fsPoolBuild = remoteFsPoolBuild,
+ .fsPoolUndefine = remoteFsPoolUndefine,
+ .fsPoolCreate = remoteFsPoolCreate,
+ .fsPoolDestroy = remoteFsPoolDestroy,
+ .fsPoolDelete = remoteFsPoolDelete,
+ .fsPoolRefresh = remoteFsPoolRefresh,
+ .fsPoolGetInfo = remoteFsPoolGetInfo,
+ .fsPoolGetXMLDesc = remoteFsPoolGetXMLDesc,
+ .fsPoolGetAutostart = remoteFsPoolGetAutostart,
+ .fsPoolSetAutostart = remoteFsPoolSetAutostart,
+ .fsPoolNumOfItems = remoteFsPoolNumOfItems,
+ .fsPoolListItems = remoteFsPoolListItems,
+ .fsPoolListAllItems = remoteFsPoolListAllItems,
+ .fsItemLookupByName = remoteFsItemLookupByName,
+ .fsItemLookupByKey = remoteFsItemLookupByKey,
+ .fsItemLookupByPath = remoteFsItemLookupByPath,
+ .fsItemCreateXML = remoteFsItemCreateXML,
+ .fsItemCreateXMLFrom = remoteFsItemCreateXMLFrom,
+ .fsItemDelete = remoteFsItemDelete,
+ .fsItemGetInfo = remoteFsItemGetInfo,
+ .fsItemGetXMLDesc = remoteFsItemGetXMLDesc,
+ .fsItemGetPath = remoteFsItemGetPath,
+ .fsPoolIsActive = remoteFsPoolIsActive,
+ .fsPoolIsPersistent = remoteFsPoolIsPersistent,
+};
+
static virConnectDriver connect_driver = {
.hypervisorDriver = &hypervisor_driver,
.interfaceDriver = &interface_driver,
@@ -8274,6 +8343,7 @@ static virConnectDriver connect_driver = {
.nwfilterDriver = &nwfilter_driver,
.secretDriver = &secret_driver,
.storageDriver = &storage_driver,
+ .fsDriver = &fs_driver,
};
static virStateDriver state_driver = {
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index b4fd057..ec4a94e 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -85,6 +85,12 @@ const REMOTE_STORAGE_POOL_LIST_MAX = 4096;
/* Upper limit on lists of storage vols. */
const REMOTE_STORAGE_VOL_LIST_MAX = 16384;
+/* Upper limit on lists of fspools. */
+const REMOTE_FS_POOL_LIST_MAX = 4096;
+
+/* Upper limit on lists of fsitems. */
+const REMOTE_FS_ITEM_LIST_MAX = 16384;
+
/* Upper limit on lists of node devices. */
const REMOTE_NODE_DEVICE_LIST_MAX = 16384;
@@ -294,6 +300,19 @@ struct remote_nonnull_storage_vol {
remote_nonnull_string key;
};
+/* A fspool which may not be NULL. */
+struct remote_nonnull_fs_pool {
+ remote_nonnull_string name;
+ remote_uuid uuid;
+};
+
+/* A fsitem which may not be NULL. */
+struct remote_nonnull_fs_item {
+ remote_nonnull_string fspool;
+ remote_nonnull_string name;
+ remote_nonnull_string key;
+};
+
/* A node device which may not be NULL. */
struct remote_nonnull_node_device {
remote_nonnull_string name;
@@ -318,6 +337,8 @@ typedef remote_nonnull_network *remote_network;
typedef remote_nonnull_nwfilter *remote_nwfilter;
typedef remote_nonnull_storage_pool *remote_storage_pool;
typedef remote_nonnull_storage_vol *remote_storage_vol;
+typedef remote_nonnull_fs_pool *remote_fs_pool;
+typedef remote_nonnull_fs_item *remote_fs_item;
typedef remote_nonnull_node_device *remote_node_device;
/* Error message. See <virterror.h> for explanation of fields. */
@@ -1955,6 +1976,230 @@ struct remote_storage_vol_resize_args {
unsigned int flags;
};
+/* Fs pool calls: */
+
+struct remote_connect_num_of_fs_pools_ret {
+ int num;
+};
+
+struct remote_connect_list_fs_pools_args {
+ int maxnames;
+};
+
+struct remote_connect_list_fs_pools_ret {
+ remote_nonnull_string names<REMOTE_FS_POOL_LIST_MAX>; /* insert@1 */
+};
+
+struct remote_connect_num_of_defined_fs_pools_ret {
+ int num;
+};
+
+struct remote_connect_list_defined_fs_pools_args {
+ int maxnames;
+};
+
+struct remote_connect_list_defined_fs_pools_ret {
+ remote_nonnull_string names<REMOTE_FS_POOL_LIST_MAX>; /* insert@1 */
+};
+
+struct remote_fs_pool_lookup_by_uuid_args {
+ remote_uuid uuid;
+};
+
+struct remote_fs_pool_lookup_by_uuid_ret {
+ remote_nonnull_fs_pool pool;
+};
+
+struct remote_fs_pool_lookup_by_name_args {
+ remote_nonnull_string name;
+};
+
+struct remote_fs_pool_lookup_by_name_ret {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_lookup_by_item_args {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_pool_lookup_by_item_ret {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_create_xml_args {
+ remote_nonnull_string xml;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_create_xml_ret {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_define_xml_args {
+ remote_nonnull_string xml;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_define_xml_ret {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_build_args {
+ remote_nonnull_fs_pool fspool;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_undefine_args {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_create_args {
+ remote_nonnull_fs_pool fspool;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_destroy_args {
+ remote_nonnull_fs_pool fspool;
+};
+struct remote_fs_pool_delete_args {
+ remote_nonnull_fs_pool fspool;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_get_xml_desc_args {
+ remote_nonnull_fs_pool fspool;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_get_xml_desc_ret {
+ remote_nonnull_string xml;
+};
+
+struct remote_fs_pool_get_info_args {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_get_info_ret { /* insert@1 */
+ unsigned char state;
+ unsigned hyper capacity;
+ unsigned hyper allocation;
+ unsigned hyper available;
+};
+
+struct remote_fs_pool_get_autostart_args {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_get_autostart_ret {
+ int autostart;
+};
+
+struct remote_fs_pool_set_autostart_args {
+ remote_nonnull_fs_pool fspool;
+ int autostart;
+};
+
+struct remote_fs_pool_num_of_items_args {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_num_of_items_ret {
+ int num;
+};
+
+struct remote_fs_pool_list_items_args {
+ remote_nonnull_fs_pool fspool;
+ int maxnames;
+};
+
+struct remote_fs_pool_list_items_ret {
+ remote_nonnull_string names<REMOTE_FS_ITEM_LIST_MAX>; /* insert@1 */
+};
+struct remote_fs_pool_refresh_args {
+ remote_nonnull_fs_pool fspool;
+ unsigned int flags;
+};
+
+/* Fs item calls: */
+
+struct remote_fs_item_lookup_by_name_args {
+ remote_nonnull_fs_pool fspool;
+ remote_nonnull_string name;
+};
+
+struct remote_fs_item_lookup_by_name_ret {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_lookup_by_key_args {
+ remote_nonnull_string key;
+};
+
+struct remote_fs_item_lookup_by_key_ret {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_lookup_by_path_args {
+ remote_nonnull_string path;
+};
+
+struct remote_fs_item_lookup_by_path_ret {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_create_xml_args {
+ remote_nonnull_fs_pool fspool;
+ remote_nonnull_string xml;
+ unsigned int flags;
+};
+
+struct remote_fs_item_create_xml_ret {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_create_xml_from_args {
+ remote_nonnull_fs_pool fspool;
+ remote_nonnull_string xml;
+ remote_nonnull_fs_item cloneitem;
+ unsigned int flags;
+};
+
+struct remote_fs_item_create_xml_from_ret {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_delete_args {
+ remote_nonnull_fs_item item;
+ unsigned int flags;
+};
+
+struct remote_fs_item_get_xml_desc_args {
+ remote_nonnull_fs_item item;
+ unsigned int flags;
+};
+
+struct remote_fs_item_get_xml_desc_ret {
+ remote_nonnull_string xml;
+};
+
+struct remote_fs_item_get_info_args {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_get_info_ret { /* insert@1 */
+ char type;
+ unsigned hyper capacity;
+ unsigned hyper allocation;
+};
+
+struct remote_fs_item_get_path_args {
+ remote_nonnull_fs_item item;
+};
+
+struct remote_fs_item_get_path_ret {
+ remote_nonnull_string name;
+};
+
/* Node driver calls: */
struct remote_node_num_of_devices_args {
@@ -2244,7 +2489,21 @@ struct remote_storage_pool_is_persistent_ret {
int persistent;
};
+struct remote_fs_pool_is_active_args {
+ remote_nonnull_fs_pool fspool;
+};
+
+struct remote_fs_pool_is_active_ret {
+ int active;
+};
+
+struct remote_fs_pool_is_persistent_args {
+ remote_nonnull_fs_pool fspool;
+};
+struct remote_fs_pool_is_persistent_ret {
+ int persistent;
+};
struct remote_interface_is_active_args {
remote_nonnull_interface iface;
};
@@ -2874,6 +3133,27 @@ struct remote_storage_pool_list_all_volumes_ret { /* insert@1 */
unsigned int ret;
};
+struct remote_connect_list_all_fs_pools_args {
+ int need_results;
+ unsigned int flags;
+};
+
+struct remote_connect_list_all_fs_pools_ret { /* insert@1 */
+ remote_nonnull_fs_pool fspools<REMOTE_FS_POOL_LIST_MAX>;
+ unsigned int ret;
+};
+
+struct remote_fs_pool_list_all_items_args {
+ remote_nonnull_fs_pool fspool;
+ int need_results;
+ unsigned int flags;
+};
+
+struct remote_fs_pool_list_all_items_ret { /* insert@1 */
+ remote_nonnull_fs_item items<REMOTE_FS_ITEM_LIST_MAX>;
+ unsigned int ret;
+};
+
struct remote_connect_list_all_networks_args {
int need_results;
unsigned int flags;
@@ -5923,5 +6203,245 @@ enum remote_procedure {
* @generate: both
* @acl: none
*/
- REMOTE_PROC_NODE_DEVICE_EVENT_LIFECYCLE = 376
+ REMOTE_PROC_STORAGE_POOL_EVENT_REFRESH = 376,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: connect:search_fs_pools
+ * @aclfilter: fs_pool:getattr
+ */
+ REMOTE_PROC_CONNECT_NUM_OF_FS_POOLS = 377,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: connect:search_fs_pools
+ * @aclfilter: fs_pool:getattr
+ */
+ REMOTE_PROC_CONNECT_LIST_FS_POOLS = 378,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: connect:search_fs_pools
+ * @aclfilter: fs_pool:getattr
+ */
+ REMOTE_PROC_CONNECT_NUM_OF_DEFINED_FS_POOLS = 379,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: connect:search_fs_pools
+ * @aclfilter: fs_pool:getattr
+ */
+ REMOTE_PROC_CONNECT_LIST_DEFINED_FS_POOLS = 380,
+
+ /**
+ * @generate: both
+ * @acl: fs_pool:start
+ * @acl: fs_pool:write
+ */
+ REMOTE_PROC_FS_POOL_CREATE_XML = 381,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:write
+ * @acl: fs_pool:save
+ */
+ REMOTE_PROC_FS_POOL_DEFINE_XML = 382,
+
+ /**
+ * @generate: both
+ * @acl: fs_pool:format
+ */
+ REMOTE_PROC_FS_POOL_BUILD = 383,
+
+ /**
+ * @generate: both
+ * @acl: fs_pool:format
+ */
+ REMOTE_PROC_FS_POOL_DELETE = 384,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:delete
+ */
+ REMOTE_PROC_FS_POOL_UNDEFINE = 385,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:getattr
+ */
+ REMOTE_PROC_FS_POOL_LOOKUP_BY_NAME = 386,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:getattr
+ */
+ REMOTE_PROC_FS_POOL_LOOKUP_BY_UUID = 387,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:getattr
+ */
+ REMOTE_PROC_FS_POOL_LOOKUP_BY_ITEM = 388,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:read
+ */
+ REMOTE_PROC_FS_POOL_GET_INFO = 389,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:read
+ */
+ REMOTE_PROC_FS_POOL_GET_XML_DESC = 390,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:search_items
+ * @aclfilter: fs_item:getattr
+ */
+ REMOTE_PROC_FS_POOL_NUM_OF_ITEMS = 391,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:search_items
+ * @aclfilter: fs_item:getattr
+ */
+ REMOTE_PROC_FS_POOL_LIST_ITEMS = 392,
+
+ /**
+ * @generate: both
+ * @acl: fs_item:create
+ */
+ REMOTE_PROC_FS_ITEM_CREATE_XML = 393,
+
+ /**
+ * @generate: both
+ * @acl: fs_item:delete
+ */
+ REMOTE_PROC_FS_ITEM_DELETE = 394,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_item:getattr
+ */
+ REMOTE_PROC_FS_ITEM_LOOKUP_BY_NAME = 395,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_item:getattr
+ */
+ REMOTE_PROC_FS_ITEM_LOOKUP_BY_KEY = 396,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_item:getattr
+ */
+ REMOTE_PROC_FS_ITEM_LOOKUP_BY_PATH = 397,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_item:read
+ */
+ REMOTE_PROC_FS_ITEM_GET_INFO = 398,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_item:read
+ */
+ REMOTE_PROC_FS_ITEM_GET_XML_DESC = 399,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_item:read
+ */
+ REMOTE_PROC_FS_ITEM_GET_PATH = 400,
+
+ /**
+ * @generate: both
+ * @acl: fs_item:create
+ */
+ REMOTE_PROC_FS_ITEM_CREATE_XML_FROM = 401,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: connect:search_fs_pools
+ * @aclfilter: fs_pool:getattr
+ */
+ REMOTE_PROC_CONNECT_LIST_ALL_FS_POOLS = 402,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:search_items
+ * @aclfilter: fs_item:getattr
+ */
+ REMOTE_PROC_FS_POOL_LIST_ALL_ITEMS = 403,
+
+ /**
+ * @generate: both
+ * @acl: fs_pool:refresh
+ */
+ REMOTE_PROC_FS_POOL_REFRESH = 404,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:read
+ */
+ REMOTE_PROC_FS_POOL_IS_ACTIVE = 405,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:read
+ */
+ REMOTE_PROC_FS_POOL_IS_PERSISTENT = 406,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:read
+ */
+ REMOTE_PROC_FS_POOL_GET_AUTOSTART = 407,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:write
+ */
+ REMOTE_PROC_FS_POOL_SET_AUTOSTART = 408,
+
+ /**
+ * @generate: both
+ * @acl: fs_pool:start
+ */
+ REMOTE_PROC_FS_POOL_CREATE = 409,
+
+ /**
+ * @generate: both
+ * @priority: high
+ * @acl: fs_pool:stop
+ */
+ REMOTE_PROC_FS_POOL_DESTROY = 410
};
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 173189c..171684b 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -500,7 +500,7 @@ elsif ($mode eq "server") {
if ($args_member =~ m/^remote_nonnull_string name;/ and $has_node_device)
{
# ignore the name arg for node devices
next
- } elsif ($args_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|secret|nwfilter)
(\S+);/) {
+ } elsif ($args_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|secret|nwfilter|fs_pool|fs_item)
(\S+);/) {
my $type_name = name_to_TypeName($1);
push(@vars_list, "vir${type_name}Ptr $2 = NULL");
@@ -665,7 +665,7 @@ elsif ($mode eq "server") {
if (!$modern_ret_as_list) {
push(@ret_list, "ret->$3 = tmp.$3;");
}
- } elsif ($ret_member =~
m/(?:admin|remote)_nonnull_(secret|nwfilter|node_device|interface|network|storage_vol|storage_pool|domain_snapshot|domain|server|client)
(\S+)<(\S+)>;/) {
+ } elsif ($ret_member =~
m/(?:admin|remote)_nonnull_(secret|nwfilter|node_device|interface|network|storage_vol|storage_pool|domain_snapshot|domain|server|client|fs_pool|fs_item)
(\S+)<(\S+)>;/) {
$modern_ret_struct_name = $1;
$single_ret_list_error_msg_type = $1;
$single_ret_list_name = $2;
@@ -723,7 +723,7 @@ elsif ($mode eq "server") {
$single_ret_var = $1;
$single_ret_by_ref = 0;
$single_ret_check = " == NULL";
- } elsif ($ret_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|node_device|secret|nwfilter|domain_snapshot)
(\S+);/) {
+ } elsif ($ret_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|node_device|secret|nwfilter|domain_snapshot|fs_pool|fs_item)
(\S+);/) {
my $type_name = name_to_TypeName($1);
if ($call->{ProcName} eq "DomainCreateWithFlags") {
@@ -1268,7 +1268,7 @@ elsif ($mode eq "client") {
$priv_src = "dev->conn";
push(@args_list, "virNodeDevicePtr dev");
push(@setters_list, "args.name = dev->name;");
- } elsif ($args_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|secret|nwfilter|domain_snapshot)
(\S+);/) {
+ } elsif ($args_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|interface|secret|nwfilter|domain_snapshot|fs_pool|fs_item)
(\S+);/) {
my $name = $1;
my $arg_name = $2;
my $type_name = name_to_TypeName($name);
@@ -1461,7 +1461,7 @@ elsif ($mode eq "client") {
}
push(@ret_list, "memcpy(result->$3, ret.$3,
sizeof(result->$3));");
- } elsif ($ret_member =~
m/(?:admin|remote)_nonnull_(secret|nwfilter|node_device|interface|network|storage_vol|storage_pool|domain_snapshot|domain|server|client)
(\S+)<(\S+)>;/) {
+ } elsif ($ret_member =~
m/(?:admin|remote)_nonnull_(secret|nwfilter|node_device|interface|network|storage_vol|storage_pool|domain_snapshot|domain|server|client|fs_pool|fs_item)
(\S+)<(\S+)>;/) {
my $proc_name = name_to_TypeName($1);
if ($structprefix eq "admin") {
@@ -1513,7 +1513,7 @@ elsif ($mode eq "client") {
push(@ret_list, "VIR_FREE(ret.$1);");
$single_ret_var = "char *rv = NULL";
$single_ret_type = "char *";
- } elsif ($ret_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|node_device|interface|secret|nwfilter|domain_snapshot)
(\S+);/) {
+ } elsif ($ret_member =~
m/^remote_nonnull_(domain|network|storage_pool|storage_vol|node_device|interface|secret|nwfilter|domain_snapshot|fs_pool|fs_item)
(\S+);/) {
my $name = $1;
my $arg_name = $2;
my $type_name = name_to_TypeName($name);
@@ -1968,7 +1968,8 @@ elsif ($mode eq "client") {
"storage_conf.h",
"nwfilter_conf.h",
"node_device_conf.h",
- "interface_conf.h"
+ "interface_conf.h",
+ "fs_conf.h"
);
foreach my $hdr (@headers) {
print "#include \"$hdr\"\n";
@@ -2065,6 +2066,8 @@ elsif ($mode eq "client") {
if ($object ne "Connect") {
if ($object eq "StorageVol") {
push @argdecls, "virStoragePoolDefPtr pool";
+ } elsif ($object eq "FsItem") {
+ push @argdecls, "virFsPoolDefPtr fspool";
}
push @argdecls, "$objecttype $arg";
}
@@ -2094,6 +2097,8 @@ elsif ($mode eq "client") {
if ($object ne "Connect") {
if ($object eq "StorageVol") {
push @argvars, "pool";
+ } elsif ($object eq "FsItem") {
+ push @argvars, "fspool";
}
push @argvars, $arg;
}
--
1.8.3.1