On 06/15/12 06:18, Eric Blake wrote:
The generator doesn't handle lists of virDomainSnapshotPtr, so this commit requires a bit more work than some RPC additions. * src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS) (REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN): New RPC calls, with corresponding structs. * daemon/remote.c (remoteDispatchDomainListAllSnapshots) (remoteDispatchDomainSnapshotListAllChildren): New functions. * src/remote/remote_driver.c (remoteDomainListAllSnapshots) (remoteDomainSnapshotListAllChildren): Likewise. * src/remote_protocol-structs: Regenerate. --- --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -2249,6 +2249,17 @@ struct remote_domain_snapshot_list_names_ret { remote_nonnull_string names<REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX>; /* insert@1 */ }; +struct remote_domain_list_all_snapshots_args { + remote_nonnull_domain dom; + int need_results; + unsigned int flags; +}; + +struct remote_domain_list_all_snapshots_ret { + remote_nonnull_domain_snapshot snapshots<>; + int ret; +}; + struct remote_domain_snapshot_num_children_args { remote_nonnull_domain_snapshot snap; unsigned int flags; @@ -2268,6 +2279,17 @@ struct remote_domain_snapshot_list_children_names_ret { remote_nonnull_string names<REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX>; /* insert@1 */ }; +struct remote_domain_snapshot_list_all_children_args { + remote_nonnull_domain_snapshot snapshot; + int need_results; + unsigned int flags; +}; + +struct remote_domain_snapshot_list_all_children_ret { + remote_nonnull_domain_snapshot snapshots<>;
Hopefully we'll go with unbounded arrays in the future, but as with my listing function: Shouldn't we use the limit that was imposed on name list length also on this list? (REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX).
+ int ret; +}; + struct remote_domain_snapshot_lookup_by_name_args { remote_nonnull_domain dom; remote_nonnull_string name;
ACK with the limit added. I'm a fan of unbounded arrays, but I think we should be consistent.
Peter -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list