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# @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## 49# @VersionInfo: 50# 51# A description of QEMU's version. 52# 53# @qemu: The version of QEMU. By current convention, a micro 54# 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## 66{ 'struct': 'VersionInfo', 67 'data': {'qemu': 'VersionTriple', 'package': 'str'} } 68 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## 89{ 'struct': 'CommandInfo', 'data': {'name': 'str'} } 90 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 102## 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' ] } 117