This patch implements support for the storage APIs in the remote
driver, server end. This is just the boilerplate code glueing the
XDR handlers into the libvirt APIs.
remote.c | 766 ++++++++++++++++++++++++++++++++++++++++++
remote_dispatch_localvars.h | 50 ++
remote_dispatch_proc_switch.h | 240 +++++++++++++
remote_dispatch_prototypes.h | 30 +
remote_protocol.c | 536 +++++++++++++++++++++++++++++
remote_protocol.h | 437 +++++++++++++++++++++++
remote_protocol.x | 289 +++++++++++++++
7 files changed, 2347 insertions(+), 1 deletion(-)
diff -r 871911d8862d qemud/remote.c
--- a/qemud/remote.c Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote.c Thu Feb 07 12:33:21 2008 -0500
@@ -65,8 +65,12 @@ static void remoteDispatchError (struct
ATTRIBUTE_FORMAT(printf, 3, 4);
static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain
domain);
static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network
network);
+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 void make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src);
static void make_nonnull_network (remote_nonnull_network *net_dst, virNetworkPtr
net_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);
#include "remote_dispatch_prototypes.h"
@@ -2698,6 +2702,739 @@ remoteDispatchAuthPolkit (struct qemud_s
}
#endif /* HAVE_POLKIT */
+
+/***************************************************************
+ * STORAGE POOL APIS
+ ***************************************************************/
+
+
+static int
+remoteDispatchListDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_list_defined_storage_pools_args *args,
+ remote_list_defined_storage_pools_ret *ret)
+{
+ CHECK_CONN(client);
+
+ if (args->maxnames > REMOTE_NETWORK_NAME_LIST_MAX) {
+ remoteDispatchError (client, req,
+ "maxnames > REMOTE_NETWORK_NAME_LIST_MAX");
+ return -2;
+ }
+
+ /* Allocate return buffer. */
+ ret->names.names_val = calloc (args->maxnames, sizeof (char *));
+
+ ret->names.names_len =
+ virConnectListDefinedStoragePools (client->conn,
+ ret->names.names_val, args->maxnames);
+ if (ret->names.names_len == -1) return -1;
+
+ return 0;
+}
+
+static int
+remoteDispatchListStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_list_storage_pools_args *args,
+ remote_list_storage_pools_ret *ret)
+{
+ CHECK_CONN(client);
+
+ if (args->maxnames > REMOTE_STORAGE_POOL_NAME_LIST_MAX) {
+ remoteDispatchError (client, req,
+ "maxnames >
REMOTE_STORAGE_POOL_NAME_LIST_MAX");
+ return -2;
+ }
+
+ /* Allocate return buffer. */
+ ret->names.names_val = calloc (args->maxnames, sizeof (char *));
+
+ ret->names.names_len =
+ virConnectListStoragePools (client->conn,
+ ret->names.names_val, args->maxnames);
+ if (ret->names.names_len == -1) return -1;
+
+ return 0;
+}
+
+static int
+remoteDispatchDiscoverStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_discover_storage_pools_args *args,
+ remote_discover_storage_pools_ret *ret)
+{
+ CHECK_CONN(client);
+ char **xmlDesc = NULL;
+
+ /* Allocate return buffer. */
+ ret->xml.xml_len =
+ virConnectDiscoverStoragePools (client->conn,
+ args->hostname,
+ args->type,
+ args->flags,
+ &xmlDesc);
+ if (ret->xml.xml_len == -1) return -1;
+
+ if (ret->xml.xml_len > REMOTE_STORAGE_POOL_NAME_LIST_MAX) {
+ int i;
+ for (i = 0 ; i < ret->xml.xml_len ; i++)
+ free(xmlDesc[i]);
+ free(xmlDesc);
+ remoteDispatchError (client, req,
+ "xmllen > REMOTE_STORAGE_POOL_NAME_LIST_MAX");
+ return -2;
+ }
+
+ ret->xml.xml_val = xmlDesc;
+
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolCreate (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_create_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolCreate (pool) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_create_xml_args *args,
+ remote_storage_pool_create_xml_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = virStoragePoolCreateXML (client->conn, args->xml);
+ if (pool == NULL) return -1;
+
+ make_nonnull_storage_pool (&ret->pool, pool);
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolDefineXml (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_define_xml_args *args,
+ remote_storage_pool_define_xml_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = virStoragePoolDefineXML (client->conn, args->xml);
+ if (pool == NULL) return -1;
+
+ make_nonnull_storage_pool (&ret->pool, pool);
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolBuild (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_build_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolBuild (pool, args->flags) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+
+static int
+remoteDispatchStoragePoolDestroy (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_destroy_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolDestroy (pool) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_delete_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolDelete (pool, args->flags) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolRefresh (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_refresh_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolRefresh (pool, args->flags) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_get_info_args *args,
+ remote_storage_pool_get_info_ret *ret)
+{
+ virStoragePoolPtr pool;
+ virStoragePoolInfo info;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolGetInfo (pool, &info) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+
+ ret->state = info.state;
+ ret->capacity = info.capacity;
+ ret->allocation = info.allocation;
+ ret->available = info.available;
+
+ virStoragePoolFree(pool);
+
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_dump_xml_args *args,
+ remote_storage_pool_dump_xml_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ /* remoteDispatchClientRequest will free this. */
+ ret->xml = virStoragePoolGetXMLDesc (pool, args->flags);
+ if (!ret->xml) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolGetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_get_autostart_args *args,
+ remote_storage_pool_get_autostart_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolGetAutostart (pool, &ret->autostart) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+
+static int
+remoteDispatchStoragePoolLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_lookup_by_name_args *args,
+ remote_storage_pool_lookup_by_name_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = virStoragePoolLookupByName (client->conn, args->name);
+ if (pool == NULL) return -1;
+
+ make_nonnull_storage_pool (&ret->pool, pool);
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolLookupByUuid (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_lookup_by_uuid_args *args,
+ remote_storage_pool_lookup_by_uuid_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = virStoragePoolLookupByUUID (client->conn, (unsigned char *)
args->uuid);
+ if (pool == NULL) return -1;
+
+ make_nonnull_storage_pool (&ret->pool, pool);
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolLookupByVolume (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_lookup_by_volume_args
*args,
+ remote_storage_pool_lookup_by_volume_ret *ret)
+{
+ virStoragePoolPtr pool;
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ vol = get_nonnull_storage_vol (client->conn, args->vol);
+
+ pool = virStoragePoolLookupByVolume (vol);
+ virStorageVolFree(vol);
+ if (pool == NULL) return -1;
+
+ make_nonnull_storage_pool (&ret->pool, pool);
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolSetAutostart (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_set_autostart_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolSetAutostart (pool, args->autostart) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolUndefine (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_undefine_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ if (virStoragePoolUndefine (pool) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchNumOfStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_storage_pools_ret *ret)
+{
+ CHECK_CONN(client);
+
+ ret->num = virConnectNumOfStoragePools (client->conn);
+ if (ret->num == -1) return -1;
+
+ return 0;
+}
+
+static int
+remoteDispatchNumOfDefinedStoragePools (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ void *args ATTRIBUTE_UNUSED,
+ remote_num_of_defined_storage_pools_ret *ret)
+{
+ CHECK_CONN(client);
+
+ ret->num = virConnectNumOfDefinedStoragePools (client->conn);
+ if (ret->num == -1) return -1;
+
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_list_volumes_args *args,
+ remote_storage_pool_list_volumes_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ if (args->maxnames > REMOTE_STORAGE_VOL_NAME_LIST_MAX) {
+ remoteDispatchError (client, req,
+ "maxnames >
REMOTE_STORAGE_VOL_NAME_LIST_MAX");
+ return -2;
+ }
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ /* Allocate return buffer. */
+ ret->names.names_val = calloc (args->maxnames, sizeof (char *));
+
+ ret->names.names_len =
+ virStoragePoolListVolumes (pool,
+ ret->names.names_val, args->maxnames);
+ virStoragePoolFree(pool);
+ if (ret->names.names_len == -1) return -1;
+
+ return 0;
+}
+
+
+static int
+remoteDispatchStoragePoolNumOfVolumes (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_num_of_volumes_args *args,
+ remote_storage_pool_num_of_volumes_ret *ret)
+{
+ virStoragePoolPtr pool;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ ret->num = virStoragePoolNumOfVolumes (pool);
+ virStoragePoolFree(pool);
+ if (ret->num == -1) return -1;
+
+ return 0;
+}
+
+
+/***************************************************************
+ * STORAGE VOL APIS
+ ***************************************************************/
+
+
+
+static int
+remoteDispatchStorageVolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_create_xml_args *args,
+ remote_storage_vol_create_xml_ret *ret)
+{
+ virStoragePoolPtr pool;
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ vol = virStorageVolCreateXML (pool, args->xml, args->flags);
+ virStoragePoolFree(pool);
+ if (vol == NULL) return -1;
+
+ make_nonnull_storage_vol (&ret->vol, vol);
+ virStorageVolFree(vol);
+ return 0;
+}
+
+
+static int
+remoteDispatchStorageVolDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_delete_args *args,
+ void *ret ATTRIBUTE_UNUSED)
+{
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ vol = get_nonnull_storage_vol (client->conn, args->vol);
+ if (vol == NULL) {
+ remoteDispatchError (client, req, "storage_vol not found");
+ return -2;
+ }
+
+ if (virStorageVolDelete (vol, args->flags) == -1) {
+ virStorageVolFree(vol);
+ return -1;
+ }
+ virStorageVolFree(vol);
+ return 0;
+}
+
+static int
+remoteDispatchStorageVolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_get_info_args *args,
+ remote_storage_vol_get_info_ret *ret)
+{
+ virStorageVolPtr vol;
+ virStorageVolInfo info;
+ CHECK_CONN(client);
+
+ vol = get_nonnull_storage_vol (client->conn, args->vol);
+ if (vol == NULL) {
+ remoteDispatchError (client, req, "storage_vol not found");
+ return -2;
+ }
+
+ if (virStorageVolGetInfo (vol, &info) == -1) {
+ virStorageVolFree(vol);
+ return -1;
+ }
+
+ ret->type = info.type;
+ ret->capacity = info.capacity;
+ ret->allocation = info.allocation;
+
+ virStorageVolFree(vol);
+
+ return 0;
+}
+
+static int
+remoteDispatchStorageVolDumpXml (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_dump_xml_args *args,
+ remote_storage_vol_dump_xml_ret *ret)
+{
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ vol = get_nonnull_storage_vol (client->conn, args->vol);
+ if (vol == NULL) {
+ remoteDispatchError (client, req, "storage_vol not found");
+ return -2;
+ }
+
+ /* remoteDispatchClientRequest will free this. */
+ ret->xml = virStorageVolGetXMLDesc (vol, args->flags);
+ if (!ret->xml) {
+ virStorageVolFree(vol);
+ return -1;
+ }
+ virStorageVolFree(vol);
+ return 0;
+}
+
+
+static int
+remoteDispatchStorageVolGetPath (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_get_path_args *args,
+ remote_storage_vol_get_path_ret *ret)
+{
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ vol = get_nonnull_storage_vol (client->conn, args->vol);
+ if (vol == NULL) {
+ remoteDispatchError (client, req, "storage_vol not found");
+ return -2;
+ }
+
+ /* remoteDispatchClientRequest will free this. */
+ ret->name = virStorageVolGetPath (vol);
+ if (!ret->name) {
+ virStorageVolFree(vol);
+ return -1;
+ }
+ virStorageVolFree(vol);
+ return 0;
+}
+
+
+static int
+remoteDispatchStorageVolLookupByName (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_lookup_by_name_args *args,
+ remote_storage_vol_lookup_by_name_ret *ret)
+{
+ virStoragePoolPtr pool;
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ pool = get_nonnull_storage_pool (client->conn, args->pool);
+ if (pool == NULL) {
+ remoteDispatchError (client, req, "storage_pool not found");
+ return -2;
+ }
+
+ vol = virStorageVolLookupByName (pool, args->name);
+ virStoragePoolFree(pool);
+ if (vol == NULL) return -1;
+
+ make_nonnull_storage_vol (&ret->vol, vol);
+ virStorageVolFree(vol);
+ return 0;
+}
+
+static int
+remoteDispatchStorageVolLookupByKey (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_lookup_by_key_args *args,
+ remote_storage_vol_lookup_by_key_ret *ret)
+{
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ vol = virStorageVolLookupByKey (client->conn, args->key);
+ if (vol == NULL) return -1;
+
+ make_nonnull_storage_vol (&ret->vol, vol);
+ virStorageVolFree(vol);
+ return 0;
+}
+
+
+static int
+remoteDispatchStorageVolLookupByPath (struct qemud_server *server ATTRIBUTE_UNUSED,
+ struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_lookup_by_path_args *args,
+ remote_storage_vol_lookup_by_path_ret *ret)
+{
+ virStorageVolPtr vol;
+ CHECK_CONN(client);
+
+ vol = virStorageVolLookupByPath (client->conn, args->path);
+ if (vol == NULL) return -1;
+
+ make_nonnull_storage_vol (&ret->vol, vol);
+ virStorageVolFree(vol);
+ return 0;
+}
+
+
/*----- Helpers. -----*/
/* get_nonnull_domain and get_nonnull_network turn an on-wire
@@ -2724,6 +3461,20 @@ get_nonnull_network (virConnectPtr conn,
return virGetNetwork (conn, network.name, BAD_CAST network.uuid);
}
+static virStoragePoolPtr
+get_nonnull_storage_pool (virConnectPtr conn, remote_nonnull_storage_pool pool)
+{
+ return virGetStoragePool (conn, pool.name, BAD_CAST pool.uuid);
+}
+
+static virStorageVolPtr
+get_nonnull_storage_vol (virConnectPtr conn, remote_nonnull_storage_vol vol)
+{
+ virStorageVolPtr ret;
+ ret = virGetStorageVol (conn, vol.pool, vol.name, vol.key);
+ return ret;
+}
+
/* Make remote_nonnull_domain and remote_nonnull_network. */
static void
make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src)
@@ -2738,6 +3489,21 @@ make_nonnull_network (remote_nonnull_net
{
net_dst->name = strdup (net_src->name);
memcpy (net_dst->uuid, net_src->uuid, VIR_UUID_BUFLEN);
+}
+
+static void
+make_nonnull_storage_pool (remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr
pool_src)
+{
+ pool_dst->name = strdup (pool_src->name);
+ memcpy (pool_dst->uuid, pool_src->uuid, VIR_UUID_BUFLEN);
+}
+
+static void
+make_nonnull_storage_vol (remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src)
+{
+ vol_dst->pool = strdup (vol_src->pool);
+ vol_dst->name = strdup (vol_src->name);
+ vol_dst->key = strdup (vol_src->key);
}
/*
diff -r 871911d8862d qemud/remote_dispatch_localvars.h
--- a/qemud/remote_dispatch_localvars.h Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote_dispatch_localvars.h Thu Feb 07 12:33:21 2008 -0500
@@ -4,10 +4,14 @@
remote_domain_lookup_by_uuid_args lv_remote_domain_lookup_by_uuid_args;
remote_domain_lookup_by_uuid_ret lv_remote_domain_lookup_by_uuid_ret;
+remote_storage_pool_list_volumes_args lv_remote_storage_pool_list_volumes_args;
+remote_storage_pool_list_volumes_ret lv_remote_storage_pool_list_volumes_ret;
remote_domain_shutdown_args lv_remote_domain_shutdown_args;
remote_list_defined_domains_args lv_remote_list_defined_domains_args;
remote_list_defined_domains_ret lv_remote_list_defined_domains_ret;
remote_get_capabilities_ret lv_remote_get_capabilities_ret;
+remote_storage_vol_create_xml_args lv_remote_storage_vol_create_xml_args;
+remote_storage_vol_create_xml_ret lv_remote_storage_vol_create_xml_ret;
remote_domain_set_max_memory_args lv_remote_domain_set_max_memory_args;
remote_auth_sasl_init_ret lv_remote_auth_sasl_init_ret;
remote_domain_get_os_type_args lv_remote_domain_get_os_type_args;
@@ -19,21 +23,30 @@ remote_network_undefine_args lv_remote_n
remote_network_undefine_args lv_remote_network_undefine_args;
remote_domain_create_args lv_remote_domain_create_args;
remote_network_destroy_args lv_remote_network_destroy_args;
+remote_storage_vol_lookup_by_key_args lv_remote_storage_vol_lookup_by_key_args;
+remote_storage_vol_lookup_by_key_ret lv_remote_storage_vol_lookup_by_key_ret;
+remote_storage_pool_lookup_by_uuid_args lv_remote_storage_pool_lookup_by_uuid_args;
+remote_storage_pool_lookup_by_uuid_ret lv_remote_storage_pool_lookup_by_uuid_ret;
remote_domain_pin_vcpu_args lv_remote_domain_pin_vcpu_args;
remote_list_defined_networks_args lv_remote_list_defined_networks_args;
remote_list_defined_networks_ret lv_remote_list_defined_networks_ret;
remote_network_create_xml_args lv_remote_network_create_xml_args;
remote_network_create_xml_ret lv_remote_network_create_xml_ret;
remote_open_args lv_remote_open_args;
+remote_storage_pool_refresh_args lv_remote_storage_pool_refresh_args;
+remote_storage_vol_lookup_by_path_args lv_remote_storage_vol_lookup_by_path_args;
+remote_storage_vol_lookup_by_path_ret lv_remote_storage_vol_lookup_by_path_ret;
remote_list_domains_args lv_remote_list_domains_args;
remote_list_domains_ret lv_remote_list_domains_ret;
remote_network_define_xml_args lv_remote_network_define_xml_args;
remote_network_define_xml_ret lv_remote_network_define_xml_ret;
remote_get_type_ret lv_remote_get_type_ret;
+remote_storage_vol_delete_args lv_remote_storage_vol_delete_args;
remote_network_dump_xml_args lv_remote_network_dump_xml_args;
remote_network_dump_xml_ret lv_remote_network_dump_xml_ret;
remote_domain_reboot_args lv_remote_domain_reboot_args;
remote_domain_set_memory_args lv_remote_domain_set_memory_args;
+remote_storage_pool_destroy_args lv_remote_storage_pool_destroy_args;
remote_domain_create_linux_args lv_remote_domain_create_linux_args;
remote_domain_create_linux_ret lv_remote_domain_create_linux_ret;
remote_domain_set_scheduler_parameters_args
lv_remote_domain_set_scheduler_parameters_args;
@@ -42,14 +55,25 @@ remote_auth_sasl_start_ret lv_remote_aut
remote_auth_sasl_start_ret lv_remote_auth_sasl_start_ret;
remote_domain_interface_stats_args lv_remote_domain_interface_stats_args;
remote_domain_interface_stats_ret lv_remote_domain_interface_stats_ret;
+remote_storage_pool_dump_xml_args lv_remote_storage_pool_dump_xml_args;
+remote_storage_pool_dump_xml_ret lv_remote_storage_pool_dump_xml_ret;
+remote_storage_pool_create_xml_args lv_remote_storage_pool_create_xml_args;
+remote_storage_pool_create_xml_ret lv_remote_storage_pool_create_xml_ret;
+remote_storage_pool_build_args lv_remote_storage_pool_build_args;
+remote_storage_pool_delete_args lv_remote_storage_pool_delete_args;
+remote_storage_pool_lookup_by_volume_args lv_remote_storage_pool_lookup_by_volume_args;
+remote_storage_pool_lookup_by_volume_ret lv_remote_storage_pool_lookup_by_volume_ret;
remote_domain_get_max_vcpus_args lv_remote_domain_get_max_vcpus_args;
remote_domain_get_max_vcpus_ret lv_remote_domain_get_max_vcpus_ret;
remote_domain_get_info_args lv_remote_domain_get_info_args;
remote_domain_get_info_ret lv_remote_domain_get_info_ret;
+remote_storage_pool_num_of_volumes_args lv_remote_storage_pool_num_of_volumes_args;
+remote_storage_pool_num_of_volumes_ret lv_remote_storage_pool_num_of_volumes_ret;
remote_supports_feature_args lv_remote_supports_feature_args;
remote_supports_feature_ret lv_remote_supports_feature_ret;
remote_domain_lookup_by_name_args lv_remote_domain_lookup_by_name_args;
remote_domain_lookup_by_name_ret lv_remote_domain_lookup_by_name_ret;
+remote_storage_pool_set_autostart_args lv_remote_storage_pool_set_autostart_args;
remote_domain_resume_args lv_remote_domain_resume_args;
remote_network_get_bridge_name_args lv_remote_network_get_bridge_name_args;
remote_network_get_bridge_name_ret lv_remote_network_get_bridge_name_ret;
@@ -69,6 +93,7 @@ remote_domain_block_stats_args lv_remote
remote_domain_block_stats_args lv_remote_domain_block_stats_args;
remote_domain_block_stats_ret lv_remote_domain_block_stats_ret;
remote_domain_detach_device_args lv_remote_domain_detach_device_args;
+remote_num_of_storage_pools_ret lv_remote_num_of_storage_pools_ret;
remote_domain_save_args lv_remote_domain_save_args;
remote_domain_migrate_prepare_args lv_remote_domain_migrate_prepare_args;
remote_domain_migrate_prepare_ret lv_remote_domain_migrate_prepare_ret;
@@ -77,28 +102,53 @@ remote_domain_get_scheduler_type_ret lv_
remote_domain_get_scheduler_type_ret lv_remote_domain_get_scheduler_type_ret;
remote_get_version_ret lv_remote_get_version_ret;
remote_domain_suspend_args lv_remote_domain_suspend_args;
+remote_storage_pool_lookup_by_name_args lv_remote_storage_pool_lookup_by_name_args;
+remote_storage_pool_lookup_by_name_ret lv_remote_storage_pool_lookup_by_name_ret;
remote_network_set_autostart_args lv_remote_network_set_autostart_args;
remote_network_get_autostart_args lv_remote_network_get_autostart_args;
remote_network_get_autostart_ret lv_remote_network_get_autostart_ret;
+remote_storage_pool_create_args lv_remote_storage_pool_create_args;
remote_auth_list_ret lv_remote_auth_list_ret;
+remote_num_of_defined_storage_pools_ret lv_remote_num_of_defined_storage_pools_ret;
remote_domain_core_dump_args lv_remote_domain_core_dump_args;
+remote_list_defined_storage_pools_args lv_remote_list_defined_storage_pools_args;
+remote_list_defined_storage_pools_ret lv_remote_list_defined_storage_pools_ret;
remote_domain_get_max_memory_args lv_remote_domain_get_max_memory_args;
remote_domain_get_max_memory_ret lv_remote_domain_get_max_memory_ret;
remote_num_of_domains_ret lv_remote_num_of_domains_ret;
remote_list_networks_args lv_remote_list_networks_args;
remote_list_networks_ret lv_remote_list_networks_ret;
+remote_storage_pool_undefine_args lv_remote_storage_pool_undefine_args;
remote_domain_set_autostart_args lv_remote_domain_set_autostart_args;
+remote_storage_pool_get_autostart_args lv_remote_storage_pool_get_autostart_args;
+remote_storage_pool_get_autostart_ret lv_remote_storage_pool_get_autostart_ret;
+remote_storage_vol_get_path_args lv_remote_storage_vol_get_path_args;
+remote_storage_vol_get_path_ret lv_remote_storage_vol_get_path_ret;
remote_domain_lookup_by_id_args lv_remote_domain_lookup_by_id_args;
remote_domain_lookup_by_id_ret lv_remote_domain_lookup_by_id_ret;
remote_domain_attach_device_args lv_remote_domain_attach_device_args;
remote_num_of_networks_ret lv_remote_num_of_networks_ret;
+remote_storage_pool_get_info_args lv_remote_storage_pool_get_info_args;
+remote_storage_pool_get_info_ret lv_remote_storage_pool_get_info_ret;
+remote_discover_storage_pools_args lv_remote_discover_storage_pools_args;
+remote_discover_storage_pools_ret lv_remote_discover_storage_pools_ret;
+remote_list_storage_pools_args lv_remote_list_storage_pools_args;
+remote_list_storage_pools_ret lv_remote_list_storage_pools_ret;
remote_domain_restore_args lv_remote_domain_restore_args;
remote_network_create_args lv_remote_network_create_args;
remote_num_of_defined_networks_ret lv_remote_num_of_defined_networks_ret;
+remote_storage_vol_lookup_by_name_args lv_remote_storage_vol_lookup_by_name_args;
+remote_storage_vol_lookup_by_name_ret lv_remote_storage_vol_lookup_by_name_ret;
+remote_storage_pool_define_xml_args lv_remote_storage_pool_define_xml_args;
+remote_storage_pool_define_xml_ret lv_remote_storage_pool_define_xml_ret;
remote_network_lookup_by_uuid_args lv_remote_network_lookup_by_uuid_args;
remote_network_lookup_by_uuid_ret lv_remote_network_lookup_by_uuid_ret;
+remote_storage_vol_get_info_args lv_remote_storage_vol_get_info_args;
+remote_storage_vol_get_info_ret lv_remote_storage_vol_get_info_ret;
remote_domain_define_xml_args lv_remote_domain_define_xml_args;
remote_domain_define_xml_ret lv_remote_domain_define_xml_ret;
+remote_storage_vol_dump_xml_args lv_remote_storage_vol_dump_xml_args;
+remote_storage_vol_dump_xml_ret lv_remote_storage_vol_dump_xml_ret;
remote_domain_dump_xml_args lv_remote_domain_dump_xml_args;
remote_domain_dump_xml_ret lv_remote_domain_dump_xml_ret;
remote_get_max_vcpus_args lv_remote_get_max_vcpus_args;
diff -r 871911d8862d qemud/remote_dispatch_proc_switch.h
--- a/qemud/remote_dispatch_proc_switch.h Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote_dispatch_proc_switch.h Thu Feb 07 12:33:21 2008 -0500
@@ -41,6 +41,15 @@ case REMOTE_PROC_CLOSE:
case REMOTE_PROC_CLOSE:
fn = (dispatch_fn) remoteDispatchClose;
break;
+case REMOTE_PROC_DISCOVER_STORAGE_POOLS:
+ fn = (dispatch_fn) remoteDispatchDiscoverStoragePools;
+ args_filter = (xdrproc_t) xdr_remote_discover_storage_pools_args;
+ args = (char *) &lv_remote_discover_storage_pools_args;
+ memset (&lv_remote_discover_storage_pools_args, 0, sizeof
lv_remote_discover_storage_pools_args);
+ ret_filter = (xdrproc_t) xdr_remote_discover_storage_pools_ret;
+ ret = (char *) &lv_remote_discover_storage_pools_ret;
+ memset (&lv_remote_discover_storage_pools_ret, 0, sizeof
lv_remote_discover_storage_pools_ret);
+ break;
case REMOTE_PROC_DOMAIN_ATTACH_DEVICE:
fn = (dispatch_fn) remoteDispatchDomainAttachDevice;
args_filter = (xdrproc_t) xdr_remote_domain_attach_device_args;
@@ -368,6 +377,15 @@ case REMOTE_PROC_LIST_DEFINED_NETWORKS:
ret = (char *) &lv_remote_list_defined_networks_ret;
memset (&lv_remote_list_defined_networks_ret, 0, sizeof
lv_remote_list_defined_networks_ret);
break;
+case REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS:
+ fn = (dispatch_fn) remoteDispatchListDefinedStoragePools;
+ args_filter = (xdrproc_t) xdr_remote_list_defined_storage_pools_args;
+ args = (char *) &lv_remote_list_defined_storage_pools_args;
+ memset (&lv_remote_list_defined_storage_pools_args, 0, sizeof
lv_remote_list_defined_storage_pools_args);
+ ret_filter = (xdrproc_t) xdr_remote_list_defined_storage_pools_ret;
+ ret = (char *) &lv_remote_list_defined_storage_pools_ret;
+ memset (&lv_remote_list_defined_storage_pools_ret, 0, sizeof
lv_remote_list_defined_storage_pools_ret);
+ break;
case REMOTE_PROC_LIST_DOMAINS:
fn = (dispatch_fn) remoteDispatchListDomains;
args_filter = (xdrproc_t) xdr_remote_list_domains_args;
@@ -386,6 +404,15 @@ case REMOTE_PROC_LIST_NETWORKS:
ret = (char *) &lv_remote_list_networks_ret;
memset (&lv_remote_list_networks_ret, 0, sizeof lv_remote_list_networks_ret);
break;
+case REMOTE_PROC_LIST_STORAGE_POOLS:
+ fn = (dispatch_fn) remoteDispatchListStoragePools;
+ args_filter = (xdrproc_t) xdr_remote_list_storage_pools_args;
+ args = (char *) &lv_remote_list_storage_pools_args;
+ memset (&lv_remote_list_storage_pools_args, 0, sizeof
lv_remote_list_storage_pools_args);
+ ret_filter = (xdrproc_t) xdr_remote_list_storage_pools_ret;
+ ret = (char *) &lv_remote_list_storage_pools_ret;
+ memset (&lv_remote_list_storage_pools_ret, 0, sizeof
lv_remote_list_storage_pools_ret);
+ break;
case REMOTE_PROC_NETWORK_CREATE:
fn = (dispatch_fn) remoteDispatchNetworkCreate;
args_filter = (xdrproc_t) xdr_remote_network_create_args;
@@ -491,6 +518,12 @@ case REMOTE_PROC_NUM_OF_DEFINED_NETWORKS
ret = (char *) &lv_remote_num_of_defined_networks_ret;
memset (&lv_remote_num_of_defined_networks_ret, 0, sizeof
lv_remote_num_of_defined_networks_ret);
break;
+case REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS:
+ fn = (dispatch_fn) remoteDispatchNumOfDefinedStoragePools;
+ ret_filter = (xdrproc_t) xdr_remote_num_of_defined_storage_pools_ret;
+ ret = (char *) &lv_remote_num_of_defined_storage_pools_ret;
+ memset (&lv_remote_num_of_defined_storage_pools_ret, 0, sizeof
lv_remote_num_of_defined_storage_pools_ret);
+ break;
case REMOTE_PROC_NUM_OF_DOMAINS:
fn = (dispatch_fn) remoteDispatchNumOfDomains;
ret_filter = (xdrproc_t) xdr_remote_num_of_domains_ret;
@@ -503,11 +536,218 @@ case REMOTE_PROC_NUM_OF_NETWORKS:
ret = (char *) &lv_remote_num_of_networks_ret;
memset (&lv_remote_num_of_networks_ret, 0, sizeof lv_remote_num_of_networks_ret);
break;
+case REMOTE_PROC_NUM_OF_STORAGE_POOLS:
+ fn = (dispatch_fn) remoteDispatchNumOfStoragePools;
+ ret_filter = (xdrproc_t) xdr_remote_num_of_storage_pools_ret;
+ ret = (char *) &lv_remote_num_of_storage_pools_ret;
+ memset (&lv_remote_num_of_storage_pools_ret, 0, sizeof
lv_remote_num_of_storage_pools_ret);
+ break;
case REMOTE_PROC_OPEN:
fn = (dispatch_fn) remoteDispatchOpen;
args_filter = (xdrproc_t) xdr_remote_open_args;
args = (char *) &lv_remote_open_args;
memset (&lv_remote_open_args, 0, sizeof lv_remote_open_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_BUILD:
+ fn = (dispatch_fn) remoteDispatchStoragePoolBuild;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_build_args;
+ args = (char *) &lv_remote_storage_pool_build_args;
+ memset (&lv_remote_storage_pool_build_args, 0, sizeof
lv_remote_storage_pool_build_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_CREATE:
+ fn = (dispatch_fn) remoteDispatchStoragePoolCreate;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_create_args;
+ args = (char *) &lv_remote_storage_pool_create_args;
+ memset (&lv_remote_storage_pool_create_args, 0, sizeof
lv_remote_storage_pool_create_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_CREATE_XML:
+ fn = (dispatch_fn) remoteDispatchStoragePoolCreateXml;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_create_xml_args;
+ args = (char *) &lv_remote_storage_pool_create_xml_args;
+ memset (&lv_remote_storage_pool_create_xml_args, 0, sizeof
lv_remote_storage_pool_create_xml_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_create_xml_ret;
+ ret = (char *) &lv_remote_storage_pool_create_xml_ret;
+ memset (&lv_remote_storage_pool_create_xml_ret, 0, sizeof
lv_remote_storage_pool_create_xml_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_DEFINE_XML:
+ fn = (dispatch_fn) remoteDispatchStoragePoolDefineXml;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_define_xml_args;
+ args = (char *) &lv_remote_storage_pool_define_xml_args;
+ memset (&lv_remote_storage_pool_define_xml_args, 0, sizeof
lv_remote_storage_pool_define_xml_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_define_xml_ret;
+ ret = (char *) &lv_remote_storage_pool_define_xml_ret;
+ memset (&lv_remote_storage_pool_define_xml_ret, 0, sizeof
lv_remote_storage_pool_define_xml_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_DELETE:
+ fn = (dispatch_fn) remoteDispatchStoragePoolDelete;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_delete_args;
+ args = (char *) &lv_remote_storage_pool_delete_args;
+ memset (&lv_remote_storage_pool_delete_args, 0, sizeof
lv_remote_storage_pool_delete_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_DESTROY:
+ fn = (dispatch_fn) remoteDispatchStoragePoolDestroy;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_destroy_args;
+ args = (char *) &lv_remote_storage_pool_destroy_args;
+ memset (&lv_remote_storage_pool_destroy_args, 0, sizeof
lv_remote_storage_pool_destroy_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_DUMP_XML:
+ fn = (dispatch_fn) remoteDispatchStoragePoolDumpXml;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_dump_xml_args;
+ args = (char *) &lv_remote_storage_pool_dump_xml_args;
+ memset (&lv_remote_storage_pool_dump_xml_args, 0, sizeof
lv_remote_storage_pool_dump_xml_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_dump_xml_ret;
+ ret = (char *) &lv_remote_storage_pool_dump_xml_ret;
+ memset (&lv_remote_storage_pool_dump_xml_ret, 0, sizeof
lv_remote_storage_pool_dump_xml_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART:
+ fn = (dispatch_fn) remoteDispatchStoragePoolGetAutostart;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_get_autostart_args;
+ args = (char *) &lv_remote_storage_pool_get_autostart_args;
+ memset (&lv_remote_storage_pool_get_autostart_args, 0, sizeof
lv_remote_storage_pool_get_autostart_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_get_autostart_ret;
+ ret = (char *) &lv_remote_storage_pool_get_autostart_ret;
+ memset (&lv_remote_storage_pool_get_autostart_ret, 0, sizeof
lv_remote_storage_pool_get_autostart_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_GET_INFO:
+ fn = (dispatch_fn) remoteDispatchStoragePoolGetInfo;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_get_info_args;
+ args = (char *) &lv_remote_storage_pool_get_info_args;
+ memset (&lv_remote_storage_pool_get_info_args, 0, sizeof
lv_remote_storage_pool_get_info_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_get_info_ret;
+ ret = (char *) &lv_remote_storage_pool_get_info_ret;
+ memset (&lv_remote_storage_pool_get_info_ret, 0, sizeof
lv_remote_storage_pool_get_info_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES:
+ fn = (dispatch_fn) remoteDispatchStoragePoolListVolumes;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_list_volumes_args;
+ args = (char *) &lv_remote_storage_pool_list_volumes_args;
+ memset (&lv_remote_storage_pool_list_volumes_args, 0, sizeof
lv_remote_storage_pool_list_volumes_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_list_volumes_ret;
+ ret = (char *) &lv_remote_storage_pool_list_volumes_ret;
+ memset (&lv_remote_storage_pool_list_volumes_ret, 0, sizeof
lv_remote_storage_pool_list_volumes_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME:
+ fn = (dispatch_fn) remoteDispatchStoragePoolLookupByName;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_name_args;
+ args = (char *) &lv_remote_storage_pool_lookup_by_name_args;
+ memset (&lv_remote_storage_pool_lookup_by_name_args, 0, sizeof
lv_remote_storage_pool_lookup_by_name_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_name_ret;
+ ret = (char *) &lv_remote_storage_pool_lookup_by_name_ret;
+ memset (&lv_remote_storage_pool_lookup_by_name_ret, 0, sizeof
lv_remote_storage_pool_lookup_by_name_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID:
+ fn = (dispatch_fn) remoteDispatchStoragePoolLookupByUuid;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_uuid_args;
+ args = (char *) &lv_remote_storage_pool_lookup_by_uuid_args;
+ memset (&lv_remote_storage_pool_lookup_by_uuid_args, 0, sizeof
lv_remote_storage_pool_lookup_by_uuid_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_uuid_ret;
+ ret = (char *) &lv_remote_storage_pool_lookup_by_uuid_ret;
+ memset (&lv_remote_storage_pool_lookup_by_uuid_ret, 0, sizeof
lv_remote_storage_pool_lookup_by_uuid_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME:
+ fn = (dispatch_fn) remoteDispatchStoragePoolLookupByVolume;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_volume_args;
+ args = (char *) &lv_remote_storage_pool_lookup_by_volume_args;
+ memset (&lv_remote_storage_pool_lookup_by_volume_args, 0, sizeof
lv_remote_storage_pool_lookup_by_volume_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_volume_ret;
+ ret = (char *) &lv_remote_storage_pool_lookup_by_volume_ret;
+ memset (&lv_remote_storage_pool_lookup_by_volume_ret, 0, sizeof
lv_remote_storage_pool_lookup_by_volume_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES:
+ fn = (dispatch_fn) remoteDispatchStoragePoolNumOfVolumes;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_num_of_volumes_args;
+ args = (char *) &lv_remote_storage_pool_num_of_volumes_args;
+ memset (&lv_remote_storage_pool_num_of_volumes_args, 0, sizeof
lv_remote_storage_pool_num_of_volumes_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_pool_num_of_volumes_ret;
+ ret = (char *) &lv_remote_storage_pool_num_of_volumes_ret;
+ memset (&lv_remote_storage_pool_num_of_volumes_ret, 0, sizeof
lv_remote_storage_pool_num_of_volumes_ret);
+ break;
+case REMOTE_PROC_STORAGE_POOL_REFRESH:
+ fn = (dispatch_fn) remoteDispatchStoragePoolRefresh;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_refresh_args;
+ args = (char *) &lv_remote_storage_pool_refresh_args;
+ memset (&lv_remote_storage_pool_refresh_args, 0, sizeof
lv_remote_storage_pool_refresh_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART:
+ fn = (dispatch_fn) remoteDispatchStoragePoolSetAutostart;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_set_autostart_args;
+ args = (char *) &lv_remote_storage_pool_set_autostart_args;
+ memset (&lv_remote_storage_pool_set_autostart_args, 0, sizeof
lv_remote_storage_pool_set_autostart_args);
+ break;
+case REMOTE_PROC_STORAGE_POOL_UNDEFINE:
+ fn = (dispatch_fn) remoteDispatchStoragePoolUndefine;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_undefine_args;
+ args = (char *) &lv_remote_storage_pool_undefine_args;
+ memset (&lv_remote_storage_pool_undefine_args, 0, sizeof
lv_remote_storage_pool_undefine_args);
+ break;
+case REMOTE_PROC_STORAGE_VOL_CREATE_XML:
+ fn = (dispatch_fn) remoteDispatchStorageVolCreateXml;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_create_xml_args;
+ args = (char *) &lv_remote_storage_vol_create_xml_args;
+ memset (&lv_remote_storage_vol_create_xml_args, 0, sizeof
lv_remote_storage_vol_create_xml_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_create_xml_ret;
+ ret = (char *) &lv_remote_storage_vol_create_xml_ret;
+ memset (&lv_remote_storage_vol_create_xml_ret, 0, sizeof
lv_remote_storage_vol_create_xml_ret);
+ break;
+case REMOTE_PROC_STORAGE_VOL_DELETE:
+ fn = (dispatch_fn) remoteDispatchStorageVolDelete;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_delete_args;
+ args = (char *) &lv_remote_storage_vol_delete_args;
+ memset (&lv_remote_storage_vol_delete_args, 0, sizeof
lv_remote_storage_vol_delete_args);
+ break;
+case REMOTE_PROC_STORAGE_VOL_DUMP_XML:
+ fn = (dispatch_fn) remoteDispatchStorageVolDumpXml;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_dump_xml_args;
+ args = (char *) &lv_remote_storage_vol_dump_xml_args;
+ memset (&lv_remote_storage_vol_dump_xml_args, 0, sizeof
lv_remote_storage_vol_dump_xml_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_dump_xml_ret;
+ ret = (char *) &lv_remote_storage_vol_dump_xml_ret;
+ memset (&lv_remote_storage_vol_dump_xml_ret, 0, sizeof
lv_remote_storage_vol_dump_xml_ret);
+ break;
+case REMOTE_PROC_STORAGE_VOL_GET_INFO:
+ fn = (dispatch_fn) remoteDispatchStorageVolGetInfo;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_get_info_args;
+ args = (char *) &lv_remote_storage_vol_get_info_args;
+ memset (&lv_remote_storage_vol_get_info_args, 0, sizeof
lv_remote_storage_vol_get_info_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_get_info_ret;
+ ret = (char *) &lv_remote_storage_vol_get_info_ret;
+ memset (&lv_remote_storage_vol_get_info_ret, 0, sizeof
lv_remote_storage_vol_get_info_ret);
+ break;
+case REMOTE_PROC_STORAGE_VOL_GET_PATH:
+ fn = (dispatch_fn) remoteDispatchStorageVolGetPath;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_get_path_args;
+ args = (char *) &lv_remote_storage_vol_get_path_args;
+ memset (&lv_remote_storage_vol_get_path_args, 0, sizeof
lv_remote_storage_vol_get_path_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_get_path_ret;
+ ret = (char *) &lv_remote_storage_vol_get_path_ret;
+ memset (&lv_remote_storage_vol_get_path_ret, 0, sizeof
lv_remote_storage_vol_get_path_ret);
+ break;
+case REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY:
+ fn = (dispatch_fn) remoteDispatchStorageVolLookupByKey;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_key_args;
+ args = (char *) &lv_remote_storage_vol_lookup_by_key_args;
+ memset (&lv_remote_storage_vol_lookup_by_key_args, 0, sizeof
lv_remote_storage_vol_lookup_by_key_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_key_ret;
+ ret = (char *) &lv_remote_storage_vol_lookup_by_key_ret;
+ memset (&lv_remote_storage_vol_lookup_by_key_ret, 0, sizeof
lv_remote_storage_vol_lookup_by_key_ret);
+ break;
+case REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME:
+ fn = (dispatch_fn) remoteDispatchStorageVolLookupByName;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_name_args;
+ args = (char *) &lv_remote_storage_vol_lookup_by_name_args;
+ memset (&lv_remote_storage_vol_lookup_by_name_args, 0, sizeof
lv_remote_storage_vol_lookup_by_name_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_name_ret;
+ ret = (char *) &lv_remote_storage_vol_lookup_by_name_ret;
+ memset (&lv_remote_storage_vol_lookup_by_name_ret, 0, sizeof
lv_remote_storage_vol_lookup_by_name_ret);
+ break;
+case REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH:
+ fn = (dispatch_fn) remoteDispatchStorageVolLookupByPath;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_path_args;
+ args = (char *) &lv_remote_storage_vol_lookup_by_path_args;
+ memset (&lv_remote_storage_vol_lookup_by_path_args, 0, sizeof
lv_remote_storage_vol_lookup_by_path_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_path_ret;
+ ret = (char *) &lv_remote_storage_vol_lookup_by_path_ret;
+ memset (&lv_remote_storage_vol_lookup_by_path_ret, 0, sizeof
lv_remote_storage_vol_lookup_by_path_ret);
break;
case REMOTE_PROC_SUPPORTS_FEATURE:
fn = (dispatch_fn) remoteDispatchSupportsFeature;
diff -r 871911d8862d qemud/remote_dispatch_prototypes.h
--- a/qemud/remote_dispatch_prototypes.h Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote_dispatch_prototypes.h Thu Feb 07 12:33:21 2008 -0500
@@ -8,6 +8,7 @@ static int remoteDispatchAuthSaslStart (
static int remoteDispatchAuthSaslStart (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, remote_auth_sasl_start_args *args,
remote_auth_sasl_start_ret *ret);
static int remoteDispatchAuthSaslStep (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, remote_auth_sasl_step_args *args,
remote_auth_sasl_step_ret *ret);
static int remoteDispatchClose (struct qemud_server *server, struct qemud_client *client,
remote_message_header *req, void *args, void *ret);
+static int remoteDispatchDiscoverStoragePools (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_discover_storage_pools_args
*args, remote_discover_storage_pools_ret *ret);
static int remoteDispatchDomainAttachDevice (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_domain_attach_device_args *args,
void *ret);
static int remoteDispatchDomainBlockStats (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_domain_block_stats_args *args,
remote_domain_block_stats_ret *ret);
static int remoteDispatchDomainCoreDump (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, remote_domain_core_dump_args *args, void *ret);
@@ -52,8 +53,10 @@ static int remoteDispatchGetVersion (str
static int remoteDispatchGetVersion (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, void *args, remote_get_version_ret *ret);
static int remoteDispatchListDefinedDomains (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_list_defined_domains_args *args,
remote_list_defined_domains_ret *ret);
static int remoteDispatchListDefinedNetworks (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_list_defined_networks_args *args,
remote_list_defined_networks_ret *ret);
+static int remoteDispatchListDefinedStoragePools (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_list_defined_storage_pools_args
*args, remote_list_defined_storage_pools_ret *ret);
static int remoteDispatchListDomains (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, remote_list_domains_args *args,
remote_list_domains_ret *ret);
static int remoteDispatchListNetworks (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, remote_list_networks_args *args,
remote_list_networks_ret *ret);
+static int remoteDispatchListStoragePools (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_list_storage_pools_args *args,
remote_list_storage_pools_ret *ret);
static int remoteDispatchNetworkCreate (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, remote_network_create_args *args, void *ret);
static int remoteDispatchNetworkCreateXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_network_create_xml_args *args,
remote_network_create_xml_ret *ret);
static int remoteDispatchNetworkDefineXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_network_define_xml_args *args,
remote_network_define_xml_ret *ret);
@@ -68,7 +71,34 @@ static int remoteDispatchNodeGetInfo (st
static int remoteDispatchNodeGetInfo (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, void *args, remote_node_get_info_ret *ret);
static int remoteDispatchNumOfDefinedDomains (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, void *args,
remote_num_of_defined_domains_ret *ret);
static int remoteDispatchNumOfDefinedNetworks (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, void *args,
remote_num_of_defined_networks_ret *ret);
+static int remoteDispatchNumOfDefinedStoragePools (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, void *args,
remote_num_of_defined_storage_pools_ret *ret);
static int remoteDispatchNumOfDomains (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, void *args, remote_num_of_domains_ret *ret);
static int remoteDispatchNumOfNetworks (struct qemud_server *server, struct qemud_client
*client, remote_message_header *req, void *args, remote_num_of_networks_ret *ret);
+static int remoteDispatchNumOfStoragePools (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, void *args,
remote_num_of_storage_pools_ret *ret);
static int remoteDispatchOpen (struct qemud_server *server, struct qemud_client *client,
remote_message_header *req, remote_open_args *args, void *ret);
+static int remoteDispatchStoragePoolBuild (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_build_args *args,
void *ret);
+static int remoteDispatchStoragePoolCreate (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_create_args *args,
void *ret);
+static int remoteDispatchStoragePoolCreateXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_create_xml_args
*args, remote_storage_pool_create_xml_ret *ret);
+static int remoteDispatchStoragePoolDefineXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_define_xml_args
*args, remote_storage_pool_define_xml_ret *ret);
+static int remoteDispatchStoragePoolDelete (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_delete_args *args,
void *ret);
+static int remoteDispatchStoragePoolDestroy (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_destroy_args *args,
void *ret);
+static int remoteDispatchStoragePoolDumpXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_dump_xml_args *args,
remote_storage_pool_dump_xml_ret *ret);
+static int remoteDispatchStoragePoolGetAutostart (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_get_autostart_args
*args, remote_storage_pool_get_autostart_ret *ret);
+static int remoteDispatchStoragePoolGetInfo (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_get_info_args *args,
remote_storage_pool_get_info_ret *ret);
+static int remoteDispatchStoragePoolListVolumes (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_list_volumes_args
*args, remote_storage_pool_list_volumes_ret *ret);
+static int remoteDispatchStoragePoolLookupByName (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_lookup_by_name_args
*args, remote_storage_pool_lookup_by_name_ret *ret);
+static int remoteDispatchStoragePoolLookupByUuid (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_lookup_by_uuid_args
*args, remote_storage_pool_lookup_by_uuid_ret *ret);
+static int remoteDispatchStoragePoolLookupByVolume (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req,
remote_storage_pool_lookup_by_volume_args *args, remote_storage_pool_lookup_by_volume_ret
*ret);
+static int remoteDispatchStoragePoolNumOfVolumes (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_num_of_volumes_args
*args, remote_storage_pool_num_of_volumes_ret *ret);
+static int remoteDispatchStoragePoolRefresh (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_refresh_args *args,
void *ret);
+static int remoteDispatchStoragePoolSetAutostart (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_set_autostart_args
*args, void *ret);
+static int remoteDispatchStoragePoolUndefine (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_pool_undefine_args *args,
void *ret);
+static int remoteDispatchStorageVolCreateXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_create_xml_args
*args, remote_storage_vol_create_xml_ret *ret);
+static int remoteDispatchStorageVolDelete (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_delete_args *args,
void *ret);
+static int remoteDispatchStorageVolDumpXml (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_dump_xml_args *args,
remote_storage_vol_dump_xml_ret *ret);
+static int remoteDispatchStorageVolGetInfo (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_get_info_args *args,
remote_storage_vol_get_info_ret *ret);
+static int remoteDispatchStorageVolGetPath (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_get_path_args *args,
remote_storage_vol_get_path_ret *ret);
+static int remoteDispatchStorageVolLookupByKey (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_lookup_by_key_args
*args, remote_storage_vol_lookup_by_key_ret *ret);
+static int remoteDispatchStorageVolLookupByName (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_lookup_by_name_args
*args, remote_storage_vol_lookup_by_name_ret *ret);
+static int remoteDispatchStorageVolLookupByPath (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_storage_vol_lookup_by_path_args
*args, remote_storage_vol_lookup_by_path_ret *ret);
static int remoteDispatchSupportsFeature (struct qemud_server *server, struct
qemud_client *client, remote_message_header *req, remote_supports_feature_args *args,
remote_supports_feature_ret *ret);
diff -r 871911d8862d qemud/remote_protocol.c
--- a/qemud/remote_protocol.c Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote_protocol.c Thu Feb 07 12:33:21 2008 -0500
@@ -58,6 +58,30 @@ xdr_remote_nonnull_network (XDR *xdrs, r
}
bool_t
+xdr_remote_nonnull_storage_pool (XDR *xdrs, remote_nonnull_storage_pool *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->name))
+ return FALSE;
+ if (!xdr_remote_uuid (xdrs, objp->uuid))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_nonnull_storage_vol (XDR *xdrs, remote_nonnull_storage_vol *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_remote_nonnull_string (xdrs, &objp->name))
+ return FALSE;
+ if (!xdr_remote_nonnull_string (xdrs, &objp->key))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_remote_domain (XDR *xdrs, remote_domain *objp)
{
@@ -71,6 +95,24 @@ xdr_remote_network (XDR *xdrs, remote_ne
{
if (!xdr_pointer (xdrs, (char **)objp, sizeof (remote_nonnull_network), (xdrproc_t)
xdr_remote_nonnull_network))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool (XDR *xdrs, remote_storage_pool *objp)
+{
+
+ if (!xdr_pointer (xdrs, (char **)objp, sizeof (remote_nonnull_storage_pool),
(xdrproc_t) xdr_remote_nonnull_storage_pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol (XDR *xdrs, remote_storage_vol *objp)
+{
+
+ if (!xdr_pointer (xdrs, (char **)objp, sizeof (remote_nonnull_storage_vol), (xdrproc_t)
xdr_remote_nonnull_storage_vol))
return FALSE;
return TRUE;
}
@@ -1318,6 +1360,500 @@ xdr_remote_auth_polkit_ret (XDR *xdrs, r
}
bool_t
+xdr_remote_num_of_storage_pools_ret (XDR *xdrs, remote_num_of_storage_pools_ret *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->num))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_list_storage_pools_args (XDR *xdrs, remote_list_storage_pools_args *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->maxnames))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_list_storage_pools_ret (XDR *xdrs, remote_list_storage_pools_ret *objp)
+{
+ char **objp_cpp0 = (char **) (void *) &objp->names.names_val;
+
+ if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->names.names_len,
REMOTE_STORAGE_POOL_NAME_LIST_MAX,
+ sizeof (remote_nonnull_string), (xdrproc_t) xdr_remote_nonnull_string))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_num_of_defined_storage_pools_ret (XDR *xdrs,
remote_num_of_defined_storage_pools_ret *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->num))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_list_defined_storage_pools_args (XDR *xdrs,
remote_list_defined_storage_pools_args *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->maxnames))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_list_defined_storage_pools_ret (XDR *xdrs,
remote_list_defined_storage_pools_ret *objp)
+{
+ char **objp_cpp0 = (char **) (void *) &objp->names.names_val;
+
+ if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->names.names_len,
REMOTE_STORAGE_POOL_NAME_LIST_MAX,
+ sizeof (remote_nonnull_string), (xdrproc_t) xdr_remote_nonnull_string))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_discover_storage_pools_args (XDR *xdrs, remote_discover_storage_pools_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->hostname))
+ return FALSE;
+ if (!xdr_remote_nonnull_string (xdrs, &objp->type))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_discover_storage_pools_ret (XDR *xdrs, remote_discover_storage_pools_ret
*objp)
+{
+ char **objp_cpp0 = (char **) (void *) &objp->xml.xml_val;
+
+ if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->xml.xml_len,
REMOTE_STORAGE_POOL_NAME_LIST_MAX,
+ sizeof (remote_nonnull_string), (xdrproc_t) xdr_remote_nonnull_string))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_lookup_by_uuid_args (XDR *xdrs,
remote_storage_pool_lookup_by_uuid_args *objp)
+{
+
+ if (!xdr_remote_uuid (xdrs, objp->uuid))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_lookup_by_uuid_ret (XDR *xdrs,
remote_storage_pool_lookup_by_uuid_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_lookup_by_name_args (XDR *xdrs,
remote_storage_pool_lookup_by_name_args *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->name))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_lookup_by_name_ret (XDR *xdrs,
remote_storage_pool_lookup_by_name_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_lookup_by_volume_args (XDR *xdrs,
remote_storage_pool_lookup_by_volume_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_lookup_by_volume_ret (XDR *xdrs,
remote_storage_pool_lookup_by_volume_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_create_xml_args (XDR *xdrs, remote_storage_pool_create_xml_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_create_xml_ret (XDR *xdrs, remote_storage_pool_create_xml_ret
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_define_xml_args (XDR *xdrs, remote_storage_pool_define_xml_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_define_xml_ret (XDR *xdrs, remote_storage_pool_define_xml_ret
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_build_args (XDR *xdrs, remote_storage_pool_build_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_undefine_args (XDR *xdrs, remote_storage_pool_undefine_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_create_args (XDR *xdrs, remote_storage_pool_create_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_destroy_args (XDR *xdrs, remote_storage_pool_destroy_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_delete_args (XDR *xdrs, remote_storage_pool_delete_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_refresh_args (XDR *xdrs, remote_storage_pool_refresh_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_dump_xml_args (XDR *xdrs, remote_storage_pool_dump_xml_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_dump_xml_ret (XDR *xdrs, remote_storage_pool_dump_xml_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_get_info_args (XDR *xdrs, remote_storage_pool_get_info_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_get_info_ret (XDR *xdrs, remote_storage_pool_get_info_ret *objp)
+{
+
+ if (!xdr_u_char (xdrs, &objp->state))
+ return FALSE;
+ if (!xdr_u_quad_t (xdrs, &objp->capacity))
+ return FALSE;
+ if (!xdr_u_quad_t (xdrs, &objp->allocation))
+ return FALSE;
+ if (!xdr_u_quad_t (xdrs, &objp->available))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_get_autostart_args (XDR *xdrs,
remote_storage_pool_get_autostart_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_get_autostart_ret (XDR *xdrs,
remote_storage_pool_get_autostart_ret *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->autostart))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_set_autostart_args (XDR *xdrs,
remote_storage_pool_set_autostart_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->autostart))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_num_of_volumes_args (XDR *xdrs,
remote_storage_pool_num_of_volumes_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_num_of_volumes_ret (XDR *xdrs,
remote_storage_pool_num_of_volumes_ret *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->num))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_list_volumes_args (XDR *xdrs,
remote_storage_pool_list_volumes_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->maxnames))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_pool_list_volumes_ret (XDR *xdrs, remote_storage_pool_list_volumes_ret
*objp)
+{
+ char **objp_cpp0 = (char **) (void *) &objp->names.names_val;
+
+ if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->names.names_len,
REMOTE_STORAGE_VOL_NAME_LIST_MAX,
+ sizeof (remote_nonnull_string), (xdrproc_t) xdr_remote_nonnull_string))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_name_args (XDR *xdrs,
remote_storage_vol_lookup_by_name_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_remote_nonnull_string (xdrs, &objp->name))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_name_ret (XDR *xdrs,
remote_storage_vol_lookup_by_name_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_key_args (XDR *xdrs,
remote_storage_vol_lookup_by_key_args *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->key))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_key_ret (XDR *xdrs, remote_storage_vol_lookup_by_key_ret
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_path_args (XDR *xdrs,
remote_storage_vol_lookup_by_path_args *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->path))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_path_ret (XDR *xdrs,
remote_storage_vol_lookup_by_path_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_create_xml_args (XDR *xdrs, remote_storage_vol_create_xml_args
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_create_xml_ret (XDR *xdrs, remote_storage_vol_create_xml_ret
*objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_delete_args (XDR *xdrs, remote_storage_vol_delete_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_dump_xml_args (XDR *xdrs, remote_storage_vol_dump_xml_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->flags))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_dump_xml_ret (XDR *xdrs, remote_storage_vol_dump_xml_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_get_info_args (XDR *xdrs, remote_storage_vol_get_info_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_get_info_ret (XDR *xdrs, remote_storage_vol_get_info_ret *objp)
+{
+
+ if (!xdr_char (xdrs, &objp->type))
+ return FALSE;
+ if (!xdr_u_quad_t (xdrs, &objp->capacity))
+ return FALSE;
+ if (!xdr_u_quad_t (xdrs, &objp->allocation))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_get_path_args (XDR *xdrs, remote_storage_vol_get_path_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_get_path_ret (XDR *xdrs, remote_storage_vol_get_path_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_string (xdrs, &objp->name))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_remote_procedure (XDR *xdrs, remote_procedure *objp)
{
diff -r 871911d8862d qemud/remote_protocol.h
--- a/qemud/remote_protocol.h Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote_protocol.h Thu Feb 07 12:33:21 2008 -0500
@@ -27,6 +27,8 @@ typedef remote_nonnull_string *remote_st
#define REMOTE_CPUMAPS_MAX 16384
#define REMOTE_MIGRATE_COOKIE_MAX 256
#define REMOTE_NETWORK_NAME_LIST_MAX 256
+#define REMOTE_STORAGE_POOL_NAME_LIST_MAX 256
+#define REMOTE_STORAGE_VOL_NAME_LIST_MAX 1024
#define REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX 16
#define REMOTE_AUTH_SASL_DATA_MAX 65536
#define REMOTE_AUTH_TYPE_LIST_MAX 20
@@ -46,9 +48,26 @@ struct remote_nonnull_network {
};
typedef struct remote_nonnull_network remote_nonnull_network;
+struct remote_nonnull_storage_pool {
+ remote_nonnull_string name;
+ remote_uuid uuid;
+};
+typedef struct remote_nonnull_storage_pool remote_nonnull_storage_pool;
+
+struct remote_nonnull_storage_vol {
+ remote_nonnull_string pool;
+ remote_nonnull_string name;
+ remote_nonnull_string key;
+};
+typedef struct remote_nonnull_storage_vol remote_nonnull_storage_vol;
+
typedef remote_nonnull_domain *remote_domain;
typedef remote_nonnull_network *remote_network;
+
+typedef remote_nonnull_storage_pool *remote_storage_pool;
+
+typedef remote_nonnull_storage_vol *remote_storage_vol;
struct remote_error {
int code;
@@ -725,6 +744,286 @@ struct remote_auth_polkit_ret {
int complete;
};
typedef struct remote_auth_polkit_ret remote_auth_polkit_ret;
+
+struct remote_num_of_storage_pools_ret {
+ int num;
+};
+typedef struct remote_num_of_storage_pools_ret remote_num_of_storage_pools_ret;
+
+struct remote_list_storage_pools_args {
+ int maxnames;
+};
+typedef struct remote_list_storage_pools_args remote_list_storage_pools_args;
+
+struct remote_list_storage_pools_ret {
+ struct {
+ u_int names_len;
+ remote_nonnull_string *names_val;
+ } names;
+};
+typedef struct remote_list_storage_pools_ret remote_list_storage_pools_ret;
+
+struct remote_num_of_defined_storage_pools_ret {
+ int num;
+};
+typedef struct remote_num_of_defined_storage_pools_ret
remote_num_of_defined_storage_pools_ret;
+
+struct remote_list_defined_storage_pools_args {
+ int maxnames;
+};
+typedef struct remote_list_defined_storage_pools_args
remote_list_defined_storage_pools_args;
+
+struct remote_list_defined_storage_pools_ret {
+ struct {
+ u_int names_len;
+ remote_nonnull_string *names_val;
+ } names;
+};
+typedef struct remote_list_defined_storage_pools_ret
remote_list_defined_storage_pools_ret;
+
+struct remote_discover_storage_pools_args {
+ remote_nonnull_string hostname;
+ remote_nonnull_string type;
+ u_int flags;
+};
+typedef struct remote_discover_storage_pools_args remote_discover_storage_pools_args;
+
+struct remote_discover_storage_pools_ret {
+ struct {
+ u_int xml_len;
+ remote_nonnull_string *xml_val;
+ } xml;
+};
+typedef struct remote_discover_storage_pools_ret remote_discover_storage_pools_ret;
+
+struct remote_storage_pool_lookup_by_uuid_args {
+ remote_uuid uuid;
+};
+typedef struct remote_storage_pool_lookup_by_uuid_args
remote_storage_pool_lookup_by_uuid_args;
+
+struct remote_storage_pool_lookup_by_uuid_ret {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_lookup_by_uuid_ret
remote_storage_pool_lookup_by_uuid_ret;
+
+struct remote_storage_pool_lookup_by_name_args {
+ remote_nonnull_string name;
+};
+typedef struct remote_storage_pool_lookup_by_name_args
remote_storage_pool_lookup_by_name_args;
+
+struct remote_storage_pool_lookup_by_name_ret {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_lookup_by_name_ret
remote_storage_pool_lookup_by_name_ret;
+
+struct remote_storage_pool_lookup_by_volume_args {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_pool_lookup_by_volume_args
remote_storage_pool_lookup_by_volume_args;
+
+struct remote_storage_pool_lookup_by_volume_ret {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_lookup_by_volume_ret
remote_storage_pool_lookup_by_volume_ret;
+
+struct remote_storage_pool_create_xml_args {
+ remote_nonnull_string xml;
+};
+typedef struct remote_storage_pool_create_xml_args remote_storage_pool_create_xml_args;
+
+struct remote_storage_pool_create_xml_ret {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_create_xml_ret remote_storage_pool_create_xml_ret;
+
+struct remote_storage_pool_define_xml_args {
+ remote_nonnull_string xml;
+};
+typedef struct remote_storage_pool_define_xml_args remote_storage_pool_define_xml_args;
+
+struct remote_storage_pool_define_xml_ret {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_define_xml_ret remote_storage_pool_define_xml_ret;
+
+struct remote_storage_pool_build_args {
+ remote_nonnull_storage_pool pool;
+ u_int flags;
+};
+typedef struct remote_storage_pool_build_args remote_storage_pool_build_args;
+
+struct remote_storage_pool_undefine_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_undefine_args remote_storage_pool_undefine_args;
+
+struct remote_storage_pool_create_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_create_args remote_storage_pool_create_args;
+
+struct remote_storage_pool_destroy_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_destroy_args remote_storage_pool_destroy_args;
+
+struct remote_storage_pool_delete_args {
+ remote_nonnull_storage_pool pool;
+ u_int flags;
+};
+typedef struct remote_storage_pool_delete_args remote_storage_pool_delete_args;
+
+struct remote_storage_pool_refresh_args {
+ remote_nonnull_storage_pool pool;
+ u_int flags;
+};
+typedef struct remote_storage_pool_refresh_args remote_storage_pool_refresh_args;
+
+struct remote_storage_pool_dump_xml_args {
+ remote_nonnull_storage_pool pool;
+ u_int flags;
+};
+typedef struct remote_storage_pool_dump_xml_args remote_storage_pool_dump_xml_args;
+
+struct remote_storage_pool_dump_xml_ret {
+ remote_nonnull_string xml;
+};
+typedef struct remote_storage_pool_dump_xml_ret remote_storage_pool_dump_xml_ret;
+
+struct remote_storage_pool_get_info_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_get_info_args remote_storage_pool_get_info_args;
+
+struct remote_storage_pool_get_info_ret {
+ u_char state;
+ u_quad_t capacity;
+ u_quad_t allocation;
+ u_quad_t available;
+};
+typedef struct remote_storage_pool_get_info_ret remote_storage_pool_get_info_ret;
+
+struct remote_storage_pool_get_autostart_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_get_autostart_args
remote_storage_pool_get_autostart_args;
+
+struct remote_storage_pool_get_autostart_ret {
+ int autostart;
+};
+typedef struct remote_storage_pool_get_autostart_ret
remote_storage_pool_get_autostart_ret;
+
+struct remote_storage_pool_set_autostart_args {
+ remote_nonnull_storage_pool pool;
+ int autostart;
+};
+typedef struct remote_storage_pool_set_autostart_args
remote_storage_pool_set_autostart_args;
+
+struct remote_storage_pool_num_of_volumes_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_num_of_volumes_args
remote_storage_pool_num_of_volumes_args;
+
+struct remote_storage_pool_num_of_volumes_ret {
+ int num;
+};
+typedef struct remote_storage_pool_num_of_volumes_ret
remote_storage_pool_num_of_volumes_ret;
+
+struct remote_storage_pool_list_volumes_args {
+ remote_nonnull_storage_pool pool;
+ int maxnames;
+};
+typedef struct remote_storage_pool_list_volumes_args
remote_storage_pool_list_volumes_args;
+
+struct remote_storage_pool_list_volumes_ret {
+ struct {
+ u_int names_len;
+ remote_nonnull_string *names_val;
+ } names;
+};
+typedef struct remote_storage_pool_list_volumes_ret
remote_storage_pool_list_volumes_ret;
+
+struct remote_storage_vol_lookup_by_name_args {
+ remote_nonnull_storage_pool pool;
+ remote_nonnull_string name;
+};
+typedef struct remote_storage_vol_lookup_by_name_args
remote_storage_vol_lookup_by_name_args;
+
+struct remote_storage_vol_lookup_by_name_ret {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_lookup_by_name_ret
remote_storage_vol_lookup_by_name_ret;
+
+struct remote_storage_vol_lookup_by_key_args {
+ remote_nonnull_string key;
+};
+typedef struct remote_storage_vol_lookup_by_key_args
remote_storage_vol_lookup_by_key_args;
+
+struct remote_storage_vol_lookup_by_key_ret {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_lookup_by_key_ret
remote_storage_vol_lookup_by_key_ret;
+
+struct remote_storage_vol_lookup_by_path_args {
+ remote_nonnull_string path;
+};
+typedef struct remote_storage_vol_lookup_by_path_args
remote_storage_vol_lookup_by_path_args;
+
+struct remote_storage_vol_lookup_by_path_ret {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_lookup_by_path_ret
remote_storage_vol_lookup_by_path_ret;
+
+struct remote_storage_vol_create_xml_args {
+ remote_nonnull_storage_pool pool;
+ remote_nonnull_string xml;
+ u_int flags;
+};
+typedef struct remote_storage_vol_create_xml_args remote_storage_vol_create_xml_args;
+
+struct remote_storage_vol_create_xml_ret {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_create_xml_ret remote_storage_vol_create_xml_ret;
+
+struct remote_storage_vol_delete_args {
+ remote_nonnull_storage_vol vol;
+ u_int flags;
+};
+typedef struct remote_storage_vol_delete_args remote_storage_vol_delete_args;
+
+struct remote_storage_vol_dump_xml_args {
+ remote_nonnull_storage_vol vol;
+ u_int flags;
+};
+typedef struct remote_storage_vol_dump_xml_args remote_storage_vol_dump_xml_args;
+
+struct remote_storage_vol_dump_xml_ret {
+ remote_nonnull_string xml;
+};
+typedef struct remote_storage_vol_dump_xml_ret remote_storage_vol_dump_xml_ret;
+
+struct remote_storage_vol_get_info_args {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_get_info_args remote_storage_vol_get_info_args;
+
+struct remote_storage_vol_get_info_ret {
+ char type;
+ u_quad_t capacity;
+ u_quad_t allocation;
+};
+typedef struct remote_storage_vol_get_info_ret remote_storage_vol_get_info_ret;
+
+struct remote_storage_vol_get_path_args {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_get_path_args remote_storage_vol_get_path_args;
+
+struct remote_storage_vol_get_path_ret {
+ remote_nonnull_string name;
+};
+typedef struct remote_storage_vol_get_path_ret remote_storage_vol_get_path_ret;
#define REMOTE_PROGRAM 0x20008086
#define REMOTE_PROTOCOL_VERSION 1
@@ -799,6 +1098,36 @@ enum remote_procedure {
REMOTE_PROC_AUTH_SASL_START = 68,
REMOTE_PROC_AUTH_SASL_STEP = 69,
REMOTE_PROC_AUTH_POLKIT = 70,
+ REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71,
+ REMOTE_PROC_LIST_STORAGE_POOLS = 72,
+ REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73,
+ REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74,
+ REMOTE_PROC_DISCOVER_STORAGE_POOLS = 75,
+ REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76,
+ REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77,
+ REMOTE_PROC_STORAGE_POOL_CREATE = 78,
+ REMOTE_PROC_STORAGE_POOL_BUILD = 79,
+ REMOTE_PROC_STORAGE_POOL_DESTROY = 80,
+ REMOTE_PROC_STORAGE_POOL_DELETE = 81,
+ REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82,
+ REMOTE_PROC_STORAGE_POOL_REFRESH = 83,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86,
+ REMOTE_PROC_STORAGE_POOL_GET_INFO = 87,
+ REMOTE_PROC_STORAGE_POOL_DUMP_XML = 88,
+ REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89,
+ REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90,
+ REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91,
+ REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92,
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93,
+ REMOTE_PROC_STORAGE_VOL_DELETE = 94,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97,
+ REMOTE_PROC_STORAGE_VOL_GET_INFO = 98,
+ REMOTE_PROC_STORAGE_VOL_DUMP_XML = 99,
+ REMOTE_PROC_STORAGE_VOL_GET_PATH = 100,
};
typedef enum remote_procedure remote_procedure;
@@ -834,8 +1163,12 @@ extern bool_t xdr_remote_uuid (XDR *, r
extern bool_t xdr_remote_uuid (XDR *, remote_uuid);
extern bool_t xdr_remote_nonnull_domain (XDR *, remote_nonnull_domain*);
extern bool_t xdr_remote_nonnull_network (XDR *, remote_nonnull_network*);
+extern bool_t xdr_remote_nonnull_storage_pool (XDR *, remote_nonnull_storage_pool*);
+extern bool_t xdr_remote_nonnull_storage_vol (XDR *, remote_nonnull_storage_vol*);
extern bool_t xdr_remote_domain (XDR *, remote_domain*);
extern bool_t xdr_remote_network (XDR *, remote_network*);
+extern bool_t xdr_remote_storage_pool (XDR *, remote_storage_pool*);
+extern bool_t xdr_remote_storage_vol (XDR *, remote_storage_vol*);
extern bool_t xdr_remote_error (XDR *, remote_error*);
extern bool_t xdr_remote_auth_type (XDR *, remote_auth_type*);
extern bool_t xdr_remote_vcpu_info (XDR *, remote_vcpu_info*);
@@ -943,6 +1276,56 @@ extern bool_t xdr_remote_auth_sasl_step
extern bool_t xdr_remote_auth_sasl_step_args (XDR *, remote_auth_sasl_step_args*);
extern bool_t xdr_remote_auth_sasl_step_ret (XDR *, remote_auth_sasl_step_ret*);
extern bool_t xdr_remote_auth_polkit_ret (XDR *, remote_auth_polkit_ret*);
+extern bool_t xdr_remote_num_of_storage_pools_ret (XDR *,
remote_num_of_storage_pools_ret*);
+extern bool_t xdr_remote_list_storage_pools_args (XDR *,
remote_list_storage_pools_args*);
+extern bool_t xdr_remote_list_storage_pools_ret (XDR *,
remote_list_storage_pools_ret*);
+extern bool_t xdr_remote_num_of_defined_storage_pools_ret (XDR *,
remote_num_of_defined_storage_pools_ret*);
+extern bool_t xdr_remote_list_defined_storage_pools_args (XDR *,
remote_list_defined_storage_pools_args*);
+extern bool_t xdr_remote_list_defined_storage_pools_ret (XDR *,
remote_list_defined_storage_pools_ret*);
+extern bool_t xdr_remote_discover_storage_pools_args (XDR *,
remote_discover_storage_pools_args*);
+extern bool_t xdr_remote_discover_storage_pools_ret (XDR *,
remote_discover_storage_pools_ret*);
+extern bool_t xdr_remote_storage_pool_lookup_by_uuid_args (XDR *,
remote_storage_pool_lookup_by_uuid_args*);
+extern bool_t xdr_remote_storage_pool_lookup_by_uuid_ret (XDR *,
remote_storage_pool_lookup_by_uuid_ret*);
+extern bool_t xdr_remote_storage_pool_lookup_by_name_args (XDR *,
remote_storage_pool_lookup_by_name_args*);
+extern bool_t xdr_remote_storage_pool_lookup_by_name_ret (XDR *,
remote_storage_pool_lookup_by_name_ret*);
+extern bool_t xdr_remote_storage_pool_lookup_by_volume_args (XDR *,
remote_storage_pool_lookup_by_volume_args*);
+extern bool_t xdr_remote_storage_pool_lookup_by_volume_ret (XDR *,
remote_storage_pool_lookup_by_volume_ret*);
+extern bool_t xdr_remote_storage_pool_create_xml_args (XDR *,
remote_storage_pool_create_xml_args*);
+extern bool_t xdr_remote_storage_pool_create_xml_ret (XDR *,
remote_storage_pool_create_xml_ret*);
+extern bool_t xdr_remote_storage_pool_define_xml_args (XDR *,
remote_storage_pool_define_xml_args*);
+extern bool_t xdr_remote_storage_pool_define_xml_ret (XDR *,
remote_storage_pool_define_xml_ret*);
+extern bool_t xdr_remote_storage_pool_build_args (XDR *,
remote_storage_pool_build_args*);
+extern bool_t xdr_remote_storage_pool_undefine_args (XDR *,
remote_storage_pool_undefine_args*);
+extern bool_t xdr_remote_storage_pool_create_args (XDR *,
remote_storage_pool_create_args*);
+extern bool_t xdr_remote_storage_pool_destroy_args (XDR *,
remote_storage_pool_destroy_args*);
+extern bool_t xdr_remote_storage_pool_delete_args (XDR *,
remote_storage_pool_delete_args*);
+extern bool_t xdr_remote_storage_pool_refresh_args (XDR *,
remote_storage_pool_refresh_args*);
+extern bool_t xdr_remote_storage_pool_dump_xml_args (XDR *,
remote_storage_pool_dump_xml_args*);
+extern bool_t xdr_remote_storage_pool_dump_xml_ret (XDR *,
remote_storage_pool_dump_xml_ret*);
+extern bool_t xdr_remote_storage_pool_get_info_args (XDR *,
remote_storage_pool_get_info_args*);
+extern bool_t xdr_remote_storage_pool_get_info_ret (XDR *,
remote_storage_pool_get_info_ret*);
+extern bool_t xdr_remote_storage_pool_get_autostart_args (XDR *,
remote_storage_pool_get_autostart_args*);
+extern bool_t xdr_remote_storage_pool_get_autostart_ret (XDR *,
remote_storage_pool_get_autostart_ret*);
+extern bool_t xdr_remote_storage_pool_set_autostart_args (XDR *,
remote_storage_pool_set_autostart_args*);
+extern bool_t xdr_remote_storage_pool_num_of_volumes_args (XDR *,
remote_storage_pool_num_of_volumes_args*);
+extern bool_t xdr_remote_storage_pool_num_of_volumes_ret (XDR *,
remote_storage_pool_num_of_volumes_ret*);
+extern bool_t xdr_remote_storage_pool_list_volumes_args (XDR *,
remote_storage_pool_list_volumes_args*);
+extern bool_t xdr_remote_storage_pool_list_volumes_ret (XDR *,
remote_storage_pool_list_volumes_ret*);
+extern bool_t xdr_remote_storage_vol_lookup_by_name_args (XDR *,
remote_storage_vol_lookup_by_name_args*);
+extern bool_t xdr_remote_storage_vol_lookup_by_name_ret (XDR *,
remote_storage_vol_lookup_by_name_ret*);
+extern bool_t xdr_remote_storage_vol_lookup_by_key_args (XDR *,
remote_storage_vol_lookup_by_key_args*);
+extern bool_t xdr_remote_storage_vol_lookup_by_key_ret (XDR *,
remote_storage_vol_lookup_by_key_ret*);
+extern bool_t xdr_remote_storage_vol_lookup_by_path_args (XDR *,
remote_storage_vol_lookup_by_path_args*);
+extern bool_t xdr_remote_storage_vol_lookup_by_path_ret (XDR *,
remote_storage_vol_lookup_by_path_ret*);
+extern bool_t xdr_remote_storage_vol_create_xml_args (XDR *,
remote_storage_vol_create_xml_args*);
+extern bool_t xdr_remote_storage_vol_create_xml_ret (XDR *,
remote_storage_vol_create_xml_ret*);
+extern bool_t xdr_remote_storage_vol_delete_args (XDR *,
remote_storage_vol_delete_args*);
+extern bool_t xdr_remote_storage_vol_dump_xml_args (XDR *,
remote_storage_vol_dump_xml_args*);
+extern bool_t xdr_remote_storage_vol_dump_xml_ret (XDR *,
remote_storage_vol_dump_xml_ret*);
+extern bool_t xdr_remote_storage_vol_get_info_args (XDR *,
remote_storage_vol_get_info_args*);
+extern bool_t xdr_remote_storage_vol_get_info_ret (XDR *,
remote_storage_vol_get_info_ret*);
+extern bool_t xdr_remote_storage_vol_get_path_args (XDR *,
remote_storage_vol_get_path_args*);
+extern bool_t xdr_remote_storage_vol_get_path_ret (XDR *,
remote_storage_vol_get_path_ret*);
extern bool_t xdr_remote_procedure (XDR *, remote_procedure*);
extern bool_t xdr_remote_message_direction (XDR *, remote_message_direction*);
extern bool_t xdr_remote_message_status (XDR *, remote_message_status*);
@@ -954,8 +1337,12 @@ extern bool_t xdr_remote_uuid ();
extern bool_t xdr_remote_uuid ();
extern bool_t xdr_remote_nonnull_domain ();
extern bool_t xdr_remote_nonnull_network ();
+extern bool_t xdr_remote_nonnull_storage_pool ();
+extern bool_t xdr_remote_nonnull_storage_vol ();
extern bool_t xdr_remote_domain ();
extern bool_t xdr_remote_network ();
+extern bool_t xdr_remote_storage_pool ();
+extern bool_t xdr_remote_storage_vol ();
extern bool_t xdr_remote_error ();
extern bool_t xdr_remote_auth_type ();
extern bool_t xdr_remote_vcpu_info ();
@@ -1063,6 +1450,56 @@ extern bool_t xdr_remote_auth_sasl_step_
extern bool_t xdr_remote_auth_sasl_step_args ();
extern bool_t xdr_remote_auth_sasl_step_ret ();
extern bool_t xdr_remote_auth_polkit_ret ();
+extern bool_t xdr_remote_num_of_storage_pools_ret ();
+extern bool_t xdr_remote_list_storage_pools_args ();
+extern bool_t xdr_remote_list_storage_pools_ret ();
+extern bool_t xdr_remote_num_of_defined_storage_pools_ret ();
+extern bool_t xdr_remote_list_defined_storage_pools_args ();
+extern bool_t xdr_remote_list_defined_storage_pools_ret ();
+extern bool_t xdr_remote_discover_storage_pools_args ();
+extern bool_t xdr_remote_discover_storage_pools_ret ();
+extern bool_t xdr_remote_storage_pool_lookup_by_uuid_args ();
+extern bool_t xdr_remote_storage_pool_lookup_by_uuid_ret ();
+extern bool_t xdr_remote_storage_pool_lookup_by_name_args ();
+extern bool_t xdr_remote_storage_pool_lookup_by_name_ret ();
+extern bool_t xdr_remote_storage_pool_lookup_by_volume_args ();
+extern bool_t xdr_remote_storage_pool_lookup_by_volume_ret ();
+extern bool_t xdr_remote_storage_pool_create_xml_args ();
+extern bool_t xdr_remote_storage_pool_create_xml_ret ();
+extern bool_t xdr_remote_storage_pool_define_xml_args ();
+extern bool_t xdr_remote_storage_pool_define_xml_ret ();
+extern bool_t xdr_remote_storage_pool_build_args ();
+extern bool_t xdr_remote_storage_pool_undefine_args ();
+extern bool_t xdr_remote_storage_pool_create_args ();
+extern bool_t xdr_remote_storage_pool_destroy_args ();
+extern bool_t xdr_remote_storage_pool_delete_args ();
+extern bool_t xdr_remote_storage_pool_refresh_args ();
+extern bool_t xdr_remote_storage_pool_dump_xml_args ();
+extern bool_t xdr_remote_storage_pool_dump_xml_ret ();
+extern bool_t xdr_remote_storage_pool_get_info_args ();
+extern bool_t xdr_remote_storage_pool_get_info_ret ();
+extern bool_t xdr_remote_storage_pool_get_autostart_args ();
+extern bool_t xdr_remote_storage_pool_get_autostart_ret ();
+extern bool_t xdr_remote_storage_pool_set_autostart_args ();
+extern bool_t xdr_remote_storage_pool_num_of_volumes_args ();
+extern bool_t xdr_remote_storage_pool_num_of_volumes_ret ();
+extern bool_t xdr_remote_storage_pool_list_volumes_args ();
+extern bool_t xdr_remote_storage_pool_list_volumes_ret ();
+extern bool_t xdr_remote_storage_vol_lookup_by_name_args ();
+extern bool_t xdr_remote_storage_vol_lookup_by_name_ret ();
+extern bool_t xdr_remote_storage_vol_lookup_by_key_args ();
+extern bool_t xdr_remote_storage_vol_lookup_by_key_ret ();
+extern bool_t xdr_remote_storage_vol_lookup_by_path_args ();
+extern bool_t xdr_remote_storage_vol_lookup_by_path_ret ();
+extern bool_t xdr_remote_storage_vol_create_xml_args ();
+extern bool_t xdr_remote_storage_vol_create_xml_ret ();
+extern bool_t xdr_remote_storage_vol_delete_args ();
+extern bool_t xdr_remote_storage_vol_dump_xml_args ();
+extern bool_t xdr_remote_storage_vol_dump_xml_ret ();
+extern bool_t xdr_remote_storage_vol_get_info_args ();
+extern bool_t xdr_remote_storage_vol_get_info_ret ();
+extern bool_t xdr_remote_storage_vol_get_path_args ();
+extern bool_t xdr_remote_storage_vol_get_path_ret ();
extern bool_t xdr_remote_procedure ();
extern bool_t xdr_remote_message_direction ();
extern bool_t xdr_remote_message_status ();
diff -r 871911d8862d qemud/remote_protocol.x
--- a/qemud/remote_protocol.x Thu Feb 07 12:33:16 2008 -0500
+++ b/qemud/remote_protocol.x Thu Feb 07 12:33:21 2008 -0500
@@ -78,6 +78,12 @@ const REMOTE_MIGRATE_COOKIE_MAX = 256;
/* Upper limit on lists of network names. */
const REMOTE_NETWORK_NAME_LIST_MAX = 256;
+/* Upper limit on lists of storage pool names. */
+const REMOTE_STORAGE_POOL_NAME_LIST_MAX = 256;
+
+/* Upper limit on lists of storage vol names. */
+const REMOTE_STORAGE_VOL_NAME_LIST_MAX = 1024;
+
/* Upper limit on list of scheduler parameters. */
const REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX = 16;
@@ -103,9 +109,24 @@ struct remote_nonnull_network {
remote_uuid uuid;
};
+/* A storage pool which may not be NULL. */
+struct remote_nonnull_storage_pool {
+ remote_nonnull_string name;
+ remote_uuid uuid;
+};
+
+/* A storage vol which may not be NULL. */
+struct remote_nonnull_storage_vol {
+ remote_nonnull_string pool;
+ remote_nonnull_string name;
+ remote_nonnull_string key;
+};
+
/* A domain or network which may be NULL. */
typedef remote_nonnull_domain *remote_domain;
typedef remote_nonnull_network *remote_network;
+typedef remote_nonnull_storage_pool *remote_storage_pool;
+typedef remote_nonnull_storage_vol *remote_storage_vol;
/* Error message. See <virterror.h> for explanation of fields. */
@@ -626,6 +647,7 @@ struct remote_network_set_autostart_args
int autostart;
};
+
struct remote_auth_list_ret {
remote_auth_type types<REMOTE_AUTH_TYPE_LIST_MAX>;
};
@@ -659,6 +681,232 @@ struct remote_auth_sasl_step_ret {
struct remote_auth_polkit_ret {
int complete;
+};
+
+
+
+/* Storage pool calls: */
+
+struct remote_num_of_storage_pools_ret {
+ int num;
+};
+
+struct remote_list_storage_pools_args {
+ int maxnames;
+};
+
+struct remote_list_storage_pools_ret {
+ remote_nonnull_string names<REMOTE_STORAGE_POOL_NAME_LIST_MAX>;
+};
+
+struct remote_num_of_defined_storage_pools_ret {
+ int num;
+};
+
+struct remote_list_defined_storage_pools_args {
+ int maxnames;
+};
+
+struct remote_list_defined_storage_pools_ret {
+ remote_nonnull_string names<REMOTE_STORAGE_POOL_NAME_LIST_MAX>;
+};
+
+struct remote_discover_storage_pools_args {
+ remote_nonnull_string hostname;
+ remote_nonnull_string type;
+ unsigned flags;
+};
+
+struct remote_discover_storage_pools_ret {
+ remote_nonnull_string xml<REMOTE_STORAGE_POOL_NAME_LIST_MAX>;
+};
+
+struct remote_storage_pool_lookup_by_uuid_args {
+ remote_uuid uuid;
+};
+
+struct remote_storage_pool_lookup_by_uuid_ret {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_lookup_by_name_args {
+ remote_nonnull_string name;
+};
+
+struct remote_storage_pool_lookup_by_name_ret {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_lookup_by_volume_args {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_pool_lookup_by_volume_ret {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_create_xml_args {
+ remote_nonnull_string xml;
+};
+
+struct remote_storage_pool_create_xml_ret {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_define_xml_args {
+ remote_nonnull_string xml;
+};
+
+struct remote_storage_pool_define_xml_ret {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_build_args {
+ remote_nonnull_storage_pool pool;
+ unsigned flags;
+};
+
+struct remote_storage_pool_undefine_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_create_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_destroy_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_delete_args {
+ remote_nonnull_storage_pool pool;
+ unsigned flags;
+};
+
+struct remote_storage_pool_refresh_args {
+ remote_nonnull_storage_pool pool;
+ unsigned flags;
+};
+
+struct remote_storage_pool_dump_xml_args {
+ remote_nonnull_storage_pool pool;
+ unsigned flags;
+};
+
+struct remote_storage_pool_dump_xml_ret {
+ remote_nonnull_string xml;
+};
+
+struct remote_storage_pool_get_info_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_get_info_ret {
+ unsigned char state;
+ unsigned hyper capacity;
+ unsigned hyper allocation;
+ unsigned hyper available;
+};
+
+struct remote_storage_pool_get_autostart_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_get_autostart_ret {
+ int autostart;
+};
+
+struct remote_storage_pool_set_autostart_args {
+ remote_nonnull_storage_pool pool;
+ int autostart;
+};
+
+struct remote_storage_pool_num_of_volumes_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_num_of_volumes_ret {
+ int num;
+};
+
+struct remote_storage_pool_list_volumes_args {
+ remote_nonnull_storage_pool pool;
+ int maxnames;
+};
+
+struct remote_storage_pool_list_volumes_ret {
+ remote_nonnull_string names<REMOTE_STORAGE_VOL_NAME_LIST_MAX>;
+};
+
+
+
+/* Storage vol calls: */
+
+struct remote_storage_vol_lookup_by_name_args {
+ remote_nonnull_storage_pool pool;
+ remote_nonnull_string name;
+};
+
+struct remote_storage_vol_lookup_by_name_ret {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_lookup_by_key_args {
+ remote_nonnull_string key;
+};
+
+struct remote_storage_vol_lookup_by_key_ret {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_lookup_by_path_args {
+ remote_nonnull_string path;
+};
+
+struct remote_storage_vol_lookup_by_path_ret {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_create_xml_args {
+ remote_nonnull_storage_pool pool;
+ remote_nonnull_string xml;
+ unsigned flags;
+};
+
+struct remote_storage_vol_create_xml_ret {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_delete_args {
+ remote_nonnull_storage_vol vol;
+ unsigned flags;
+};
+
+struct remote_storage_vol_dump_xml_args {
+ remote_nonnull_storage_vol vol;
+ unsigned flags;
+};
+
+struct remote_storage_vol_dump_xml_ret {
+ remote_nonnull_string xml;
+};
+
+struct remote_storage_vol_get_info_args {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_get_info_ret {
+ char type;
+ unsigned hyper capacity;
+ unsigned hyper allocation;
+};
+
+struct remote_storage_vol_get_path_args {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_get_path_ret {
+ remote_nonnull_string name;
};
/*----- Protocol. -----*/
@@ -678,6 +926,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8,
REMOTE_PROC_DOMAIN_CREATE = 9,
REMOTE_PROC_DOMAIN_CREATE_LINUX = 10,
+
REMOTE_PROC_DOMAIN_DEFINE_XML = 11,
REMOTE_PROC_DOMAIN_DESTROY = 12,
REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13,
@@ -688,6 +937,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18,
REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19,
REMOTE_PROC_DOMAIN_GET_VCPUS = 20,
+
REMOTE_PROC_LIST_DEFINED_DOMAINS = 21,
REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22,
REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23,
@@ -698,6 +948,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_RESUME = 28,
REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29,
REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30,
+
REMOTE_PROC_DOMAIN_SET_MEMORY = 31,
REMOTE_PROC_DOMAIN_SET_VCPUS = 32,
REMOTE_PROC_DOMAIN_SHUTDOWN = 33,
@@ -708,6 +959,7 @@ enum remote_procedure {
REMOTE_PROC_LIST_NETWORKS = 38,
REMOTE_PROC_NETWORK_CREATE = 39,
REMOTE_PROC_NETWORK_CREATE_XML = 40,
+
REMOTE_PROC_NETWORK_DEFINE_XML = 41,
REMOTE_PROC_NETWORK_DESTROY = 42,
REMOTE_PROC_NETWORK_DUMP_XML = 43,
@@ -718,6 +970,7 @@ enum remote_procedure {
REMOTE_PROC_NETWORK_SET_AUTOSTART = 48,
REMOTE_PROC_NETWORK_UNDEFINE = 49,
REMOTE_PROC_NUM_OF_DEFINED_NETWORKS = 50,
+
REMOTE_PROC_NUM_OF_DOMAINS = 51,
REMOTE_PROC_NUM_OF_NETWORKS = 52,
REMOTE_PROC_DOMAIN_CORE_DUMP = 53,
@@ -728,6 +981,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58,
REMOTE_PROC_GET_HOSTNAME = 59,
REMOTE_PROC_SUPPORTS_FEATURE = 60,
+
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61,
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63,
@@ -737,7 +991,40 @@ enum remote_procedure {
REMOTE_PROC_AUTH_SASL_INIT = 67,
REMOTE_PROC_AUTH_SASL_START = 68,
REMOTE_PROC_AUTH_SASL_STEP = 69,
- REMOTE_PROC_AUTH_POLKIT = 70
+ REMOTE_PROC_AUTH_POLKIT = 70,
+
+ REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71,
+ REMOTE_PROC_LIST_STORAGE_POOLS = 72,
+ REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73,
+ REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74,
+ REMOTE_PROC_DISCOVER_STORAGE_POOLS = 75,
+ REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76,
+ REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77,
+ REMOTE_PROC_STORAGE_POOL_CREATE = 78,
+ REMOTE_PROC_STORAGE_POOL_BUILD = 79,
+ REMOTE_PROC_STORAGE_POOL_DESTROY = 80,
+
+ REMOTE_PROC_STORAGE_POOL_DELETE = 81,
+ REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82,
+ REMOTE_PROC_STORAGE_POOL_REFRESH = 83,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86,
+ REMOTE_PROC_STORAGE_POOL_GET_INFO = 87,
+ REMOTE_PROC_STORAGE_POOL_DUMP_XML = 88,
+ REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89,
+ REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90,
+
+ REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91,
+ REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92,
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93,
+ REMOTE_PROC_STORAGE_VOL_DELETE = 94,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97,
+ REMOTE_PROC_STORAGE_VOL_GET_INFO = 98,
+ REMOTE_PROC_STORAGE_VOL_DUMP_XML = 99,
+ REMOTE_PROC_STORAGE_VOL_GET_PATH = 100
};
/* Custom RPC structure. */
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|