xref: /openbmc/qemu/qapi/common.json (revision 77a8257e)
1# -*- 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##
32# @VersionInfo:
33#
34# A description of QEMU's version.
35#
36# @qemu.major:  The major version of QEMU
37#
38# @qemu.minor:  The minor version of QEMU
39#
40# @qemu.micro:  The micro version of QEMU.  By current convention, a micro
41#               version of 50 signifies a development branch.  A micro version
42#               greater than or equal to 90 signifies a release candidate for
43#               the next minor version.  A micro version of less than 50
44#               signifies a stable release.
45#
46# @package:     QEMU will always set this field to an empty string.  Downstream
47#               versions of QEMU should set this to a non-empty string.  The
48#               exact format depends on the downstream however it highly
49#               recommended that a unique name is used.
50#
51# Since: 0.14.0
52##
53{ 'type': 'VersionInfo',
54  'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
55           'package': 'str'} }
56
57##
58# @query-version:
59#
60# Returns the current version of QEMU.
61#
62# Returns:  A @VersionInfo object describing the current version of QEMU.
63#
64# Since: 0.14.0
65##
66{ 'command': 'query-version', 'returns': 'VersionInfo' }
67
68##
69# @CommandInfo:
70#
71# Information about a QMP command
72#
73# @name: The command name
74#
75# Since: 0.14.0
76##
77{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
78
79##
80# @query-commands:
81#
82# Return a list of supported QMP commands by this server
83#
84# Returns: A list of @CommandInfo for all supported commands
85#
86# Since: 0.14.0
87##
88{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
89
90##
91# @OnOffAuto
92#
93# An enumeration of three options: on, off, and auto
94#
95# @auto: QEMU selects the value between on and off
96#
97# @on: Enabled
98#
99# @off: Disabled
100#
101# Since: 2.2
102##
103{ 'enum': 'OnOffAuto',
104  'data': [ 'auto', 'on', 'off' ] }
105