From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx3Q-0003G0-FN for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:31:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wsx3H-00026j-Bk for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:31:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wsx3H-00026d-3C for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:31:35 -0400 From: Stefan Hajnoczi Date: Fri, 6 Jun 2014 18:14:00 +0200 Message-Id: <1402071243-16702-40-git-send-email-stefanha@redhat.com> In-Reply-To: <1402071243-16702-1-git-send-email-stefanha@redhat.com> References: <1402071243-16702-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 39/42] qapi: Extract qapi/common.json definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Beno=C3=AEt=20Canet?= , Peter Maydell , Benoit Canet , Stefan Hajnoczi From: Beno=C3=AEt Canet Signed-off-by: Benoit Canet Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- qapi-schema.json | 87 ++------------------------------------------------= ---- qapi/common.json | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++ 2 files changed, 91 insertions(+), 85 deletions(-) create mode 100644 qapi/common.json diff --git a/qapi-schema.json b/qapi-schema.json index 7bc33ea..cc71b27 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2,32 +2,8 @@ # # QAPI Schema =20 -## -# @ErrorClass -# -# QEMU error classes -# -# @GenericError: this is used for errors that don't require a specific e= rror -# class. This should be the default case for most errors -# -# @CommandNotFound: the requested command has not been found -# -# @DeviceEncrypted: the requested operation can't be fulfilled because t= he -# selected device is encrypted -# -# @DeviceNotActive: a device has failed to be become active -# -# @DeviceNotFound: the requested device has not been found -# -# @KVMMissingCap: the requested operation can't be fulfilled because a -# required KVM capability is missing -# -# Since: 1.2 -## -{ 'enum': 'ErrorClass', - 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted', - 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] } - +# QAPI common definitions +{ 'include': 'qapi/common.json' } =20 ## # LostTickPolicy: @@ -134,43 +110,6 @@ { 'command': 'query-name', 'returns': 'NameInfo' } =20 ## -# @VersionInfo: -# -# A description of QEMU's version. -# -# @qemu.major: The major version of QEMU -# -# @qemu.minor: The minor version of QEMU -# -# @qemu.micro: The micro version of QEMU. By current convention, a mic= ro -# version of 50 signifies a development branch. A micro v= ersion -# greater than or equal to 90 signifies a release candidat= e for -# the next minor version. A micro version of less than 50 -# signifies a stable release. -# -# @package: QEMU will always set this field to an empty string. Dow= nstream -# versions of QEMU should set this to a non-empty string. = The -# exact format depends on the downstream however it highly -# recommended that a unique name is used. -# -# Since: 0.14.0 -## -{ 'type': 'VersionInfo', - 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, - 'package': 'str'} } - -## -# @query-version: -# -# Returns the current version of QEMU. -# -# Returns: A @VersionInfo object describing the current version of QEMU. -# -# Since: 0.14.0 -## -{ 'command': 'query-version', 'returns': 'VersionInfo' } - -## # @KvmInfo: # # Information about support for KVM acceleration @@ -584,28 +523,6 @@ 'returns': 'str' } =20 ## -# @CommandInfo: -# -# Information about a QMP command -# -# @name: The command name -# -# Since: 0.14.0 -## -{ 'type': 'CommandInfo', 'data': {'name': 'str'} } - -## -# @query-commands: -# -# Return a list of supported QMP commands by this server -# -# Returns: A list of @CommandInfo for all supported commands -# -# Since: 0.14.0 -## -{ 'command': 'query-commands', 'returns': ['CommandInfo'] } - -## # @EventInfo: # # Information about a QMP event diff --git a/qapi/common.json b/qapi/common.json new file mode 100644 index 0000000..4e9a21f --- /dev/null +++ b/qapi/common.json @@ -0,0 +1,89 @@ +# -*- Mode: Python -*- +# +# QAPI common definitions + +## +# @ErrorClass +# +# QEMU error classes +# +# @GenericError: this is used for errors that don't require a specific e= rror +# class. This should be the default case for most errors +# +# @CommandNotFound: the requested command has not been found +# +# @DeviceEncrypted: the requested operation can't be fulfilled because t= he +# selected device is encrypted +# +# @DeviceNotActive: a device has failed to be become active +# +# @DeviceNotFound: the requested device has not been found +# +# @KVMMissingCap: the requested operation can't be fulfilled because a +# required KVM capability is missing +# +# Since: 1.2 +## +{ 'enum': 'ErrorClass', + 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted', + 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] } + +## +# @VersionInfo: +# +# A description of QEMU's version. +# +# @qemu.major: The major version of QEMU +# +# @qemu.minor: The minor version of QEMU +# +# @qemu.micro: The micro version of QEMU. By current convention, a mic= ro +# version of 50 signifies a development branch. A micro v= ersion +# greater than or equal to 90 signifies a release candidat= e for +# the next minor version. A micro version of less than 50 +# signifies a stable release. +# +# @package: QEMU will always set this field to an empty string. Dow= nstream +# versions of QEMU should set this to a non-empty string. = The +# exact format depends on the downstream however it highly +# recommended that a unique name is used. +# +# Since: 0.14.0 +## +{ 'type': 'VersionInfo', + 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, + 'package': 'str'} } + +## +# @query-version: +# +# Returns the current version of QEMU. +# +# Returns: A @VersionInfo object describing the current version of QEMU. +# +# Since: 0.14.0 +## +{ 'command': 'query-version', 'returns': 'VersionInfo' } + +## +# @CommandInfo: +# +# Information about a QMP command +# +# @name: The command name +# +# Since: 0.14.0 +## +{ 'type': 'CommandInfo', 'data': {'name': 'str'} } + +## +# @query-commands: +# +# Return a list of supported QMP commands by this server +# +# Returns: A list of @CommandInfo for all supported commands +# +# Since: 0.14.0 +## +{ 'command': 'query-commands', 'returns': ['CommandInfo'] } + --=20 1.9.3