From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, armbru@redhat.com
Subject: [Qemu-devel] [PATCH 4/4] QMP: spec: Capability negotiation updates
Date: Thu, 4 Feb 2010 18:10:07 -0200 [thread overview]
Message-ID: <1265314207-6323-5-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1265314207-6323-1-git-send-email-lcapitulino@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
QMP/qmp-spec.txt | 46 +++++++++++++++++++++++++++++-----------------
1 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/QMP/qmp-spec.txt b/QMP/qmp-spec.txt
index b2617bb..f3c0327 100644
--- a/QMP/qmp-spec.txt
+++ b/QMP/qmp-spec.txt
@@ -44,7 +44,8 @@ they can be in ANY order, thus no particular order should be assumed.
Right when connected the Server will issue a greeting message, which signals
that the connection has been successfully established and that the Server is
-waiting for commands.
+ready for capabilities negotiation (for more information refer to section
+'4. Capabilities Negotiation').
The format is:
@@ -181,25 +182,36 @@ S: {"error": {"class": "JSONParsing", "desc": "Invalid JSON syntax", "data":
S: {"timestamp": {"seconds": 1258551470, "microseconds": 802384}, "event":
"POWERDOWN"}
-4. Compatibility Considerations
---------------------------------
+4. Capabilities Negotiation
+----------------------------
-In order to achieve maximum compatibility between versions, Clients must not
-assume any particular:
+When a Client successfully establishes a connection, the Server is in
+Capabilities Negotiation mode.
-- Size of json-objects or length of json-arrays
-- Order of json-object members or json-array elements
-- Amount of errors generated by a command, that is, new errors can be added
- to any existing command in newer versions of the Server
+In this mode only the 'qmp_capabilities' command is allowed to run, all
+other commands will return the CommandNotFound error. Asynchronous messages
+are not delivered either.
+
+Clients should use the 'qmp_capabilities' command to enable capabilities
+advertised in the Server's greeting (section '2.2 Server Greeting') they
+support.
-Additionally, Clients should always:
+When the 'qmp_capabilities' command is issued, and if it does not return an
+error, the Server enters in Command mode where capabilities changes take
+effect, all commands (except 'qmp_capabilities') are allowed and asynchronous
+messages are delivered.
-- Check the capabilities json-array at connection time
-- Check the availability of commands with 'query-commands' before issuing them
+5 Compatibility Considerations
+------------------------------
-5. Recommendations to Client implementors
------------------------------------------
+All protocol changes or new features which modify the protocol format in an
+incompatible way are disabled by default and will be advertised by the
+capabilities array (section '2.2 Server Greeting'). Thus, Clients can check
+that array and enable the capabilities they support.
-5.1 The Server should be always started in pause mode, thus the Client is
- able to perform any setup procedure without the risk of race conditions
- and related problems
+Additionally, Clients must not assume any particular:
+
+- Size of json-objects or length of json-arrays
+- Order of json-object members or json-array elements
+- Amount of errors generated by a command, that is, new errors can be added
+ to any existing command in newer versions of the Server
--
1.6.6
next prev parent reply other threads:[~2010-02-04 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 20:10 [Qemu-devel] [PATCH v2 0/4]: QMP capability negotiation support Luiz Capitulino
2010-02-04 20:10 ` [Qemu-devel] [PATCH 1/4] QMP: Add QEMU's version to the greeting message Luiz Capitulino
2010-02-10 19:29 ` Anthony Liguori
2010-02-04 20:10 ` [Qemu-devel] [PATCH 2/4] QMP: Introduce the qmp_capabilities command Luiz Capitulino
2010-02-04 20:10 ` [Qemu-devel] [PATCH 3/4] QMP: Enforce capability negotiation rules Luiz Capitulino
2010-02-04 20:10 ` Luiz Capitulino [this message]
2010-02-05 9:08 ` [Qemu-devel] [PATCH v2 0/4]: QMP capability negotiation support Markus Armbruster
-- strict thread matches above, loose matches on Subject: below --
2010-02-04 14:24 [Qemu-devel] [PATCH v1 " Luiz Capitulino
2010-02-04 14:24 ` [Qemu-devel] [PATCH 4/4] QMP: spec: Capability negotiation updates Luiz Capitulino
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=1265314207-6323-5-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@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).