]>
Commit | Line | Data |
---|---|---|
d34bda71 | 1 | # -*- Mode: Python -*- |
d3a48372 MAL |
2 | |
3 | ## | |
4 | # = QAPI common definitions | |
5 | ## | |
d34bda71 BC |
6 | |
7 | ## | |
5072f7b3 | 8 | # @QapiErrorClass: |
d34bda71 BC |
9 | # |
10 | # QEMU error classes | |
11 | # | |
12 | # @GenericError: this is used for errors that don't require a specific error | |
13 | # class. This should be the default case for most errors | |
14 | # | |
15 | # @CommandNotFound: the requested command has not been found | |
16 | # | |
17 | # @DeviceEncrypted: the requested operation can't be fulfilled because the | |
18 | # selected device is encrypted | |
19 | # | |
20 | # @DeviceNotActive: a device has failed to be become active | |
21 | # | |
22 | # @DeviceNotFound: the requested device has not been found | |
23 | # | |
24 | # @KVMMissingCap: the requested operation can't be fulfilled because a | |
25 | # required KVM capability is missing | |
26 | # | |
27 | # Since: 1.2 | |
28 | ## | |
f22a28b8 EB |
29 | { 'enum': 'QapiErrorClass', |
30 | # Keep this in sync with ErrorClass in error.h | |
d34bda71 BC |
31 | 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted', |
32 | 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] } | |
33 | ||
34 | ## | |
5072f7b3 | 35 | # @VersionTriple: |
d34bda71 | 36 | # |
4752cdbb EB |
37 | # A three-part version number. |
38 | # | |
4d5c8bc4 | 39 | # @major: The major version number. |
d34bda71 | 40 | # |
4d5c8bc4 | 41 | # @minor: The minor version number. |
d34bda71 | 42 | # |
4d5c8bc4 | 43 | # @micro: The micro version number. |
4752cdbb EB |
44 | # |
45 | # Since: 2.4 | |
46 | ## | |
47 | { 'struct': 'VersionTriple', | |
48 | 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} } | |
49 | ||
50 | ||
51 | ## | |
52 | # @VersionInfo: | |
53 | # | |
54 | # A description of QEMU's version. | |
d34bda71 | 55 | # |
4752cdbb | 56 | # @qemu: The version of QEMU. By current convention, a micro |
d34bda71 BC |
57 | # version of 50 signifies a development branch. A micro version |
58 | # greater than or equal to 90 signifies a release candidate for | |
59 | # the next minor version. A micro version of less than 50 | |
60 | # signifies a stable release. | |
61 | # | |
62 | # @package: QEMU will always set this field to an empty string. Downstream | |
63 | # versions of QEMU should set this to a non-empty string. The | |
64 | # exact format depends on the downstream however it highly | |
65 | # recommended that a unique name is used. | |
66 | # | |
67 | # Since: 0.14.0 | |
68 | ## | |
895a2a80 | 69 | { 'struct': 'VersionInfo', |
4752cdbb | 70 | 'data': {'qemu': 'VersionTriple', 'package': 'str'} } |
d34bda71 BC |
71 | |
72 | ## | |
73 | # @query-version: | |
74 | # | |
75 | # Returns the current version of QEMU. | |
76 | # | |
77 | # Returns: A @VersionInfo object describing the current version of QEMU. | |
78 | # | |
79 | # Since: 0.14.0 | |
dd746afb MAL |
80 | # |
81 | # Example: | |
82 | # | |
83 | # -> { "execute": "query-version" } | |
84 | # <- { | |
85 | # "return":{ | |
86 | # "qemu":{ | |
87 | # "major":0, | |
88 | # "minor":11, | |
89 | # "micro":5 | |
90 | # }, | |
91 | # "package":"" | |
92 | # } | |
93 | # } | |
94 | # | |
d34bda71 BC |
95 | ## |
96 | { 'command': 'query-version', 'returns': 'VersionInfo' } | |
97 | ||
98 | ## | |
99 | # @CommandInfo: | |
100 | # | |
101 | # Information about a QMP command | |
102 | # | |
103 | # @name: The command name | |
104 | # | |
105 | # Since: 0.14.0 | |
106 | ## | |
895a2a80 | 107 | { 'struct': 'CommandInfo', 'data': {'name': 'str'} } |
d34bda71 BC |
108 | |
109 | ## | |
110 | # @query-commands: | |
111 | # | |
112 | # Return a list of supported QMP commands by this server | |
113 | # | |
114 | # Returns: A list of @CommandInfo for all supported commands | |
115 | # | |
116 | # Since: 0.14.0 | |
8b0ffce4 MAL |
117 | # |
118 | # Example: | |
119 | # | |
120 | # -> { "execute": "query-commands" } | |
121 | # <- { | |
122 | # "return":[ | |
123 | # { | |
124 | # "name":"query-balloon" | |
125 | # }, | |
126 | # { | |
127 | # "name":"system_powerdown" | |
128 | # } | |
129 | # ] | |
130 | # } | |
131 | # | |
132 | # Note: This example has been shortened as the real response is too long. | |
133 | # | |
d34bda71 BC |
134 | ## |
135 | { 'command': 'query-commands', 'returns': ['CommandInfo'] } | |
136 | ||
d1048bef | 137 | ## |
5072f7b3 | 138 | # @OnOffAuto: |
d1048bef DS |
139 | # |
140 | # An enumeration of three options: on, off, and auto | |
141 | # | |
142 | # @auto: QEMU selects the value between on and off | |
143 | # | |
144 | # @on: Enabled | |
145 | # | |
146 | # @off: Disabled | |
147 | # | |
148 | # Since: 2.2 | |
149 | ## | |
150 | { 'enum': 'OnOffAuto', | |
151 | 'data': [ 'auto', 'on', 'off' ] } | |
32c18a2d MG |
152 | |
153 | ## | |
5072f7b3 | 154 | # @OnOffSplit: |
32c18a2d MG |
155 | # |
156 | # An enumeration of three values: on, off, and split | |
157 | # | |
158 | # @on: Enabled | |
159 | # | |
160 | # @off: Disabled | |
161 | # | |
162 | # @split: Mixed | |
163 | # | |
164 | # Since: 2.6 | |
165 | ## | |
166 | { 'enum': 'OnOffSplit', | |
167 | 'data': [ 'on', 'off', 'split' ] } |