qmp: Deprecate query-events in favor of query-qmp-schema
authorMarkus Armbruster <armbru@redhat.com>
Thu, 14 Feb 2019 15:22:50 +0000 (16:22 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 18 Feb 2019 13:44:05 +0000 (14:44 +0100)
query-events doesn't reflect compile-time configuration.  Instead of
fixing that, deprecate the command in favor of query-qmp-schema.

Libvirt prefers query-qmp-schema as of commit 22d7222ec0 "qemu: caps:
Don't call 'query-events' when we probe events from QMP schema".
It'll be in the next release.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190214152251.2073-18-armbru@redhat.com>

monitor.c
qapi/misc.json
qemu-deprecated.texi

index 1673db701557538f50af5a7ae1a70caa67a49d3c..33ccbf3957aa2f0856a0a57afee9bf477ae2b5c2 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -1099,6 +1099,11 @@ CommandInfoList *qmp_query_commands(Error **errp)
 
 EventInfoList *qmp_query_events(Error **errp)
 {
+    /*
+     * TODO This deprecated command is the only user of
+     * QAPIEvent_str() and QAPIEvent_lookup[].  When the command goes,
+     * they should go, too.
+     */
     EventInfoList *info, *ev_list = NULL;
     QAPIEvent e;
 
index 82f914735331b5b5a91b517a8982382072bb5757..98f59f828afda79df7b76ca4671711d63acd371a 100644 (file)
 ##
 # @query-events:
 #
-# Return a list of supported QMP events by this server
+# Return information on QMP events.
 #
-# Returns: A list of @EventInfo for all supported events
+# Returns: A list of @EventInfo.
 #
 # Since: 1.2.0
 #
+# Note: This command is deprecated, because its output doesn't reflect
+# compile-time configuration.  Use query-qmp-schema instead.
+#
 # Example:
 #
 # -> { "execute": "query-events" }
index fe905551c598afc17b31006efd664c56f4bde719..45c57952da5625bdcabd419e4a3ccceb00d72667 100644 (file)
@@ -82,6 +82,11 @@ Use ``device_add'' for hotplugging vCPUs instead of ``cpu-add''.  See
 documentation of ``query-hotpluggable-cpus'' for additional
 details.
 
+@subsection query-events (since 4.0)
+
+The ``query-events'' command has been superseded by the more powerful
+and accurate ``query-qmp-schema'' command.
+
 @section Human Monitor Protocol (HMP) commands
 
 @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (since 3.1)