1d34bda71SBenoît Canet# -*- Mode: Python -*- 2d34bda71SBenoît Canet# 3d34bda71SBenoît Canet# QAPI common definitions 4d34bda71SBenoît Canet 5d34bda71SBenoît Canet## 6f22a28b8SEric Blake# @QapiErrorClass 7d34bda71SBenoît Canet# 8d34bda71SBenoît Canet# QEMU error classes 9d34bda71SBenoît Canet# 10d34bda71SBenoît Canet# @GenericError: this is used for errors that don't require a specific error 11d34bda71SBenoît Canet# class. This should be the default case for most errors 12d34bda71SBenoît Canet# 13d34bda71SBenoît Canet# @CommandNotFound: the requested command has not been found 14d34bda71SBenoît Canet# 15d34bda71SBenoît Canet# @DeviceEncrypted: the requested operation can't be fulfilled because the 16d34bda71SBenoît Canet# selected device is encrypted 17d34bda71SBenoît Canet# 18d34bda71SBenoît Canet# @DeviceNotActive: a device has failed to be become active 19d34bda71SBenoît Canet# 20d34bda71SBenoît Canet# @DeviceNotFound: the requested device has not been found 21d34bda71SBenoît Canet# 22d34bda71SBenoît Canet# @KVMMissingCap: the requested operation can't be fulfilled because a 23d34bda71SBenoît Canet# required KVM capability is missing 24d34bda71SBenoît Canet# 25d34bda71SBenoît Canet# Since: 1.2 26d34bda71SBenoît Canet## 27f22a28b8SEric Blake{ 'enum': 'QapiErrorClass', 28f22a28b8SEric Blake # Keep this in sync with ErrorClass in error.h 29d34bda71SBenoît Canet 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted', 30d34bda71SBenoît Canet 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] } 31d34bda71SBenoît Canet 32d34bda71SBenoît Canet## 334752cdbbSEric Blake# @VersionTriple 344752cdbbSEric Blake# 354752cdbbSEric Blake# A three-part version number. 364752cdbbSEric Blake# 374752cdbbSEric Blake# @qemu.major: The major version number. 384752cdbbSEric Blake# 394752cdbbSEric Blake# @qemu.minor: The minor version number. 404752cdbbSEric Blake# 414752cdbbSEric Blake# @qemu.micro: The micro version number. 424752cdbbSEric Blake# 434752cdbbSEric Blake# Since: 2.4 444752cdbbSEric Blake## 454752cdbbSEric Blake{ 'struct': 'VersionTriple', 464752cdbbSEric Blake 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} } 474752cdbbSEric Blake 484752cdbbSEric Blake 494752cdbbSEric Blake## 50d34bda71SBenoît Canet# @VersionInfo: 51d34bda71SBenoît Canet# 52d34bda71SBenoît Canet# A description of QEMU's version. 53d34bda71SBenoît Canet# 544752cdbbSEric Blake# @qemu: The version of QEMU. By current convention, a micro 55d34bda71SBenoît Canet# version of 50 signifies a development branch. A micro version 56d34bda71SBenoît Canet# greater than or equal to 90 signifies a release candidate for 57d34bda71SBenoît Canet# the next minor version. A micro version of less than 50 58d34bda71SBenoît Canet# signifies a stable release. 59d34bda71SBenoît Canet# 60d34bda71SBenoît Canet# @package: QEMU will always set this field to an empty string. Downstream 61d34bda71SBenoît Canet# versions of QEMU should set this to a non-empty string. The 62d34bda71SBenoît Canet# exact format depends on the downstream however it highly 63d34bda71SBenoît Canet# recommended that a unique name is used. 64d34bda71SBenoît Canet# 65d34bda71SBenoît Canet# Since: 0.14.0 66d34bda71SBenoît Canet## 67895a2a80SEric Blake{ 'struct': 'VersionInfo', 684752cdbbSEric Blake 'data': {'qemu': 'VersionTriple', 'package': 'str'} } 69d34bda71SBenoît Canet 70d34bda71SBenoît Canet## 71d34bda71SBenoît Canet# @query-version: 72d34bda71SBenoît Canet# 73d34bda71SBenoît Canet# Returns the current version of QEMU. 74d34bda71SBenoît Canet# 75d34bda71SBenoît Canet# Returns: A @VersionInfo object describing the current version of QEMU. 76d34bda71SBenoît Canet# 77d34bda71SBenoît Canet# Since: 0.14.0 78d34bda71SBenoît Canet## 79d34bda71SBenoît Canet{ 'command': 'query-version', 'returns': 'VersionInfo' } 80d34bda71SBenoît Canet 81d34bda71SBenoît Canet## 82d34bda71SBenoît Canet# @CommandInfo: 83d34bda71SBenoît Canet# 84d34bda71SBenoît Canet# Information about a QMP command 85d34bda71SBenoît Canet# 86d34bda71SBenoît Canet# @name: The command name 87d34bda71SBenoît Canet# 88d34bda71SBenoît Canet# Since: 0.14.0 89d34bda71SBenoît Canet## 90895a2a80SEric Blake{ 'struct': 'CommandInfo', 'data': {'name': 'str'} } 91d34bda71SBenoît Canet 92d34bda71SBenoît Canet## 93d34bda71SBenoît Canet# @query-commands: 94d34bda71SBenoît Canet# 95d34bda71SBenoît Canet# Return a list of supported QMP commands by this server 96d34bda71SBenoît Canet# 97d34bda71SBenoît Canet# Returns: A list of @CommandInfo for all supported commands 98d34bda71SBenoît Canet# 99d34bda71SBenoît Canet# Since: 0.14.0 100d34bda71SBenoît Canet## 101d34bda71SBenoît Canet{ 'command': 'query-commands', 'returns': ['CommandInfo'] } 102d34bda71SBenoît Canet 103d1048befSDon Slutz## 104d1048befSDon Slutz# @OnOffAuto 105d1048befSDon Slutz# 106d1048befSDon Slutz# An enumeration of three options: on, off, and auto 107d1048befSDon Slutz# 108d1048befSDon Slutz# @auto: QEMU selects the value between on and off 109d1048befSDon Slutz# 110d1048befSDon Slutz# @on: Enabled 111d1048befSDon Slutz# 112d1048befSDon Slutz# @off: Disabled 113d1048befSDon Slutz# 114d1048befSDon Slutz# Since: 2.2 115d1048befSDon Slutz## 116d1048befSDon Slutz{ 'enum': 'OnOffAuto', 117d1048befSDon Slutz 'data': [ 'auto', 'on', 'off' ] } 118*32c18a2dSMatt Gingell 119*32c18a2dSMatt Gingell## 120*32c18a2dSMatt Gingell# @OnOffSplit 121*32c18a2dSMatt Gingell# 122*32c18a2dSMatt Gingell# An enumeration of three values: on, off, and split 123*32c18a2dSMatt Gingell# 124*32c18a2dSMatt Gingell# @on: Enabled 125*32c18a2dSMatt Gingell# 126*32c18a2dSMatt Gingell# @off: Disabled 127*32c18a2dSMatt Gingell# 128*32c18a2dSMatt Gingell# @split: Mixed 129*32c18a2dSMatt Gingell# 130*32c18a2dSMatt Gingell# Since: 2.6 131*32c18a2dSMatt Gingell## 132*32c18a2dSMatt Gingell{ 'enum': 'OnOffSplit', 133*32c18a2dSMatt Gingell 'data': [ 'on', 'off', 'split' ] } 134