From ca9567e23454ca94e3911710da4e953ad049b40f Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Thu, 4 Feb 2010 18:10:04 -0200 Subject: QMP: Add QEMU's version to the greeting message With capability negotiation support clients will only have a chance to check QEMU's version (ie. issue 'query-version') after the negotiation procedure is done. It might be useful to clients to check QEMU's version before negotiating features, though. To allow that, this commit adds the QEMU's version object to the greeting message. Not really sure this is needed, but doesn't hurt anyway. Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- QMP/README | 6 ++++-- QMP/qmp-spec.txt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'QMP') diff --git a/QMP/README b/QMP/README index 09e7053753..9334c25510 100644 --- a/QMP/README +++ b/QMP/README @@ -52,9 +52,11 @@ $ telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. -{"QMP": {"capabilities": []}} +{"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": []}} +{ "execute": "qmp_capabilities" } +{"return": {}} { "execute": "query-version" } -{"return": {"qemu": "0.11.50", "package": ""}} +{"return": {"qemu": "0.12.50", "package": ""}} Contact ------- diff --git a/QMP/qmp-spec.txt b/QMP/qmp-spec.txt index 56f388c3b3..b2617bb2f0 100644 --- a/QMP/qmp-spec.txt +++ b/QMP/qmp-spec.txt @@ -48,10 +48,12 @@ waiting for commands. The format is: -{ "QMP": { "capabilities": json-array } } +{ "QMP": { "version": json-object, "capabilities": json-array } } Where, +- The "version" member contains the Server's version information (the format + is the same of the 'query-version' command) - The "capabilities" member specify the availability of features beyond the baseline specification @@ -152,7 +154,7 @@ This section provides some examples of real QMP usage, in all of them 3.1 Server greeting ------------------- -S: {"QMP": {"capabilities": []}} +S: {"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": []}} 3.2 Simple 'stop' execution --------------------------- -- cgit v1.2.3