aa2370444b
This copies the code implementing the policy from qapi/qmp-dispatch.c to qapi/qobject-input-visitor.c. Tolerable, but if we acquire more copies, we should look into factoring them out. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com> Message-Id: <20211025042405.3762351-5-armbru@redhat.com>
56 lines
1.3 KiB
Python
56 lines
1.3 KiB
Python
# -*- Mode: Python -*-
|
|
|
|
##
|
|
# = Compatibility policy
|
|
##
|
|
|
|
##
|
|
# @CompatPolicyInput:
|
|
#
|
|
# Policy for handling "funny" input.
|
|
#
|
|
# @accept: Accept silently
|
|
# @reject: Reject with an error
|
|
# @crash: abort() the process
|
|
#
|
|
# Since: 6.0
|
|
##
|
|
{ 'enum': 'CompatPolicyInput',
|
|
'data': [ 'accept', 'reject', 'crash' ] }
|
|
|
|
##
|
|
# @CompatPolicyOutput:
|
|
#
|
|
# Policy for handling "funny" output.
|
|
#
|
|
# @accept: Pass on unchanged
|
|
# @hide: Filter out
|
|
#
|
|
# Since: 6.0
|
|
##
|
|
{ 'enum': 'CompatPolicyOutput',
|
|
'data': [ 'accept', 'hide' ] }
|
|
|
|
##
|
|
# @CompatPolicy:
|
|
#
|
|
# Policy for handling deprecated management interfaces.
|
|
#
|
|
# This is intended for testing users of the management interfaces.
|
|
#
|
|
# Limitation: covers only syntactic aspects of QMP, i.e. stuff tagged
|
|
# with feature 'deprecated'. We may want to extend it to cover
|
|
# semantic aspects, CLI, and experimental features.
|
|
#
|
|
# Limitation: deprecated-output policy @hide is not implemented for
|
|
# enumeration values. They behave the same as with policy @accept.
|
|
#
|
|
# @deprecated-input: how to handle deprecated input (default 'accept')
|
|
# @deprecated-output: how to handle deprecated output (default 'accept')
|
|
#
|
|
# Since: 6.0
|
|
##
|
|
{ 'struct': 'CompatPolicy',
|
|
'data': { '*deprecated-input': 'CompatPolicyInput',
|
|
'*deprecated-output': 'CompatPolicyOutput' } }
|