diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-03-18 16:55:17 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-03-19 16:05:11 +0100 |
commit | d2032598c434fe385145ee6ea58007a19ef7e723 (patch) | |
tree | 7e3d84fc72da52b789ecd41a7c7bd13ebb00d228 /include/qapi/qmp | |
parent | 130d4824222cf062ed8ee3c5ab9fa2bd852b33b6 (diff) |
qapi: Implement deprecated-input=reject for QMP commands
This policy rejects deprecated input, and thus permits "testing the
future". Implement it for QMP commands: make deprecated ones fail.
Example: when QEMU is run with -compat deprecated-input=reject, then
{"execute": "query-cpus"}
fails like this
{"error": {"class": "CommandNotFound", "desc": "Deprecated command query-cpus disabled by policy"}}
When the deprecated command is removed, the error will change to
{"error": {"class": "CommandNotFound", "desc": "The command query-cpus has not been found"}}
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210318155519.1224118-10-armbru@redhat.com>
Diffstat (limited to 'include/qapi/qmp')
-rw-r--r-- | include/qapi/qmp/dispatch.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h index 135dfdef71..075203dc67 100644 --- a/include/qapi/qmp/dispatch.h +++ b/include/qapi/qmp/dispatch.h @@ -26,6 +26,7 @@ typedef enum QmpCommandOptions QCO_ALLOW_OOB = (1U << 1), QCO_ALLOW_PRECONFIG = (1U << 2), QCO_COROUTINE = (1U << 3), + QCO_DEPRECATED = (1U << 4), } QmpCommandOptions; typedef struct QmpCommand |