From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
"Peter Krempa" <pkrempa@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
libvir-list@redhat.com, mdroth@linux.vnet.ibm.com,
libguestfs@redhat.com
Subject: [PATCH v3 00/34] Configurable policy for handling deprecated interfaces
Date: Sun, 15 Mar 2020 15:46:19 +0100 [thread overview]
Message-ID: <20200315144653.22660-1-armbru@redhat.com> (raw)
This series extends QMP introspection to cover deprecation.
Additionally, new option -compat lets you configure what to do when
deprecated interfaces get used. This is intended for testing users of
the management interfaces. It is experimental.
-compat deprecated-input=<in-policy> configures what to do when
deprecated input is received. Available policies:
* accept: Accept deprecated commands and arguments (default)
* reject: Reject them
* crash: Crash
-compat deprecated-output=<out-policy> configures what to do when
deprecated output is sent. Available output policies:
* accept: Emit deprecated command results and events (default)
* hide: Suppress them
For now, -compat covers only deprecated syntactic aspects of QMP. We
may want to extend it to cover semantic aspects, CLI, and experimental
features.
PATCH 01-04: Documentation fixes
PATCH 05-10: Test improvements
PATCH 11-24: Add feature flags to remaining user-defined types and to
struct members
PATCH 25-26: New special feature 'deprecated', visible in
introspection
PATCH 27-34: New -compat to set policy for handling stuff marked with
feature 'deprecated'
v3:
* Rebased, non-trivial conflicts in PATCH 01+26+27+34 due to RST
conversion and code motion
* PATCH 28-29: Old PATCH 28 split up to ease review
* PATCH 30-31: New
* PATCH 32-33: Old PATCH 29 split up to ease review
Comparison to RFC (24 Oct 2019):
* Cover arguments and results in addition to commands and events
* Half-baked "[RFC PATCH 18/19] qapi: Include a warning in the
response to a deprecated command" dropped
See also last item of
Subject: Minutes of KVM Forum BoF on deprecating stuff
Date: Fri, 26 Oct 2018 16:03:51 +0200
Message-ID: <87mur0ls8o.fsf@dusky.pond.sub.org>
https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg05828.html
Cc: Lukáš Doktor <ldoktor@redhat.com>
Cc: libguestfs@redhat.com
Cc: libvir-list@redhat.com
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Peter Krempa <pkrempa@redhat.com>
Markus Armbruster (34):
qemu-doc: Belatedly document QMP command arg & result deprecation
qapi: Belatedly update doc comment for @wait deprecation
docs/devel/qapi-code-gen: Clarify allow-oob introspection
docs/devel/qapi-code-gen: Document 'features' introspection
tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers
tests/test-qmp-cmds: Check responses more thoroughly
tests/test-qmp-cmds: Simplify test data setup
tests/test-qmp-event: Simplify test data setup
tests/test-qmp-event: Use qobject_is_equal()
tests/test-qmp-event: Check event is actually emitted
qapi/schema: Clean up around QAPISchemaEntity.connect_doc()
qapi: Add feature flags to remaining definitions
qapi: Consistently put @features parameter right after @ifcond
qapi/introspect: Rename *qlit* to reduce confusion
qapi/introspect: Factor out _make_tree()
qapi/schema: Change _make_features() to a take feature list
qapi/schema: Reorder classes so related ones are together
qapi/schema: Rename QAPISchemaObjectType{Variant,Variants}
qapi/schema: Call QAPIDoc.connect_member() in just one place
qapi: Add feature flags to struct members
qapi: Inline do_qmp_dispatch() into qmp_dispatch()
qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP
qapi: Simplify how qmp_dispatch() gets the request ID
qapi: Replace qmp_dispatch()'s TODO comment by an explanation
qapi: New special feature flag "deprecated"
qapi: Mark deprecated QMP parts with feature 'deprecated'
qemu-options: New -compat to set policy for deprecated interfaces
qapi: Implement deprecated-output=hide for QMP command results
qapi: Implement deprecated-output=hide for QMP events
qapi: Implement deprecated-output=hide for QMP event data
qapi: Implement deprecated-output=hide for QMP introspection
qapi: Implement deprecated-input=reject for QMP commands
qapi: Implement deprecated-input=reject for QMP command arguments
qapi: New -compat deprecated-input=crash
docs/devel/qapi-code-gen.txt | 79 ++-
docs/system/deprecated.rst | 48 +-
tests/qapi-schema/doc-good.texi | 32 ++
qapi/block-core.json | 48 +-
qapi/block.json | 30 +-
qapi/char.json | 1 +
qapi/compat.json | 52 ++
qapi/control.json | 11 +-
qapi/introspect.json | 28 +-
qapi/machine.json | 34 +-
qapi/migration.json | 36 +-
qapi/misc.json | 13 +-
qapi/qapi-schema.json | 1 +
include/qapi/compat-policy.h | 20 +
include/qapi/qmp/dispatch.h | 1 +
include/qapi/qobject-input-visitor.h | 9 +
include/qapi/qobject-output-visitor.h | 9 +
include/qapi/visitor-impl.h | 3 +
include/qapi/visitor.h | 9 +
monitor/monitor-internal.h | 3 -
monitor/misc.c | 2 -
monitor/qmp-cmds-control.c | 102 +++-
qapi/qapi-visit-core.c | 9 +
qapi/qmp-dispatch.c | 137 ++---
qapi/qobject-input-visitor.c | 29 ++
qapi/qobject-output-visitor.c | 20 +
qemu-storage-daemon.c | 2 -
softmmu/vl.c | 17 +
tests/test-qmp-cmds.c | 249 +++++----
tests/test-qmp-event.c | 201 +++-----
qapi/Makefile.objs | 8 +-
qapi/trace-events | 1 +
qemu-options.hx | 22 +
scripts/qapi/commands.py | 20 +-
scripts/qapi/doc.py | 16 +-
scripts/qapi/events.py | 22 +-
scripts/qapi/expr.py | 14 +-
scripts/qapi/introspect.py | 104 ++--
scripts/qapi/schema.py | 488 ++++++++++--------
scripts/qapi/types.py | 8 +-
scripts/qapi/visit.py | 28 +-
tests/Makefile.include | 1 +
tests/qapi-schema/alternate-base.err | 2 +-
tests/qapi-schema/doc-good.json | 22 +-
tests/qapi-schema/doc-good.out | 18 +
.../qapi-schema/features-deprecated-type.err | 2 +
.../qapi-schema/features-deprecated-type.json | 3 +
.../qapi-schema/features-deprecated-type.out | 0
tests/qapi-schema/qapi-schema-test.json | 51 +-
tests/qapi-schema/qapi-schema-test.out | 48 +-
tests/qapi-schema/test-qapi.py | 26 +-
51 files changed, 1384 insertions(+), 755 deletions(-)
create mode 100644 qapi/compat.json
create mode 100644 include/qapi/compat-policy.h
create mode 100644 tests/qapi-schema/features-deprecated-type.err
create mode 100644 tests/qapi-schema/features-deprecated-type.json
create mode 100644 tests/qapi-schema/features-deprecated-type.out
--
2.21.1
next reply other threads:[~2020-03-15 15:07 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-15 14:46 Markus Armbruster [this message]
2020-03-15 14:46 ` [PATCH v3 01/34] qemu-doc: Belatedly document QMP command arg & result deprecation Markus Armbruster
2020-03-16 15:10 ` Eric Blake
2020-03-16 18:34 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 02/34] qapi: Belatedly update doc comment for @wait deprecation Markus Armbruster
2020-03-16 14:51 ` Marc-André Lureau
2020-03-16 15:10 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 03/34] docs/devel/qapi-code-gen: Clarify allow-oob introspection Markus Armbruster
2020-03-16 15:12 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 04/34] docs/devel/qapi-code-gen: Document 'features' introspection Markus Armbruster
2020-03-16 15:15 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 05/34] tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers Markus Armbruster
2020-03-16 15:06 ` Marc-André Lureau
2020-03-16 19:46 ` Markus Armbruster
2020-03-16 17:16 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 06/34] tests/test-qmp-cmds: Check responses more thoroughly Markus Armbruster
2020-03-16 15:08 ` Marc-André Lureau
2020-03-16 17:18 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 07/34] tests/test-qmp-cmds: Simplify test data setup Markus Armbruster
2020-03-16 15:10 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 08/34] tests/test-qmp-event: " Markus Armbruster
2020-03-16 15:11 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 09/34] tests/test-qmp-event: Use qobject_is_equal() Markus Armbruster
2020-03-16 15:13 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 10/34] tests/test-qmp-event: Check event is actually emitted Markus Armbruster
2020-03-16 15:14 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 11/34] qapi/schema: Clean up around QAPISchemaEntity.connect_doc() Markus Armbruster
2020-03-16 16:47 ` Marc-André Lureau
2020-03-16 17:23 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 12/34] qapi: Add feature flags to remaining definitions Markus Armbruster
2020-03-16 17:55 ` Eric Blake
2020-03-17 5:46 ` Markus Armbruster
2020-03-17 11:29 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 13/34] qapi: Consistently put @features parameter right after @ifcond Markus Armbruster
2020-03-16 16:52 ` Marc-André Lureau
2020-03-16 17:57 ` Eric Blake
2020-03-15 14:46 ` [PATCH v3 14/34] qapi/introspect: Rename *qlit* to reduce confusion Markus Armbruster
2020-03-16 16:54 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 15/34] qapi/introspect: Factor out _make_tree() Markus Armbruster
2020-03-16 16:58 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 16/34] qapi/schema: Change _make_features() to a take feature list Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 17/34] qapi/schema: Reorder classes so related ones are together Markus Armbruster
2020-03-16 17:03 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 18/34] qapi/schema: Rename QAPISchemaObjectType{Variant, Variants} Markus Armbruster
2020-03-16 17:06 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 19/34] qapi/schema: Call QAPIDoc.connect_member() in just one place Markus Armbruster
2020-03-16 17:08 ` Marc-André Lureau
2020-03-16 17:08 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 20/34] qapi: Add feature flags to struct members Markus Armbruster
2020-03-16 17:10 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 21/34] qapi: Inline do_qmp_dispatch() into qmp_dispatch() Markus Armbruster
2020-03-16 17:25 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 22/34] qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP Markus Armbruster
2020-03-16 17:28 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 23/34] qapi: Simplify how qmp_dispatch() gets the request ID Markus Armbruster
2020-03-16 17:33 ` Marc-André Lureau
2020-03-17 6:39 ` Markus Armbruster
2020-03-17 7:37 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 24/34] qapi: Replace qmp_dispatch()'s TODO comment by an explanation Markus Armbruster
2020-03-16 17:36 ` Marc-André Lureau
2020-03-17 6:52 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 25/34] qapi: New special feature flag "deprecated" Markus Armbruster
2020-03-15 15:49 ` Philippe Mathieu-Daudé
2020-03-15 16:53 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 26/34] qapi: Mark deprecated QMP parts with feature 'deprecated' Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 27/34] qemu-options: New -compat to set policy for deprecated interfaces Markus Armbruster
2020-03-16 17:43 ` Marc-André Lureau
2020-03-15 14:46 ` [PATCH v3 28/34] qapi: Implement deprecated-output=hide for QMP command results Markus Armbruster
2020-03-16 17:53 ` Marc-André Lureau
2020-03-16 19:46 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 29/34] qapi: Implement deprecated-output=hide for QMP events Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 30/34] qapi: Implement deprecated-output=hide for QMP event data Markus Armbruster
2020-03-16 19:48 ` Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 31/34] qapi: Implement deprecated-output=hide for QMP introspection Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 32/34] qapi: Implement deprecated-input=reject for QMP commands Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 33/34] qapi: Implement deprecated-input=reject for QMP command arguments Markus Armbruster
2020-03-15 14:46 ` [PATCH v3 34/34] qapi: New -compat deprecated-input=crash Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200315144653.22660-1-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=ldoktor@redhat.com \
--cc=libguestfs@redhat.com \
--cc=libvir-list@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).