The qapi2texi scripts uses a template for the texi file. Since we are going to generate the documentation in multiple formats, move qmp-intro to qemu-qapi template. (it would be nice to write something similar for qemu-ga, but this is left for a future patch)
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- docs/qemu-ga-qapi.template.texi | 58 ++++++++++++++++ docs/qemu-qapi.template.texi | 148 ++++++++++++++++++++++++++++++++++++++++ docs/qmp-intro.txt | 87 ----------------------- 3 files changed, 206 insertions(+), 87 deletions(-) create mode 100644 docs/qemu-ga-qapi.template.texi create mode 100644 docs/qemu-qapi.template.texi delete mode 100644 docs/qmp-intro.txt diff --git a/docs/qemu-ga-qapi.template.texi b/docs/qemu-ga-qapi.template.texi new file mode 100644 index 0000000..3ddbf56 --- /dev/null +++ b/docs/qemu-ga-qapi.template.texi @@ -0,0 +1,58 @@ +\input texinfo +@setfilename qemu-ga-qapi +@documentlanguage en +@exampleindent 0 +@paragraphindent 0 + +@settitle QEMU-GA QAPI Reference Manual + +@ifinfo +@direntry +* QEMU-GA-QAPI: (qemu-doc). QEMU-GA QAPI Reference Manual +@end direntry +@end ifinfo + +@iftex +@titlepage +@sp 7 +@center @titlefont{{QEMU Guest Agent {version}}} +@sp 1 +@center @titlefont{{QAPI Reference Manual}} +@sp 3 +@end titlepage +@end iftex + +@ifnottex +@node Top +@top + +This is the QEMU Guest Agent QAPI reference for QEMU {version}. + +@menu +* API Reference:: +* Commands and Events Index:: +* Data Types Index:: +@end menu + +@end ifnottex + +@contents + +@node API Reference +@chapter API Reference + +@c man begin DESCRIPTION +{qapi} +@c man end + +@c man begin SEEALSO +The HTML documentation of QEMU for more precise information. +@c man end + +@node Commands and Events Index +@unnumbered Commands and Events Index +@printindex fn +@node Data Types Index +@unnumbered Data Types Index +@printindex tp +@bye diff --git a/docs/qemu-qapi.template.texi b/docs/qemu-qapi.template.texi new file mode 100644 index 0000000..102c8d9 --- /dev/null +++ b/docs/qemu-qapi.template.texi @@ -0,0 +1,148 @@ +\input texinfo +@setfilename qemu-qapi +@documentlanguage en +@exampleindent 0 +@paragraphindent 0 + +@settitle QEMU QAPI Reference Manual + +@ifinfo +@direntry +* QEMU: (qemu-doc). QEMU QAPI Reference Manual +@end direntry +@end ifinfo + +@iftex +@titlepage +@sp 7 +@center @titlefont{{QEMU Emulator {version}}} +@sp 1 +@center @titlefont{{QAPI Reference Manual}} +@sp 3 +@end titlepage +@end iftex + +@ifnottex +@node Top +@top + +This is the QMP QAPI reference for QEMU {version}. + +@menu +* Introduction:: +* API Reference:: +* Commands and Events Index:: +* Data Types Index:: +@end menu + +@end ifnottex + +@contents + +@node Introduction +@chapter Introduction + +The QEMU Machine Protocol (@acronym{{QMP}}) allows applications to +operate a QEMU instance. + +QMP is @uref{{http://www.json.org, JSON}} based and features the +following: + +@itemize @minus +@item +Lightweight, text-based, easy to parse data format +@item +Asynchronous messages support (ie. events) +@item +Capabilities Negotiation +@end itemize + +For detailed information on QEMU Machine Protocol, the specification +is in @file{{qmp-spec.txt}}. + +@section Usage + +You can use the @option{{-qmp}} option to enable QMP. For example, the +following makes QMP available on localhost port 4444: + +@example +$ qemu [...] -qmp tcp:localhost:4444,server,nowait +@end example + +However, for more flexibility and to make use of more options, the +@option{{-mon}} command-line option should be used. For instance, the +following example creates one HMP instance (human monitor) on stdio +and one QMP instance on localhost port 4444: + +@example +$ qemu [...] -chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \ + -chardev socket,id=mon1,host=localhost,port=4444,server,nowait \ + -mon chardev=mon1,mode=control,pretty=on +@end example + +Please, refer to QEMU's manpage for more information. + +@section Simple testing + +To manually test QMP one can connect with telnet and issue commands by +hand: + +@example +$ telnet localhost 4444 +Trying 127.0.0.1... +Connected to localhost. +Escape character is '^]'. +@{{ + "QMP": @{{ + "version": @{{ + "qemu": @{{ + "micro": 50, + "minor": 6, + "major": 1 + @}}, + "package": "" + @}}, + "capabilities": [ + ] + @}} +@}} + +@{{ "execute": "qmp_capabilities" @}} +@{{ + "return": @{{ + @}} +@}} + +@{{ "execute": "query-status" @}} +@{{ + "return": @{{ + "status": "prelaunch", + "singlestep": false, + "running": false + @}} +@}} +@end example + +@section Wiki + +Please refer to the @uref{{http://wiki.qemu-project.org/QMP, QMP QEMU + wiki page}} for more details on QMP. + +@node API Reference +@chapter API Reference + +@c man begin DESCRIPTION +{qapi} +@c man end + +@c man begin SEEALSO +The HTML documentation of QEMU for more precise information. +@c man end + +@node Commands and Events Index +@unnumbered Commands and Events Index +@printindex fn +@node Data Types Index +@unnumbered Data Types Index +@printindex tp +@bye diff --git a/docs/qmp-intro.txt b/docs/qmp-intro.txt deleted file mode 100644 index f6a3a03..0000000 --- a/docs/qmp-intro.txt +++ /dev/null @@ -1,87 +0,0 @@ - QEMU Machine Protocol - ===================== - -Introduction ------------- - -The QEMU Machine Protocol (QMP) allows applications to operate a -QEMU instance. - -QMP is JSON[1] based and features the following: - -- Lightweight, text-based, easy to parse data format -- Asynchronous messages support (ie. events) -- Capabilities Negotiation - -For detailed information on QMP's usage, please, refer to the following files: - -o qmp-spec.txt QEMU Machine Protocol current specification -o qmp-commands.txt QMP supported commands (auto-generated at build-time) -o qmp-events.txt List of available asynchronous events - -[1] http://www.json.org - -Usage ------ - -You can use the -qmp option to enable QMP. For example, the following -makes QMP available on localhost port 4444: - -$ qemu [...] -qmp tcp:localhost:4444,server,nowait - -However, for more flexibility and to make use of more options, the -mon -command-line option should be used. For instance, the following example -creates one HMP instance (human monitor) on stdio and one QMP instance -on localhost port 4444: - -$ qemu [...] -chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \ - -chardev socket,id=mon1,host=localhost,port=4444,server,nowait \ - -mon chardev=mon1,mode=control,pretty=on - -Please, refer to QEMU's manpage for more information. - -Simple Testing --------------- - -To manually test QMP one can connect with telnet and issue commands by hand: - -$ telnet localhost 4444 -Trying 127.0.0.1... -Connected to localhost. -Escape character is '^]'. -{ - "QMP": { - "version": { - "qemu": { - "micro": 50, - "minor": 6, - "major": 1 - }, - "package": "" - }, - "capabilities": [ - ] - } -} - -{ "execute": "qmp_capabilities" } -{ - "return": { - } -} - -{ "execute": "query-status" } -{ - "return": { - "status": "prelaunch", - "singlestep": false, - "running": false - } -} - -Please, refer to the qapi-schema.json file for a complete command reference. - -QMP wiki page -------------- - -http://wiki.qemu-project.org/QMP -- 2.10.0