[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 16/21] qapi/migration: Mark that query/set-migrate-parameters
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH 16/21] qapi/migration: Mark that query/set-migrate-parameters support capabilities |
Date: |
Fri, 06 Jun 2025 10:53:23 -0300 |
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Mon, Jun 02, 2025 at 10:38:05PM -0300, Fabiano Rosas wrote:
>> Add a QAPI command feature "capabilities" that can be queried by the
>> client to check that the parameters commands now also support
>> capabilities.
>>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>> qapi/migration.json | 20 ++++++++++++++++++--
>> 1 file changed, 18 insertions(+), 2 deletions(-)
>>
>> diff --git a/qapi/migration.json b/qapi/migration.json
>> index 5942622ba7..557a9c523e 100644
>> --- a/qapi/migration.json
>> +++ b/qapi/migration.json
>> @@ -776,6 +776,13 @@
>> #
>> # Set various migration parameters.
>> #
>> +# Features:
>> +#
>> +# @capabilities: Indicates this command supports setting the set of
>> +# parameters previously known as capabilities. This means this
>> +# command can (and should) be used instead of the depreacated
>> +# @migrate-set-capabilities.
>> +#
>> # Since: 2.4
>> #
>> # .. qmp-example::
>> @@ -785,7 +792,8 @@
>> # <- { "return": {} }
>> ##
>> { 'command': 'migrate-set-parameters', 'boxed': true,
>> - 'data': 'MigrationParameters' }
>> + 'data': 'MigrationParameters',
>> + 'features': [ 'capabilities' ] }
>>
>> ##
>> # @MigrationParameters:
>> @@ -1110,6 +1118,13 @@
>> #
>> # Returns: @MigrationParameters
>> #
>> +# Features:
>> +#
>> +# @capabilities: Indicates this command supports setting the set of
>> +# parameters previously known as capabilities. This means this
>> +# command can (and should) be used instead of the depreacated
>> +# @migrate-set-capabilities.
>> +#
>> # Since: 2.4
>> #
>> # .. qmp-example::
>> @@ -1125,7 +1140,8 @@
>> # }
>> ##
>> { 'command': 'query-migrate-parameters',
>> - 'returns': 'MigrationParameters' }
>> + 'returns': 'MigrationParameters',
>> + 'features': [ 'capabilities' ] }
>>
>
> Adding QAPI "features" is only needed if there is no other viable
> way to detect existence of the feature. In this case, apps can
> trivially detect the feature by querying the QAPI schema and
> identifying that the MigrationParameters struct has gained a
> load of new fields. So IMHO this patch can be dropped.
>
Oh, ok. I was thinking this would be friendlier to the management layer,
but if it's all the same I'll drop it. Same for the other one in patch
19.
Thanks
- [PATCH 06/21] migration: Remove checks for s->parameters has_* fields, (continued)
- [PATCH 06/21] migration: Remove checks for s->parameters has_* fields, Fabiano Rosas, 2025/06/02
- [PATCH 11/21] migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply, Fabiano Rosas, 2025/06/02
- [PATCH 07/21] migration: Set block_bitmap_mapping unconditionally in query-migrate-parameters, Fabiano Rosas, 2025/06/02
- [PATCH 12/21] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply, Fabiano Rosas, 2025/06/02
- [PATCH 08/21] migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE, Fabiano Rosas, 2025/06/02
- [PATCH 13/21] migration: Use visitors in migrate_params_test_apply, Fabiano Rosas, 2025/06/02
- [PATCH 16/21] qapi/migration: Mark that query/set-migrate-parameters support capabilities, Fabiano Rosas, 2025/06/02
- [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters, Fabiano Rosas, 2025/06/02
[PATCH 14/21] migration: Cleanup hmp_info_migrate_parameters, Fabiano Rosas, 2025/06/02
[PATCH 18/21] qapi/migration: Deprecate capabilities commands, Fabiano Rosas, 2025/06/02