Fabiano Rosas <faro...@suse.de> writes: > Allow the migrate and migrate_incoming commands to pass the migration > configuration options all at once, dispensing the use of > migrate-set-parameters and migrate-set-capabilities. > > The motivation of this is to simplify the interface with the > management layer and avoid the usage of several command invocations to > configure a migration. It also avoids stale parameters from a previous > migration to influence the current migration. > > The options that are changed during the migration can still be set > with the existing commands. > > The order of precedence is: > > 'config' argument > -global migration cmdline > migrate-set-parameters > > defaults (migration_properties) > > I.e. the config takes precedence over all, values not present in the > config assume the default values. The -global migration command line > option allows the defaults to be overridden for debug. > > Signed-off-by: Fabiano Rosas <faro...@suse.de>
[...] > diff --git a/qapi/migration.json b/qapi/migration.json > index c5e6ea1a2d..11b7d7ebec 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -1456,6 +1456,13 @@ > # > # @resume: resume one paused migration, default "off". (since 3.0) > # > +# @config: migration configuration options, previously set via > +# @migrate-set-parameters and @migrate-set-capabilities. Setting > +# this argument causes all migration configuration options > +# previously set via @migrate-set-parameters to be ignored. > +# Configuration options not set will assume their default > +# values. (since 10.1) > +# Recommend # @config: migration configuration options. When present, any # migration configuration previously set with # @migrate-set-parameters is ignored. (since 10.1) I could be persuaded to keep the sentence on defaults. > # Features: > # > # @deprecated: Argument @detach is deprecated. > @@ -1520,6 +1527,7 @@ > 'data': {'*uri': 'str', > '*channels': [ 'MigrationChannel' ], > '*detach': { 'type': 'bool', 'features': [ 'deprecated' ] }, > + '*config': 'MigrationParameters', > '*resume': 'bool' } } > > ## > @@ -1539,6 +1547,13 @@ > # error details could be retrieved with query-migrate. > # (since 9.1) > # > +# @config: migration configuration options, previously set via > +# @migrate-set-parameters and @migrate-set-capabilities. Setting > +# this argument causes all migration configuration options > +# previously set via @migrate-set-parameters to be ignored. > +# Configuration options not set will assume their default > +# values. (since 10.1) Likewise. > +# > # Since: 2.3 > # > # .. admonition:: Notes > @@ -1592,6 +1607,7 @@ > { 'command': 'migrate-incoming', > 'data': {'*uri': 'str', > '*channels': [ 'MigrationChannel' ], > + '*config': 'MigrationParameters', > '*exit-on-error': 'bool' } } > > ## [...]