blob: bad56bf68821fab4a30d709db06609fea18b498e [file] [log] [blame]
Benoît Canetd34bda72014-06-05 13:45:29 +02001# -*- Mode: Python -*-
2#
3# QAPI common definitions
4
5##
6# @ErrorClass
7#
8# QEMU error classes
9#
10# @GenericError: this is used for errors that don't require a specific error
11# class. This should be the default case for most errors
12#
13# @CommandNotFound: the requested command has not been found
14#
15# @DeviceEncrypted: the requested operation can't be fulfilled because the
16# selected device is encrypted
17#
18# @DeviceNotActive: a device has failed to be become active
19#
20# @DeviceNotFound: the requested device has not been found
21#
22# @KVMMissingCap: the requested operation can't be fulfilled because a
23# required KVM capability is missing
24#
25# Since: 1.2
26##
27{ 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
30
31##
Eric Blake4752cdb2015-05-04 09:05:31 -060032# @VersionTriple
33#
34# A three-part version number.
35#
36# @qemu.major: The major version number.
37#
38# @qemu.minor: The minor version number.
39#
40# @qemu.micro: The micro version number.
41#
42# Since: 2.4
43##
44{ 'struct': 'VersionTriple',
45 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
46
47
48##
Benoît Canetd34bda72014-06-05 13:45:29 +020049# @VersionInfo:
50#
51# A description of QEMU's version.
52#
Eric Blake4752cdb2015-05-04 09:05:31 -060053# @qemu: The version of QEMU. By current convention, a micro
Benoît Canetd34bda72014-06-05 13:45:29 +020054# version of 50 signifies a development branch. A micro version
55# greater than or equal to 90 signifies a release candidate for
56# the next minor version. A micro version of less than 50
57# signifies a stable release.
58#
59# @package: QEMU will always set this field to an empty string. Downstream
60# versions of QEMU should set this to a non-empty string. The
61# exact format depends on the downstream however it highly
62# recommended that a unique name is used.
63#
64# Since: 0.14.0
65##
Eric Blake895a2a82015-05-04 09:05:27 -060066{ 'struct': 'VersionInfo',
Eric Blake4752cdb2015-05-04 09:05:31 -060067 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
Benoît Canetd34bda72014-06-05 13:45:29 +020068
69##
70# @query-version:
71#
72# Returns the current version of QEMU.
73#
74# Returns: A @VersionInfo object describing the current version of QEMU.
75#
76# Since: 0.14.0
77##
78{ 'command': 'query-version', 'returns': 'VersionInfo' }
79
80##
81# @CommandInfo:
82#
83# Information about a QMP command
84#
85# @name: The command name
86#
87# Since: 0.14.0
88##
Eric Blake895a2a82015-05-04 09:05:27 -060089{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
Benoît Canetd34bda72014-06-05 13:45:29 +020090
91##
92# @query-commands:
93#
94# Return a list of supported QMP commands by this server
95#
96# Returns: A list of @CommandInfo for all supported commands
97#
98# Since: 0.14.0
99##
100{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
101
Don Slutzd1048be2014-11-21 11:18:52 -0500102##
103# @OnOffAuto
104#
105# An enumeration of three options: on, off, and auto
106#
107# @auto: QEMU selects the value between on and off
108#
109# @on: Enabled
110#
111# @off: Disabled
112#
113# Since: 2.2
114##
115{ 'enum': 'OnOffAuto',
116 'data': [ 'auto', 'on', 'off' ] }