[libvirt] [PATCH v2 56/73] qemu: Refactor qemuMigrationParams

Ján Tomko jtomko at redhat.com
Fri Apr 13 15:28:18 UTC 2018


On Wed, Apr 11, 2018 at 04:41:46PM +0200, Jiri Denemark wrote:
>Adding support for new migration parameter requires a lot of places to
>be changed (most likely by copy&paste engineering): new variables to
>store the parameter value and the associated *_set bool, JSON formatter
>and parser, XML formatter and parser (to be added soon), and the actual
>code to set the parameter. It's pretty easy to forget about some of the
>places which need to be updated and end up with incorrect support. The
>goal of this patch is to let most of the places do their job without any
>modifications when new parameters are added.
>
>To achieve the goal, a new qemuMigrationParam enum is introduced and all
>parameters are stored in an array indexed by the items of this enum.
>This will also allow us to automatically set the migration parameters
>which directly correspond to libvirt's typed parameters accepted by
>virDomainMigrate* APIs.
>
>Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
>---
> src/qemu/qemu_migration_params.c | 470 ++++++++++++++++++++-----------
> src/qemu/qemu_migration_params.h |  20 ++
> 2 files changed, 328 insertions(+), 162 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180413/4704176c/attachment-0001.sig>


More information about the libvir-list mailing list