OSDN Git Service

qapi: add some sections in docs
[qmiga/qemu.git] / qapi / common.json
1 # -*- Mode: Python -*-
2
3 ##
4 # = QAPI common definitions
5 ##
6
7 ##
8 # @QapiErrorClass:
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 ##
29 { 'enum': 'QapiErrorClass',
30   # Keep this in sync with ErrorClass in error.h
31   'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
32             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
33
34 ##
35 # @VersionTriple:
36 #
37 # A three-part version number.
38 #
39 # @major:  The major version number.
40 #
41 # @minor:  The minor version number.
42 #
43 # @micro:  The micro version number.
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.
55 #
56 # @qemu:        The version of QEMU.  By current convention, a micro
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 ##
69 { 'struct': 'VersionInfo',
70   'data': {'qemu': 'VersionTriple', 'package': 'str'} }
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
80 ##
81 { 'command': 'query-version', 'returns': 'VersionInfo' }
82
83 ##
84 # @CommandInfo:
85 #
86 # Information about a QMP command
87 #
88 # @name: The command name
89 #
90 # Since: 0.14.0
91 ##
92 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
93
94 ##
95 # @query-commands:
96 #
97 # Return a list of supported QMP commands by this server
98 #
99 # Returns: A list of @CommandInfo for all supported commands
100 #
101 # Since: 0.14.0
102 ##
103 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
104
105 ##
106 # @OnOffAuto:
107 #
108 # An enumeration of three options: on, off, and auto
109 #
110 # @auto: QEMU selects the value between on and off
111 #
112 # @on: Enabled
113 #
114 # @off: Disabled
115 #
116 # Since: 2.2
117 ##
118 { 'enum': 'OnOffAuto',
119   'data': [ 'auto', 'on', 'off' ] }
120
121 ##
122 # @OnOffSplit:
123 #
124 # An enumeration of three values: on, off, and split
125 #
126 # @on: Enabled
127 #
128 # @off: Disabled
129 #
130 # @split: Mixed
131 #
132 # Since: 2.6
133 ##
134 { 'enum': 'OnOffSplit',
135   'data': [ 'on', 'off', 'split' ] }