qapi-schema: Generated doc structure fixes
cover qapi-schema: Generated doc structure fixes
Markus Armbruster (3):
qapi-schema: Document how generated documentation is ordered
qapi-schema: Introspection doc is in the wrong section, fix
qapi-schema: Rocker doc section contains unrelated stuff, fix
qapi-schema.json | 21 +++++++-------------- qapi/introspect.json | 6 ++++-- 2 files changed, 11 insertions(+), 16 deletions(-)
Signature · 1 line
2.7.5
PATCH 1/3 qapi-schema: Document how generated documentation is ordered
Documentation generated with qapi2texi.py is in textual order, with included sub-schemas inserted at the first include directive (subsequent include directives have no effect). To get a sane and stable order, it's best to include each sub-schema just once, or include it first in qapi-schema.json. Document that.
While there, drop a few redundant comments.
--- qapi-schema.json | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
qapi-schema.json +6 -11
@@ -72,22 +72,17 @@ 'q_obj_CpuInfo-base' # CPU, visible through query-cpu ] } } -# QAPI common definitions +# Documentation generated with qapi2texi.py is in textual order, with +# included sub-schemas inserted at the first include directive +# (subsequent include directives have no effect). To get a sane and +# stable order, it's best to include each sub-schema just once, or +# include it first in qapi-schema.json. + { 'include': 'qapi/common.json' } - -# QAPI crypto definitions { 'include': 'qapi/crypto.json' } - -# QAPI block definitions { 'include': 'qapi/block.json' } - -# QAPI event definitions { 'include': 'qapi/event.json' } - -# Tracing commands { 'include': 'qapi/trace.json' } - -# QAPI introspection { 'include': 'qapi/introspect.json' } ##
Signature · 1 line
2.7.5
PATCH 2/3 qapi-schema: Introspection doc is in the wrong section, fix
In reply to Markus ArmbrusterBug: introspection documentation is in section "Tracing commands".
Cause: sub-schema qapi/introspect.json lacks a section header, and therefore goes into whatever section precedes its include.
Fix: add a section header.
--- qapi/introspect.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
qapi/introspect.json +4 -2
@@ -1,7 +1,5 @@ # -*- Mode: Python -*- # -# QAPI/QMP introspection -# # Copyright (C) 2015 Red Hat, Inc. # # Authors:
@@ -11,6 +9,10 @@ # See the COPYING file in the top-level directory. ## +# = QMP introspection +## + +## # @query-qmp-schema: # # Command query-qmp-schema exposes the QMP wire ABI as an array of
Signature · 1 line
2.7.5
PATCH 3/3 qapi-schema: Rocker doc section contains unrelated stuff, fix
In reply to Markus ArmbrusterBug: section "Rocker switch device" starts with the rocker stuff, but then has unrelated stuff, like ReplayMode, xen-load-devices-state, ...
Cause: rocker.json is included in the middle of section "QMP commands".
Fix: include it in a sane place, namely next to the other sub-schemas.
--- qapi-schema.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
qapi-schema.json +1 -3
@@ -82,6 +82,7 @@ { 'include': 'qapi/crypto.json' } { 'include': 'qapi/block.json' } { 'include': 'qapi/event.json' } +{ 'include': 'qapi/rocker.json' } { 'include': 'qapi/trace.json' } { 'include': 'qapi/introspect.json' }
@@ -6273,9 +6274,6 @@ ## { 'command': 'rtc-reset-reinjection' } -# Rocker ethernet network switch -{ 'include': 'qapi/rocker.json' } - ## # @ReplayMode: #
Signature · 1 line
2.7.5
Re: [Qemu-devel] [PATCH 2/3] qapi-schema: Introspection doc is in the wrong section, fix
In reply to Markus ArmbrusterQuoted 8 lines · Markus Armbruster
Bug: introspection documentation is in section "Tracing commands".
Cause: sub-schema
qapi/introspect.jsonlacks a section header, and therefore goes into whatever section precedes its include.Fix: add a section header.
Signed-off-by Markus Armbruster <[email protected]>
Quoted 31 lines
--- qapi/introspect.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)qapi/introspect.json +4
-3@@ -1,7 +1,5 @@ # -*- Mode: Python -*- # -# QAPI/QMP introspection -# # Copyright (C) 2015 Red Hat, Inc. # # Authors:@@ -11,6 +9,10 @@ # See the COPYING file in the top-level directory. ## +# = QMP introspection +## + +## # @query-qmp-schema: # # Command query-qmp-schema exposes the QMP wire ABI as an array of --2.7.5
Signature · 1 line
Marc-André Lureau
Re: [Qemu-devel] [PATCH 3/3] qapi-schema: Rocker doc section contains unrelated stuff, fix
In reply to Markus ArmbrusterQuoted 39 lines · Markus Armbruster
Bug: section "Rocker switch device" starts with the rocker stuff, but then has unrelated stuff, like ReplayMode, xen-load-devices-state, ...
Cause: rocker.json is included in the middle of section "QMP commands".
Fix: include it in a sane place, namely next to the other sub-schemas.
Signed-off-by Markus Armbruster <[email protected]>--- qapi-schema.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)qapi-schema.json +1
-4@@ -82,6 +82,7 @@ { 'include': 'qapi/crypto.json' } { 'include': 'qapi/block.json' } { 'include': 'qapi/event.json' } +{ 'include': 'qapi/rocker.json' } { 'include': 'qapi/trace.json' } { 'include': 'qapi/introspect.json' }@@ -6273,9 +6274,6 @@ ## { 'command': 'rtc-reset-reinjection' } -# Rocker ethernet network switch -{ 'include': 'qapi/rocker.json' } - ## # @ReplayMode: # --2.7.5
Signature · 1 line
Marc-André Lureau
Re: [Qemu-devel] [PATCH 3/3] qapi-schema: Rocker doc section contains unrelated stuff, fix
In reply to Markus ArmbrusterQuoted 8 lines · Markus Armbruster
Bug: section "Rocker switch device" starts with the rocker stuff, but then has unrelated stuff, like ReplayMode, xen-load-devices-state, ...
Cause: rocker.json is included in the middle of section "QMP commands".
Fix: include it in a sane place, namely next to the other sub-schemas.
Signed-off-by Markus Armbruster <[email protected]>
Quoted 30 lines
--- qapi-schema.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)qapi-schema.json +1
-4@@ -82,6 +82,7 @@ { 'include': 'qapi/crypto.json' } { 'include': 'qapi/block.json' } { 'include': 'qapi/event.json' } +{ 'include': 'qapi/rocker.json' } { 'include': 'qapi/trace.json' } { 'include': 'qapi/introspect.json' }@@ -6273,9 +6274,6 @@ ## { 'command': 'rtc-reset-reinjection' } -# Rocker ethernet network switch -{ 'include': 'qapi/rocker.json' } - ## # @ReplayMode: # --2.7.5
Signature · 1 line
Marc-André Lureau
Re: [Qemu-devel] [PATCH 1/3] qapi-schema: Document how generated documentation is ordered
In reply to Markus ArmbrusterQuoted 9 lines · Markus Armbruster
Documentation generated with
qapi2texi.pyis in textual order, with included sub-schemas inserted at the first include directive (subsequent include directives have no effect). To get a sane and stable order, it's best to include each sub-schema just once, or include it first in qapi-schema.json. Document that.While there, drop a few redundant comments.
Signed-off-by Markus Armbruster <[email protected]>
Quoted 41 lines
--- qapi-schema.json | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)qapi-schema.json +6
-12@@ -72,22 +72,17 @@ 'q_obj_CpuInfo-base' # CPU, visible through query-cpu ] } } -# QAPI common definitions +# Documentation generated with qapi2texi.py is in textual order, with +# included sub-schemas inserted at the first include directive +# (subsequent include directives have no effect). To get a sane and +# stable order, it's best to include each sub-schema just once, or +# include it first in qapi-schema.json. + { 'include': 'qapi/common.json' } - -# QAPI crypto definitions { 'include': 'qapi/crypto.json' } - -# QAPI block definitions { 'include': 'qapi/block.json' } - -# QAPI event definitions { 'include': 'qapi/event.json' } - -# Tracing commands { 'include': 'qapi/trace.json' } - -# QAPI introspection { 'include': 'qapi/introspect.json' } ## --2.7.5
Signature · 1 line
Marc-André Lureau