[libvirt RFC v3 05/19] remote: Add RPC support for the virDomainSaveParametersFlags API

Claudio Fontana cfontana at suse.de
Wed Apr 27 20:55:34 UTC 2022


On 4/27/22 12:47 AM, Jim Fehlig wrote:
> On 4/26/22 10:47, Claudio Fontana wrote:
>> Signed-off-by: Claudio Fontana <cfontana at suse.de>
>> ---
>>   src/remote/remote_driver.c   |  1 +
>>   src/remote/remote_protocol.x | 17 ++++++++++++++++-
>>   src/remote_protocol-structs  |  9 +++++++++
>>   3 files changed, 26 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
>> index 7e7a21fcab..1fc5d41971 100644
>> --- a/src/remote/remote_driver.c
>> +++ b/src/remote/remote_driver.c
>> @@ -8446,6 +8446,7 @@ static virHypervisorDriver hypervisor_driver = {
>>       .domainGetControlInfo = remoteDomainGetControlInfo, /* 0.9.3 */
>>       .domainSave = remoteDomainSave, /* 0.3.0 */
>>       .domainSaveFlags = remoteDomainSaveFlags, /* 0.9.4 */
>> +    .domainSaveParametersFlags = remoteDomainSaveParametersFlags, /* 8.3.0 */
>>       .domainRestore = remoteDomainRestore, /* 0.3.0 */
>>       .domainRestoreFlags = remoteDomainRestoreFlags, /* 0.9.4 */
>>       .domainSaveImageGetXMLDesc = remoteDomainSaveImageGetXMLDesc, /* 0.9.4 */
>> diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
>> index 4f13cef662..c2ae5c5748 100644
>> --- a/src/remote/remote_protocol.x
>> +++ b/src/remote/remote_protocol.x
>> @@ -230,6 +230,9 @@ const REMOTE_NODE_MEMORY_PARAMETERS_MAX = 64;
>>   /* Upper limit on migrate parameters */
>>   const REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX = 64;
>>   
>> +/* Upper limit on save/restore parameters */
>> +const REMOTE_DOMAIN_SAVE_PARAMS_MAX = 64;
>> +
>>   /* Upper limit on number of job stats */
>>   const REMOTE_DOMAIN_JOB_STATS_MAX = 64;
>>   
>> @@ -3227,6 +3230,12 @@ struct remote_domain_migrate_confirm3_params_args {
>>       int cancelled;
>>   };
>>   
>> +struct remote_domain_save_parameters_flags_args {
>> +    remote_nonnull_domain dom;
>> +    remote_typed_param params<REMOTE_DOMAIN_SAVE_PARAMS_MAX>;
>> +    unsigned int flags;
>> +};
>> +
>>   /* The device removed event is the last event where we have to support
>>    * dual forms for back-compat to older clients; all future events can
>>    * use just the modern form with callbackID.  */
>> @@ -6920,5 +6929,11 @@ enum remote_procedure {
>>        * @generate: both
>>        * @acl: domain:write
>>        */
>> -    REMOTE_PROC_DOMAIN_SET_LAUNCH_SECURITY_STATE = 439
>> +    REMOTE_PROC_DOMAIN_SET_LAUNCH_SECURITY_STATE = 439,
>> +
>> +    /**
>> +     * @generate: both
>> +     * @acl: domain:hibernate
>> +     */
>> +    REMOTE_PROC_DOMAIN_SAVE_PARAMETERS_FLAGS = 440
>>   };
>> diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
>> index d88176781d..89eadeb644 100644
>> --- a/src/remote_protocol-structs
>> +++ b/src/remote_protocol-structs
>> @@ -563,6 +563,14 @@ struct remote_domain_save_flags_args {
>>           remote_string              dxml;
>>           u_int                      flags;
>>   };
>> +struct remote_domain_save_parameters_flags_args {
>> +        remote_nonnull_domain      dom;
>> +        struct {
>> +                u_int              params_len;
>> +                remote_typed_param * params_val;
>> +        } params;
>> +        u_int                      flags;
>> +};
> 
> 'ninja test' fails here, wanting this addition moved later in the file
> 
>   41/314 libvirt / check-remote_protocol 
>             FAIL            0.19s   exit status 1
>  >>> MALLOC_PERTURB_=253 LANG=C LC_ALL='' /usr/bin/python3 
> /home/jfehlig/virt/gitlab/libvirt/scripts/check-remote-protocol.py 
> remote_protocol virt_remote_driver 
> /home/jfehlig/virt/gitlab/libvirt/build/src/remote/libvirt_remote_driver.a 
> /usr/bin/pdwtags 
> /home/jfehlig/virt/gitlab/libvirt/build/../src/remote_protocol-structs
> --- /home/jfehlig/virt/gitlab/libvirt/build/../src/remote_protocol-structs 
> 2022-04-26 15:57:29.515818322 -0600
> +++ -   2022-04-26 15:58:12.933537465 -0600
> @@ -563,14 +563,6 @@
>           remote_string              dxml;
>           u_int                      flags;
>   };
> -struct remote_domain_save_parameters_flags_args {
> -        remote_nonnull_domain      dom;
> -        struct {
> -                u_int              params_len;
> -                remote_typed_param * params_val;
> -        } params;
> -        u_int                      flags;
> -};
>   struct remote_domain_restore_args {
>           remote_nonnull_string      from;
>   };
> @@ -2609,6 +2601,14 @@
>           u_int                      flags;
>           int                        cancelled;
>   };
> +struct remote_domain_save_parameters_flags_args {
> +        remote_nonnull_domain      dom;
> +        struct {
> +                u_int              params_len;
> +                remote_typed_param * params_val;
> +        } params;
> +        u_int                      flags;
> +};
>   struct remote_domain_event_device_removed_msg {
>           remote_nonnull_domain      dom;
>           remote_nonnull_string      devAlias;
>   41/314 libvirt / check-remote_protocol 
>             FAIL            0.19s   exit status 1
> 
> Jim
>>   struct remote_domain_restore_args {
>>           remote_nonnull_string      from;
>>   };
>> @@ -3689,4 +3697,5 @@ enum remote_procedure {
>>           REMOTE_PROC_NETWORK_CREATE_XML_FLAGS = 437,
>>           REMOTE_PROC_DOMAIN_EVENT_MEMORY_DEVICE_SIZE_CHANGE = 438,
>>           REMOTE_PROC_DOMAIN_SET_LAUNCH_SECURITY_STATE = 439,
>> +        REMOTE_PROC_DOMAIN_SAVE_PARAMETERS_FLAGS = 440,
>>   };
> 

Hah strange I don't get this...




More information about the libvir-list mailing list