migration: Unshare MigrationParameters struct for now
commit1bda8b3c6950f74482ba19e8529db72b511ba977
authorMarkus Armbruster <armbru@redhat.com>
Tue, 18 Jul 2017 11:42:11 +0000 (18 13:42 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 24 Jul 2017 11:35:11 +0000 (24 13:35 +0200)
tree1f908047e779a59d43e5f83067b743d0662ae66c
parente87fae4c488ff8a10b921311a63f16b94031c611
migration: Unshare MigrationParameters struct for now

Commit de63ab6 "migrate: Share common MigrationParameters struct"
reused MigrationParameters for the arguments of
migrate-set-parameters, with the following rationale:

    It is rather verbose, and slightly error-prone, to repeat
    the same set of parameters for input (migrate-set-parameters)
    as for output (query-migrate-parameters), where the only
    difference is whether the members are optional.  We can just
    document that the optional members will always be present
    on output, and then share a common struct between both
    commands.  The next patch can then reduce the amount of
    code needed on input.

I need to unshare them to correct a design flaw in a stupid, but
minimally invasive way, in the next commit.  We can restore the
sharing when we redo that patch in a less stupid way.  Add a suitable
TODO comment.

Note that I revert only the sharing part of commit de63ab6, not the
part that made the members of query-migrate-parameters' result
optional.  The schema (and thus introspection) remains inaccurate for
query-migrate-parameters.  If we decide not to restore the sharing, we
should revert that part, too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
hmp.c
migration/migration.c
qapi-schema.json