qapi: Fix unintended definition lists in documentation

rST parses something like

    first line
        second line

as a definition list item, where "first line" is the term being
defined by "second line".

This bites us in a couple of places.  Here's one:

    # @bps_max: total throughput limit during bursts,
    #                     in bytes (Since 1.7)

scripts/qapi/parser.py parses this into an "argument section" with
name "bps_max" and text

    total throughput limit during bursts,
	      in bytes (Since 1.7)

docs/sphinx/qapidoc.py duly passes the text to the rST parser, which
parses it as another definition list.  Comes out as nested
definitions: term "bps_max: int (optional)" defined as term "total
throughput limit during bursts," defined as "in bytes (Since 1.7)".

rST truly is the Perl of ASCII-based markups.

Fix by deleting the extra indentation.

Fixes: 26ec4e53f2 (qapi: Fix indent level on doc comments in json files)
Fixes: c0ac533b6f (qapi: Stop using whitespace for alignment in comments)
Fixes: 81ad2964e9 (net/vmnet: add vmnet backends to qapi/net)
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230425064223.820979-11-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2023-04-25 08:42:17 +02:00
parent c110102898
commit f2de3b926c
4 changed files with 30 additions and 30 deletions

View file

@ -488,42 +488,42 @@
#
# @image: the info of image used (since: 1.6)
#
# @bps_max: total throughput limit during bursts,
# in bytes (Since 1.7)
# @bps_max: total throughput limit during bursts, in bytes
# (Since 1.7)
#
# @bps_rd_max: read throughput limit during bursts,
# in bytes (Since 1.7)
# @bps_rd_max: read throughput limit during bursts, in bytes
# (Since 1.7)
#
# @bps_wr_max: write throughput limit during bursts,
# in bytes (Since 1.7)
# @bps_wr_max: write throughput limit during bursts, in bytes
# (Since 1.7)
#
# @iops_max: total I/O operations per second during bursts,
# in bytes (Since 1.7)
# @iops_max: total I/O operations per second during bursts, in bytes
# (Since 1.7)
#
# @iops_rd_max: read I/O operations per second during bursts,
# in bytes (Since 1.7)
# @iops_rd_max: read I/O operations per second during bursts, in bytes
# (Since 1.7)
#
# @iops_wr_max: write I/O operations per second during bursts,
# in bytes (Since 1.7)
# @iops_wr_max: write I/O operations per second during bursts, in
# bytes (Since 1.7)
#
# @bps_max_length: maximum length of the @bps_max burst
# @bps_max_length: maximum length of the @bps_max burst period, in
# seconds. (Since 2.6)
#
# @bps_rd_max_length: maximum length of the @bps_rd_max burst period,
# in seconds. (Since 2.6)
#
# @bps_wr_max_length: maximum length of the @bps_wr_max burst period,
# in seconds. (Since 2.6)
#
# @iops_max_length: maximum length of the @iops burst period, in
# seconds. (Since 2.6)
#
# @iops_rd_max_length: maximum length of the @iops_rd_max burst
# period, in seconds. (Since 2.6)
#
# @bps_rd_max_length: maximum length of the @bps_rd_max
# burst period, in seconds. (Since 2.6)
#
# @bps_wr_max_length: maximum length of the @bps_wr_max
# burst period, in seconds. (Since 2.6)
#
# @iops_max_length: maximum length of the @iops burst
# @iops_wr_max_length: maximum length of the @iops_wr_max burst
# period, in seconds. (Since 2.6)
#
# @iops_rd_max_length: maximum length of the @iops_rd_max
# burst period, in seconds. (Since 2.6)
#
# @iops_wr_max_length: maximum length of the @iops_wr_max
# burst period, in seconds. (Since 2.6)
#
# @iops_size: an I/O size in bytes (Since 1.7)
#
# @group: throttle group name (Since 2.4)