This patch defines the remote wire protocol for serializing all the storage API calls.
There are 15 new calls for storage pools, and 9 calls for storage volumes. The style
is following that of the network API calls. The serialization of virStorageVolPtr is
slightly more complicated, because it has to have a nested virStoragePoolPtr serialized
alongside it.
remote.c | 629 ++++++++++++++++++++++++++++++++++++++++++
remote_dispatch_localvars.h | 42 ++
remote_dispatch_proc_switch.h | 201 +++++++++++++
remote_dispatch_prototypes.h | 25 +
remote_protocol.c | 450 ++++++++++++++++++++++++++++++
remote_protocol.h | 367 ++++++++++++++++++++++++
remote_protocol.x | 238 +++++++++++++++
7 files changed, 1951 insertions(+), 1 deletion(-)
diff -r 89d154031d13 qemud/remote.c
--- a/qemud/remote.c Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote.c Sat Oct 27 17:52:44 2007 -0400
@@ -57,8 +57,12 @@ static void remoteDispatchError (struct
const char *fmt, ...);
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"
@@ -1945,6 +1949,598 @@ remoteDispatchNumOfNetworks (struct qemu
return 0;
}
+
+/***************************************************************
+ * STORAGE POOL APIS
+ ***************************************************************/
+
+
+static int
+remoteDispatchListDefinedStoragePools (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_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
+remoteDispatchStoragePoolCreate (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_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_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
+remoteDispatchStoragePoolShutdown (struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_pool_shutdown_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 (virStoragePoolShutdown (pool) == -1) {
+ virStoragePoolFree(pool);
+ return -1;
+ }
+ virStoragePoolFree(pool);
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolDestroy (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
+remoteDispatchStoragePoolGetInfo (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->allocation = info.allocation;
+ ret->capacity = info.capacity;
+
+ virStoragePoolFree(pool);
+
+ return 0;
+}
+
+static int
+remoteDispatchStoragePoolDumpXml (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_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_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_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
+remoteDispatchStoragePoolSetAutostart (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_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_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_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;
+}
+
+
+/***************************************************************
+ * STORAGE VOL APIS
+ ***************************************************************/
+
+
+static int
+remoteDispatchStoragePoolListVolumes (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
+remoteDispatchStorageVolCreateXml (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
+remoteDispatchStorageVolDestroy (struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_destroy_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 (virStorageVolDestroy (vol) == -1) {
+ virStorageVolFree(vol);
+ return -1;
+ }
+ virStorageVolFree(vol);
+ return 0;
+}
+
+static int
+remoteDispatchStorageVolGetInfo (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->allocation = info.allocation;
+ ret->capacity = info.capacity;
+
+ virStorageVolFree(vol);
+
+ return 0;
+}
+
+static int
+remoteDispatchStorageVolDumpXml (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_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_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
+remoteDispatchStorageVolLookupByUuid (struct qemud_client *client,
+ remote_message_header *req,
+ remote_storage_vol_lookup_by_uuid_args *args,
+ remote_storage_vol_lookup_by_uuid_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 = virStorageVolLookupByUUID (pool, (unsigned char *) args->uuid);
+ virStoragePoolFree(pool);
+ if (vol == NULL) return -1;
+
+ make_nonnull_storage_vol (&ret->vol, vol);
+ virStorageVolFree(vol);
+ return 0;
+}
+
+
+static int
+remoteDispatchStoragePoolNumOfVolumes (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;
+}
+
+
/*----- Helpers. -----*/
/* get_nonnull_domain and get_nonnull_network turn an on-wire
@@ -1971,6 +2567,24 @@ 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;
+ virStoragePoolPtr pool = get_nonnull_storage_pool(conn, vol.pool);
+ if (pool == NULL)
+ return NULL;
+ ret = virGetStorageVol (pool, vol.name, BAD_CAST vol.uuid);
+ virStoragePoolFree(pool);
+ return ret;
+}
+
/* Make remote_nonnull_domain and remote_nonnull_network. */
static void
make_nonnull_domain (remote_nonnull_domain *dom_dst, virDomainPtr dom_src)
@@ -1985,6 +2599,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)
+{
+ make_nonnull_storage_pool (&vol_dst->pool, vol_src->pool);
+ vol_dst->name = strdup (vol_src->name);
+ memcpy (vol_dst->uuid, vol_src->uuid, VIR_UUID_BUFLEN);
}
/*
diff -r 89d154031d13 qemud/remote_dispatch_localvars.h
--- a/qemud/remote_dispatch_localvars.h Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote_dispatch_localvars.h Sat Oct 27 17:55:07 2007 -0400
@@ -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_domain_get_os_type_args lv_remote_domain_get_os_type_args;
remote_domain_get_os_type_ret lv_remote_domain_get_os_type_ret;
@@ -15,9 +19,13 @@ remote_domain_get_autostart_ret lv_remot
remote_domain_get_autostart_ret lv_remote_domain_get_autostart_ret;
remote_domain_set_vcpus_args lv_remote_domain_set_vcpus_args;
remote_get_hostname_ret lv_remote_get_hostname_ret;
+remote_storage_vol_lookup_by_uuid_args lv_remote_storage_vol_lookup_by_uuid_args;
+remote_storage_vol_lookup_by_uuid_ret lv_remote_storage_vol_lookup_by_uuid_ret;
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_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;
@@ -33,19 +41,27 @@ remote_network_dump_xml_ret lv_remote_ne
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;
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_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;
@@ -56,6 +72,7 @@ remote_domain_get_vcpus_ret lv_remote_do
remote_domain_get_vcpus_ret lv_remote_domain_get_vcpus_ret;
remote_domain_get_scheduler_parameters_args
lv_remote_domain_get_scheduler_parameters_args;
remote_domain_get_scheduler_parameters_ret
lv_remote_domain_get_scheduler_parameters_ret;
+remote_storage_vol_destroy_args lv_remote_storage_vol_destroy_args;
remote_node_get_info_ret lv_remote_node_get_info_ret;
remote_network_lookup_by_name_args lv_remote_network_lookup_by_name_args;
remote_network_lookup_by_name_ret lv_remote_network_lookup_by_name_ret;
@@ -64,6 +81,7 @@ remote_domain_block_stats_ret lv_remote_
remote_domain_block_stats_ret lv_remote_domain_block_stats_ret;
remote_domain_detach_device_args lv_remote_domain_detach_device_args;
remote_domain_save_args lv_remote_domain_save_args;
+remote_num_of_storage_pools_ret lv_remote_num_of_storage_pools_ret;
remote_domain_migrate_prepare_args lv_remote_domain_migrate_prepare_args;
remote_domain_migrate_prepare_ret lv_remote_domain_migrate_prepare_ret;
remote_domain_undefine_args lv_remote_domain_undefine_args;
@@ -71,27 +89,51 @@ 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_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_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_storage_pool_shutdown_args lv_remote_storage_pool_shutdown_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 89d154031d13 qemud/remote_dispatch_proc_switch.h
--- a/qemud/remote_dispatch_proc_switch.h Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote_dispatch_proc_switch.h Sat Oct 27 17:55:07 2007 -0400
@@ -332,6 +332,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;
@@ -350,6 +359,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;
@@ -455,6 +473,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;
@@ -467,11 +491,188 @@ 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_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_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_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_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_SHUTDOWN:
+ fn = (dispatch_fn) remoteDispatchStoragePoolShutdown;
+ args_filter = (xdrproc_t) xdr_remote_storage_pool_shutdown_args;
+ args = (char *) &lv_remote_storage_pool_shutdown_args;
+ memset (&lv_remote_storage_pool_shutdown_args, 0, sizeof
lv_remote_storage_pool_shutdown_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_DESTROY:
+ fn = (dispatch_fn) remoteDispatchStorageVolDestroy;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_destroy_args;
+ args = (char *) &lv_remote_storage_vol_destroy_args;
+ memset (&lv_remote_storage_vol_destroy_args, 0, sizeof
lv_remote_storage_vol_destroy_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_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_UUID:
+ fn = (dispatch_fn) remoteDispatchStorageVolLookupByUuid;
+ args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_uuid_args;
+ args = (char *) &lv_remote_storage_vol_lookup_by_uuid_args;
+ memset (&lv_remote_storage_vol_lookup_by_uuid_args, 0, sizeof
lv_remote_storage_vol_lookup_by_uuid_args);
+ ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_uuid_ret;
+ ret = (char *) &lv_remote_storage_vol_lookup_by_uuid_ret;
+ memset (&lv_remote_storage_vol_lookup_by_uuid_ret, 0, sizeof
lv_remote_storage_vol_lookup_by_uuid_ret);
break;
case REMOTE_PROC_SUPPORTS_FEATURE:
fn = (dispatch_fn) remoteDispatchSupportsFeature;
diff -r 89d154031d13 qemud/remote_dispatch_prototypes.h
--- a/qemud/remote_dispatch_prototypes.h Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote_dispatch_prototypes.h Sat Oct 27 17:55:07 2007 -0400
@@ -47,8 +47,10 @@ static int remoteDispatchGetVersion (str
static int remoteDispatchGetVersion (struct qemud_client *client, remote_message_header
*req, void *args, remote_get_version_ret *ret);
static int remoteDispatchListDefinedDomains (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_client *client,
remote_message_header *req, remote_list_defined_networks_args *args,
remote_list_defined_networks_ret *ret);
+static int remoteDispatchListDefinedStoragePools (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_client *client, remote_message_header
*req, remote_list_domains_args *args, remote_list_domains_ret *ret);
static int remoteDispatchListNetworks (struct qemud_client *client, remote_message_header
*req, remote_list_networks_args *args, remote_list_networks_ret *ret);
+static int remoteDispatchListStoragePools (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_client *client,
remote_message_header *req, remote_network_create_args *args, void *ret);
static int remoteDispatchNetworkCreateXml (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_client *client,
remote_message_header *req, remote_network_define_xml_args *args,
remote_network_define_xml_ret *ret);
@@ -63,7 +65,30 @@ static int remoteDispatchNodeGetInfo (st
static int remoteDispatchNodeGetInfo (struct qemud_client *client, remote_message_header
*req, void *args, remote_node_get_info_ret *ret);
static int remoteDispatchNumOfDefinedDomains (struct qemud_client *client,
remote_message_header *req, void *args, remote_num_of_defined_domains_ret *ret);
static int remoteDispatchNumOfDefinedNetworks (struct qemud_client *client,
remote_message_header *req, void *args, remote_num_of_defined_networks_ret *ret);
+static int remoteDispatchNumOfDefinedStoragePools (struct qemud_client *client,
remote_message_header *req, void *args, remote_num_of_defined_storage_pools_ret *ret);
static int remoteDispatchNumOfDomains (struct qemud_client *client, remote_message_header
*req, void *args, remote_num_of_domains_ret *ret);
static int remoteDispatchNumOfNetworks (struct qemud_client *client,
remote_message_header *req, void *args, remote_num_of_networks_ret *ret);
+static int remoteDispatchNumOfStoragePools (struct qemud_client *client,
remote_message_header *req, void *args, remote_num_of_storage_pools_ret *ret);
static int remoteDispatchOpen (struct qemud_client *client, remote_message_header *req,
remote_open_args *args, void *ret);
+static int remoteDispatchStoragePoolCreate (struct qemud_client *client,
remote_message_header *req, remote_storage_pool_create_args *args, void *ret);
+static int remoteDispatchStoragePoolCreateXml (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_client *client,
remote_message_header *req, remote_storage_pool_define_xml_args *args,
remote_storage_pool_define_xml_ret *ret);
+static int remoteDispatchStoragePoolDestroy (struct qemud_client *client,
remote_message_header *req, remote_storage_pool_destroy_args *args, void *ret);
+static int remoteDispatchStoragePoolDumpXml (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_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_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_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_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_client *client,
remote_message_header *req, remote_storage_pool_lookup_by_uuid_args *args,
remote_storage_pool_lookup_by_uuid_ret *ret);
+static int remoteDispatchStoragePoolNumOfVolumes (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 remoteDispatchStoragePoolSetAutostart (struct qemud_client *client,
remote_message_header *req, remote_storage_pool_set_autostart_args *args, void *ret);
+static int remoteDispatchStoragePoolShutdown (struct qemud_client *client,
remote_message_header *req, remote_storage_pool_shutdown_args *args, void *ret);
+static int remoteDispatchStoragePoolUndefine (struct qemud_client *client,
remote_message_header *req, remote_storage_pool_undefine_args *args, void *ret);
+static int remoteDispatchStorageVolCreateXml (struct qemud_client *client,
remote_message_header *req, remote_storage_vol_create_xml_args *args,
remote_storage_vol_create_xml_ret *ret);
+static int remoteDispatchStorageVolDestroy (struct qemud_client *client,
remote_message_header *req, remote_storage_vol_destroy_args *args, void *ret);
+static int remoteDispatchStorageVolDumpXml (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_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_client *client,
remote_message_header *req, remote_storage_vol_get_path_args *args,
remote_storage_vol_get_path_ret *ret);
+static int remoteDispatchStorageVolLookupByName (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 remoteDispatchStorageVolLookupByUuid (struct qemud_client *client,
remote_message_header *req, remote_storage_vol_lookup_by_uuid_args *args,
remote_storage_vol_lookup_by_uuid_ret *ret);
static int remoteDispatchSupportsFeature (struct qemud_client *client,
remote_message_header *req, remote_supports_feature_args *args,
remote_supports_feature_ret *ret);
diff -r 89d154031d13 qemud/remote_protocol.c
--- a/qemud/remote_protocol.c Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote_protocol.c Sat Oct 27 17:55:07 2007 -0400
@@ -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_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ 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_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;
}
@@ -1222,6 +1264,414 @@ xdr_remote_network_set_autostart_args (X
}
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_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_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_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_shutdown_args (XDR *xdrs, remote_storage_pool_shutdown_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_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_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;
+ 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_uuid_args (XDR *xdrs,
remote_storage_vol_lookup_by_uuid_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_pool (xdrs, &objp->pool))
+ return FALSE;
+ if (!xdr_remote_uuid (xdrs, objp->uuid))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_remote_storage_vol_lookup_by_uuid_ret (XDR *xdrs,
remote_storage_vol_lookup_by_uuid_ret *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ 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_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_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_destroy_args (XDR *xdrs, remote_storage_vol_destroy_args *objp)
+{
+
+ if (!xdr_remote_nonnull_storage_vol (xdrs, &objp->vol))
+ 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_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 89d154031d13 qemud/remote_protocol.h
--- a/qemud/remote_protocol.h Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote_protocol.h Sat Oct 27 17:55:06 2007 -0400
@@ -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
typedef char remote_uuid[VIR_UUID_BUFLEN];
@@ -44,9 +46,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_storage_pool pool;
+ remote_nonnull_string name;
+ remote_uuid uuid;
+};
+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;
@@ -659,6 +678,237 @@ struct remote_network_set_autostart_args
int autostart;
};
typedef struct remote_network_set_autostart_args remote_network_set_autostart_args;
+
+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_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_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_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_shutdown_args {
+ remote_nonnull_storage_pool pool;
+};
+typedef struct remote_storage_pool_shutdown_args remote_storage_pool_shutdown_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_dump_xml_args {
+ remote_nonnull_storage_pool pool;
+ 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;
+};
+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_uuid_args {
+ remote_nonnull_storage_pool pool;
+ remote_uuid uuid;
+};
+typedef struct remote_storage_vol_lookup_by_uuid_args
remote_storage_vol_lookup_by_uuid_args;
+
+struct remote_storage_vol_lookup_by_uuid_ret {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_lookup_by_uuid_ret
remote_storage_vol_lookup_by_uuid_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_create_xml_args {
+ remote_nonnull_storage_pool pool;
+ remote_nonnull_string xml;
+ 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_destroy_args {
+ remote_nonnull_storage_vol vol;
+};
+typedef struct remote_storage_vol_destroy_args remote_storage_vol_destroy_args;
+
+struct remote_storage_vol_dump_xml_args {
+ remote_nonnull_storage_vol vol;
+ 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
@@ -728,6 +978,31 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63,
REMOTE_PROC_DOMAIN_BLOCK_STATS = 64,
REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65,
+ REMOTE_PROC_NUM_OF_STORAGE_POOLS = 66,
+ REMOTE_PROC_LIST_STORAGE_POOLS = 67,
+ REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 68,
+ REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 69,
+ REMOTE_PROC_STORAGE_POOL_CREATE_XML = 70,
+ REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 71,
+ REMOTE_PROC_STORAGE_POOL_CREATE = 72,
+ REMOTE_PROC_STORAGE_POOL_SHUTDOWN = 73,
+ REMOTE_PROC_STORAGE_POOL_DESTROY = 74,
+ REMOTE_PROC_STORAGE_POOL_UNDEFINE = 75,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 76,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 77,
+ REMOTE_PROC_STORAGE_POOL_GET_INFO = 78,
+ REMOTE_PROC_STORAGE_POOL_DUMP_XML = 79,
+ REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 80,
+ REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 81,
+ REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 82,
+ REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 83,
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML = 84,
+ REMOTE_PROC_STORAGE_VOL_DESTROY = 85,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 86,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_UUID = 87,
+ REMOTE_PROC_STORAGE_VOL_GET_INFO = 88,
+ REMOTE_PROC_STORAGE_VOL_DUMP_XML = 89,
+ REMOTE_PROC_STORAGE_VOL_GET_PATH = 90,
};
typedef enum remote_procedure remote_procedure;
@@ -762,8 +1037,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_vcpu_info (XDR *, remote_vcpu_info*);
extern bool_t xdr_remote_sched_param_value (XDR *, remote_sched_param_value*);
@@ -863,6 +1142,48 @@ extern bool_t xdr_remote_network_get_au
extern bool_t xdr_remote_network_get_autostart_args (XDR *,
remote_network_get_autostart_args*);
extern bool_t xdr_remote_network_get_autostart_ret (XDR *,
remote_network_get_autostart_ret*);
extern bool_t xdr_remote_network_set_autostart_args (XDR *,
remote_network_set_autostart_args*);
+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_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_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_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_shutdown_args (XDR *,
remote_storage_pool_shutdown_args*);
+extern bool_t xdr_remote_storage_pool_destroy_args (XDR *,
remote_storage_pool_destroy_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_uuid_args (XDR *,
remote_storage_vol_lookup_by_uuid_args*);
+extern bool_t xdr_remote_storage_vol_lookup_by_uuid_ret (XDR *,
remote_storage_vol_lookup_by_uuid_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_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_destroy_args (XDR *,
remote_storage_vol_destroy_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*);
@@ -874,8 +1195,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_vcpu_info ();
extern bool_t xdr_remote_sched_param_value ();
@@ -975,6 +1300,48 @@ extern bool_t xdr_remote_network_get_aut
extern bool_t xdr_remote_network_get_autostart_args ();
extern bool_t xdr_remote_network_get_autostart_ret ();
extern bool_t xdr_remote_network_set_autostart_args ();
+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_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_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_undefine_args ();
+extern bool_t xdr_remote_storage_pool_create_args ();
+extern bool_t xdr_remote_storage_pool_shutdown_args ();
+extern bool_t xdr_remote_storage_pool_destroy_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_uuid_args ();
+extern bool_t xdr_remote_storage_vol_lookup_by_uuid_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_create_xml_args ();
+extern bool_t xdr_remote_storage_vol_create_xml_ret ();
+extern bool_t xdr_remote_storage_vol_destroy_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 89d154031d13 qemud/remote_protocol.x
--- a/qemud/remote_protocol.x Sat Oct 27 17:52:41 2007 -0400
+++ b/qemud/remote_protocol.x Sat Oct 27 17:55:05 2007 -0400
@@ -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;
@@ -93,6 +99,19 @@ struct remote_nonnull_domain {
/* A network which may not be NULL. */
struct remote_nonnull_network {
+ remote_nonnull_string name;
+ 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_storage_pool pool;
remote_nonnull_string name;
remote_uuid uuid;
};
@@ -100,6 +119,8 @@ struct remote_nonnull_network {
/* 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. */
@@ -610,6 +631,195 @@ struct remote_network_set_autostart_args
struct remote_network_set_autostart_args {
remote_nonnull_network net;
int autostart;
+};
+
+
+
+
+/* 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_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_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_undefine_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_create_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_shutdown_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_destroy_args {
+ remote_nonnull_storage_pool pool;
+};
+
+struct remote_storage_pool_dump_xml_args {
+ remote_nonnull_storage_pool pool;
+ int 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;
+};
+
+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;
+};
+
+
+
+/* Storage vol calls: */
+
+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>;
+};
+
+struct remote_storage_vol_lookup_by_uuid_args {
+ remote_nonnull_storage_pool pool;
+ remote_uuid uuid;
+};
+
+struct remote_storage_vol_lookup_by_uuid_ret {
+ remote_nonnull_storage_vol vol;
+};
+
+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_create_xml_args {
+ remote_nonnull_storage_pool pool;
+ remote_nonnull_string xml;
+ int flags;
+};
+
+struct remote_storage_vol_create_xml_ret {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_destroy_args {
+ remote_nonnull_storage_vol vol;
+};
+
+struct remote_storage_vol_dump_xml_args {
+ remote_nonnull_storage_vol vol;
+ int 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. -----*/
@@ -683,7 +893,33 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63,
REMOTE_PROC_DOMAIN_BLOCK_STATS = 64,
- REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65
+ REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65,
+ REMOTE_PROC_NUM_OF_STORAGE_POOLS = 66,
+ REMOTE_PROC_LIST_STORAGE_POOLS = 67,
+ REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 68,
+ REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 69,
+ REMOTE_PROC_STORAGE_POOL_CREATE_XML = 70,
+ REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 71,
+ REMOTE_PROC_STORAGE_POOL_CREATE = 72,
+ REMOTE_PROC_STORAGE_POOL_SHUTDOWN = 73,
+ REMOTE_PROC_STORAGE_POOL_DESTROY = 74,
+ REMOTE_PROC_STORAGE_POOL_UNDEFINE = 75,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 76,
+ REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 77,
+ REMOTE_PROC_STORAGE_POOL_GET_INFO = 78,
+ REMOTE_PROC_STORAGE_POOL_DUMP_XML = 79,
+ REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 80,
+ REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 81,
+
+ REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 82,
+ REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 83,
+ REMOTE_PROC_STORAGE_VOL_CREATE_XML = 84,
+ REMOTE_PROC_STORAGE_VOL_DESTROY = 85,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 86,
+ REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_UUID = 87,
+ REMOTE_PROC_STORAGE_VOL_GET_INFO = 88,
+ REMOTE_PROC_STORAGE_VOL_DUMP_XML = 89,
+ REMOTE_PROC_STORAGE_VOL_GET_PATH = 90
};
/* 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 -=|