control.json 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. # -*- Mode: Python -*-
  2. # vim: filetype=python
  3. #
  4. ##
  5. # = QMP monitor control
  6. ##
  7. ##
  8. # @qmp_capabilities:
  9. #
  10. # Enable QMP capabilities.
  11. #
  12. # @enable: An optional list of QMPCapability values to enable. The
  13. # client must not enable any capability that is not mentioned in
  14. # the QMP greeting message. If the field is not provided, it
  15. # means no QMP capabilities will be enabled. (since 2.12)
  16. #
  17. # .. qmp-example::
  18. #
  19. # -> { "execute": "qmp_capabilities",
  20. # "arguments": { "enable": [ "oob" ] } }
  21. # <- { "return": {} }
  22. #
  23. # .. note:: This command is valid exactly when first connecting: it
  24. # must be issued before any other command will be accepted, and
  25. # will fail once the monitor is accepting other commands. (see
  26. # :doc:`/interop/qmp-spec`)
  27. #
  28. # .. note:: The QMP client needs to explicitly enable QMP
  29. # capabilities, otherwise all the QMP capabilities will be turned
  30. # off by default.
  31. #
  32. # Since: 0.13
  33. ##
  34. { 'command': 'qmp_capabilities',
  35. 'data': { '*enable': [ 'QMPCapability' ] },
  36. 'allow-preconfig': true }
  37. ##
  38. # @QMPCapability:
  39. #
  40. # Enumeration of capabilities to be advertised during initial client
  41. # connection, used for agreeing on particular QMP extension behaviors.
  42. #
  43. # @oob: QMP ability to support out-of-band requests. (Please refer to
  44. # qmp-spec.rst for more information on OOB)
  45. #
  46. # Since: 2.12
  47. ##
  48. { 'enum': 'QMPCapability',
  49. 'data': [ 'oob' ] }
  50. ##
  51. # @VersionTriple:
  52. #
  53. # A three-part version number.
  54. #
  55. # @major: The major version number.
  56. #
  57. # @minor: The minor version number.
  58. #
  59. # @micro: The micro version number.
  60. #
  61. # Since: 2.4
  62. ##
  63. { 'struct': 'VersionTriple',
  64. 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
  65. ##
  66. # @VersionInfo:
  67. #
  68. # A description of QEMU's version.
  69. #
  70. # @qemu: The version of QEMU. By current convention, a micro version
  71. # of 50 signifies a development branch. A micro version greater
  72. # than or equal to 90 signifies a release candidate for the next
  73. # minor version. A micro version of less than 50 signifies a
  74. # stable release.
  75. #
  76. # @package: QEMU will always set this field to an empty string.
  77. # Downstream versions of QEMU should set this to a non-empty
  78. # string. The exact format depends on the downstream however it
  79. # highly recommended that a unique name is used.
  80. #
  81. # Since: 0.14
  82. ##
  83. { 'struct': 'VersionInfo',
  84. 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
  85. ##
  86. # @query-version:
  87. #
  88. # Returns the current version of QEMU.
  89. #
  90. # Returns: A @VersionInfo object describing the current version of
  91. # QEMU.
  92. #
  93. # Since: 0.14
  94. #
  95. # .. qmp-example::
  96. #
  97. # -> { "execute": "query-version" }
  98. # <- {
  99. # "return":{
  100. # "qemu":{
  101. # "major":0,
  102. # "minor":11,
  103. # "micro":5
  104. # },
  105. # "package":""
  106. # }
  107. # }
  108. ##
  109. { 'command': 'query-version', 'returns': 'VersionInfo',
  110. 'allow-preconfig': true }
  111. ##
  112. # @CommandInfo:
  113. #
  114. # Information about a QMP command
  115. #
  116. # @name: The command name
  117. #
  118. # Since: 0.14
  119. ##
  120. { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
  121. ##
  122. # @query-commands:
  123. #
  124. # Return a list of supported QMP commands by this server
  125. #
  126. # Returns: A list of @CommandInfo for all supported commands
  127. #
  128. # Since: 0.14
  129. #
  130. # .. qmp-example::
  131. #
  132. # -> { "execute": "query-commands" }
  133. # <- {
  134. # "return":[
  135. # {
  136. # "name":"query-balloon"
  137. # },
  138. # {
  139. # "name":"system_powerdown"
  140. # },
  141. # ...
  142. # ]
  143. # }
  144. #
  145. # This example has been shortened as the real response is too long.
  146. ##
  147. { 'command': 'query-commands', 'returns': ['CommandInfo'],
  148. 'allow-preconfig': true }
  149. ##
  150. # @quit:
  151. #
  152. # This command will cause the QEMU process to exit gracefully. While
  153. # every attempt is made to send the QMP response before terminating,
  154. # this is not guaranteed. When using this interface, a premature EOF
  155. # would not be unexpected.
  156. #
  157. # Since: 0.14
  158. #
  159. # .. qmp-example::
  160. #
  161. # -> { "execute": "quit" }
  162. # <- { "return": {} }
  163. ##
  164. { 'command': 'quit',
  165. 'allow-preconfig': true }
  166. ##
  167. # @MonitorMode:
  168. #
  169. # An enumeration of monitor modes.
  170. #
  171. # @readline: HMP monitor (human-oriented command line interface)
  172. #
  173. # @control: QMP monitor (JSON-based machine interface)
  174. #
  175. # Since: 5.0
  176. ##
  177. { 'enum': 'MonitorMode', 'data': [ 'readline', 'control' ] }
  178. ##
  179. # @MonitorOptions:
  180. #
  181. # Options to be used for adding a new monitor.
  182. #
  183. # @id: Name of the monitor
  184. #
  185. # @mode: Selects the monitor mode (default: readline in the system
  186. # emulator, control in qemu-storage-daemon)
  187. #
  188. # @pretty: Enables pretty printing (QMP only)
  189. #
  190. # @chardev: Name of a character device to expose the monitor on
  191. #
  192. # Since: 5.0
  193. ##
  194. { 'struct': 'MonitorOptions',
  195. 'data': {
  196. '*id': 'str',
  197. '*mode': 'MonitorMode',
  198. '*pretty': 'bool',
  199. 'chardev': 'str'
  200. } }