mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 11:53:53 -06:00
docs/interop: Convert qmp-spec.txt to rST
Convert the qmp-spec.txt document to restructuredText. Notable points about the conversion: * numbers at the start of section headings are removed, to match the style of the rest of the manual * cross-references to other sections or documents are hyperlinked * various formatting tweaks (notably the examples, which need the -> and <- prefixed so the QMP code-block lexer will accept them) * English prose fixed in a few places Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230515162245.3964307-2-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> [.. code-block:: dumbed down to :: to work around CI failure]
This commit is contained in:
parent
290e48e8f1
commit
d56572584d
8 changed files with 199 additions and 163 deletions
|
@ -54,7 +54,7 @@ class Model:
|
|||
|
||||
class Greeting(Model):
|
||||
"""
|
||||
Defined in qmp-spec.txt, section 2.2, "Server Greeting".
|
||||
Defined in qmp-spec.rst, section "Server Greeting".
|
||||
|
||||
:param raw: The raw Greeting object.
|
||||
:raise KeyError: If any required fields are absent.
|
||||
|
@ -82,7 +82,7 @@ class Greeting(Model):
|
|||
|
||||
class QMPGreeting(Model):
|
||||
"""
|
||||
Defined in qmp-spec.txt, section 2.2, "Server Greeting".
|
||||
Defined in qmp-spec.rst, section "Server Greeting".
|
||||
|
||||
:param raw: The raw QMPGreeting object.
|
||||
:raise KeyError: If any required fields are absent.
|
||||
|
@ -104,7 +104,7 @@ class QMPGreeting(Model):
|
|||
|
||||
class ErrorResponse(Model):
|
||||
"""
|
||||
Defined in qmp-spec.txt, section 2.4.2, "error".
|
||||
Defined in qmp-spec.rst, section "Error".
|
||||
|
||||
:param raw: The raw ErrorResponse object.
|
||||
:raise KeyError: If any required fields are absent.
|
||||
|
@ -126,7 +126,7 @@ class ErrorResponse(Model):
|
|||
|
||||
class ErrorInfo(Model):
|
||||
"""
|
||||
Defined in qmp-spec.txt, section 2.4.2, "error".
|
||||
Defined in qmp-spec.rst, section "Error".
|
||||
|
||||
:param raw: The raw ErrorInfo object.
|
||||
:raise KeyError: If any required fields are absent.
|
||||
|
|
|
@ -369,7 +369,7 @@ class QMPClient(AsyncProtocol[Message], Events):
|
|||
# This is very likely a server parsing error.
|
||||
# It doesn't inherently belong to any pending execution.
|
||||
# Instead of performing clever recovery, just terminate.
|
||||
# See "NOTE" in qmp-spec.txt, section 2.4.2
|
||||
# See "NOTE" in qmp-spec.rst, section "Error".
|
||||
raise ServerParseError(
|
||||
("Server sent an error response without an ID, "
|
||||
"but there are no ID-less executions pending. "
|
||||
|
@ -377,7 +377,7 @@ class QMPClient(AsyncProtocol[Message], Events):
|
|||
msg
|
||||
)
|
||||
|
||||
# qmp-spec.txt, section 2.4:
|
||||
# qmp-spec.rst, section "Commands Responses":
|
||||
# 'Clients should drop all the responses
|
||||
# that have an unknown "id" field.'
|
||||
self.logger.log(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue