On 9/14/20 3:48 AM, Markus Armbruster wrote:
This policy rejects deprecated input, and thus permits "testing the
future".  Implement it for QMP command arguments: reject commands with
deprecated ones.  Example: when QEMU is run with -compat
deprecated-input=reject, then

     {"execute": "eject", "arguments": {"device": "cd"}}

fails like this

     {"error": {"class": "GenericError", "desc": "Deprecated parameter 'device' 
disabled by policy"}}

When the deprecated parameter is removed, the error will change to

     {"error": {"class": "GenericError", "desc": "Parameter 'device' is 
unexpected"}}

Signed-off-by: Markus Armbruster <arm...@redhat.com>
---

Reviewed-by: Eric Blake <ebl...@redhat.com>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to