qemu/include/qapi/qmp
Peter Xu cf869d5317 qmp: support out-of-band (oob) execution
Having "allow-oob":true for a command does not mean that this command
will always be run in out-of-band mode.  The out-of-band quick path will
only be executed if we specify the extra "run-oob" flag when sending the
QMP request:

    { "execute":   "command-that-allows-oob",
      "arguments": { ... },
      "control":   { "run-oob": true } }

The "control" key is introduced to store this extra flag.  "control"
field is used to store arguments that are shared by all the commands,
rather than command specific arguments.  Let "run-oob" be the first.

Note that in the patch I exported qmp_dispatch_check_obj() to be used to
check the request earlier, and at the same time allowed "id" field to be
there since actually we always allow that.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180309090006.10018-19-peterx@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: rebase to qobject_to(), spelling fix]
Signed-off-by: Eric Blake <eblake@redhat.com>
2018-03-19 14:58:37 -05:00
..
dispatch.h qmp: support out-of-band (oob) execution 2018-03-19 14:58:37 -05:00
json-lexer.h include: Clean up includes 2016-02-23 12:43:05 +00:00
json-parser.h Include qapi/qmp/qlist.h exactly where needed 2018-02-09 13:52:15 +01:00
json-streamer.h include: Clean up includes 2016-02-23 12:43:05 +00:00
qbool.h qapi: Remove qobject_to_X() functions 2018-03-19 14:58:36 -05:00
qdict.h qapi: Remove qobject_to_X() functions 2018-03-19 14:58:36 -05:00
qerror.h qmp: Eliminate silly QERR_QMP_* macros 2017-03-05 09:14:19 +01:00
qjson.h Include qapi/qmp/qstring.h exactly where needed 2018-02-09 13:52:15 +01:00
qlist.h qapi: Remove qobject_to_X() functions 2018-03-19 14:58:36 -05:00
qlit.h qlit: add qobject_from_qlit() 2018-03-19 10:00:14 -05:00
qnull.h qapi: Add qobject_is_equal() 2017-11-17 18:21:30 +01:00
qnum.h qapi: Remove qobject_to_X() functions 2018-03-19 14:58:36 -05:00
qobject.h qapi: Add qobject_to() 2018-03-19 14:49:04 -05:00
qstring.h qobject: introduce qobject_get_try_str() 2018-03-19 14:58:36 -05:00