snapshot: remote protocol for snapshot children

Very mechanical.  I'm so glad we've automated the generation of things,
compared to what it was in 0.8.x days, where this would be much longer.

* src/remote/remote_protocol.x
(REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN)
(REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES): New rpcs.
(remote_domain_snapshot_num_children_args)
(remote_domain_snapshot_num_children_ret)
(remote_domain_snapshot_list_children_names_args)
(remote_domain_snapshot_list_children_names_ret): New structs.
* src/remote/remote_driver.c (remote_driver): Use it.
* src/remote_protocol-structs: Update.
This commit is contained in:
Eric Blake 2011-09-29 12:06:49 -06:00
parent 521cc44700
commit db536236f4
3 changed files with 45 additions and 2 deletions

View File

@ -4410,6 +4410,8 @@ static virDriver remote_driver = {
.domainSnapshotGetXMLDesc = remoteDomainSnapshotGetXMLDesc, /* 0.8.0 */
.domainSnapshotNum = remoteDomainSnapshotNum, /* 0.8.0 */
.domainSnapshotListNames = remoteDomainSnapshotListNames, /* 0.8.0 */
.domainSnapshotNumChildren = remoteDomainSnapshotNumChildren, /* 0.9.7 */
.domainSnapshotListChildrenNames = remoteDomainSnapshotListChildrenNames, /* 0.9.7 */
.domainSnapshotLookupByName = remoteDomainSnapshotLookupByName, /* 0.8.0 */
.domainHasCurrentSnapshot = remoteDomainHasCurrentSnapshot, /* 0.8.0 */
.domainSnapshotGetParent = remoteDomainSnapshotGetParent, /* 0.9.7 */

View File

@ -2067,6 +2067,25 @@ struct remote_domain_snapshot_list_names_ret {
remote_nonnull_string names<REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX>; /* insert@1 */
};
struct remote_domain_snapshot_num_children_args {
remote_nonnull_domain_snapshot snap;
unsigned int flags;
};
struct remote_domain_snapshot_num_children_ret {
int num;
};
struct remote_domain_snapshot_list_children_names_args {
remote_nonnull_domain_snapshot snap;
int maxnames;
unsigned int flags;
};
struct remote_domain_snapshot_list_children_names_ret {
remote_nonnull_string names<REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX>; /* insert@1 */
};
struct remote_domain_snapshot_lookup_by_name_args {
remote_nonnull_domain dom;
remote_nonnull_string name;
@ -2524,8 +2543,10 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242, /* autogen autogen */
REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244, /* autogen autogen */
REMOTE_PROC_DOMAIN_RESET = 245 /* autogen autogen */
REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244, /* autogen autogen priority:high */
REMOTE_PROC_DOMAIN_RESET = 245, /* autogen autogen */
REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246, /* autogen autogen priority:high */
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247 /* autogen autogen priority:high */
/*
* Notice how the entries are grouped in sets of 10 ?

View File

@ -1557,6 +1557,24 @@ struct remote_domain_snapshot_list_names_ret {
remote_nonnull_string * names_val;
} names;
};
struct remote_domain_snapshot_num_children_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_num_children_ret {
int num;
};
struct remote_domain_snapshot_list_children_names_args {
remote_nonnull_domain_snapshot snap;
int maxnames;
u_int flags;
};
struct remote_domain_snapshot_list_children_names_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_domain_snapshot_lookup_by_name_args {
remote_nonnull_domain dom;
remote_nonnull_string name;
@ -1971,4 +1989,6 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243,
REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244,
REMOTE_PROC_DOMAIN_RESET = 245,
REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246,
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247,
};