qapi: convert "Example" sections with titles
When an Example section has a brief explanation, convert it to a
qmp-example:: section using the :title: option.
Rule of thumb: If the title can fit on a single line and requires no rST
markup, it's a good candidate for using the :title: option of
qmp-example.
In this patch, trailing punctuation is removed from the title section
for consistent headline aesthetics. In just one case, specifics of the
example are removed to make the title read better.
See commit-4: "docs/qapidoc: create qmp-example directive", for a
detailed explanation of this custom directive syntax.
See commit+2: "qapi: remove "Example" doc section" for a detailed
explanation of why.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240717021312.606116-8-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
14b48aaab9
commit
a9eab6e2e6
6 changed files with 52 additions and 48 deletions
|
|
@ -342,9 +342,8 @@
|
|||
#
|
||||
# Since: 2.5
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# 1. Change a removable medium
|
||||
# .. qmp-example::
|
||||
# :title: Change a removable medium
|
||||
#
|
||||
# -> { "execute": "blockdev-change-medium",
|
||||
# "arguments": { "id": "ide0-1-0",
|
||||
|
|
@ -352,7 +351,8 @@
|
|||
# "format": "raw" } }
|
||||
# <- { "return": {} }
|
||||
#
|
||||
# 2. Load a read-only medium into a writable drive
|
||||
# .. qmp-example::
|
||||
# :title: Load a read-only medium into a writable drive
|
||||
#
|
||||
# -> { "execute": "blockdev-change-medium",
|
||||
# "arguments": { "id": "floppyA",
|
||||
|
|
@ -577,9 +577,8 @@
|
|||
# "boundaries-write": [1000, 5000] } }
|
||||
# <- { "return": {} }
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# Remove all latency histograms:
|
||||
# .. qmp-example::
|
||||
# :title: Remove all latency histograms
|
||||
#
|
||||
# -> { "execute": "block-latency-histogram-set",
|
||||
# "arguments": { "id": "drive0" } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue