control.json 4.6 KB

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