qapi.py: Allow top-level type reference for command definitions
commitb35284ea207a0ae1c0b162344cdef2a83304befc
authorKevin Wolf <kwolf@redhat.com>
Mon, 1 Jul 2013 14:31:51 +0000 (1 16:31 +0200)
committerLuiz Capitulino <lcapitulino@redhat.com>
Wed, 10 Jul 2013 17:39:37 +0000 (10 13:39 -0400)
treebb071389c26f1df906f960d5be23651692e69d9e
parentbd9927fee4e63b451b4ef67a4c49729070d8b05d
qapi.py: Allow top-level type reference for command definitions

If 'data' for a command definition isn't a dict, but a string, it is
taken as a (struct) type name and the fields of this struct are directly
used as parameters.

This is useful for transactionable commands that can use the same type
definition for both the transaction action and the arguments of the
standalone command.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi.py