From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6LYn-00016S-RF for qemu-devel@nongnu.org; Thu, 23 Jan 2014 09:47:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6LYh-0002w5-Ss for qemu-devel@nongnu.org; Thu, 23 Jan 2014 09:47:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6LYh-0002vz-KM for qemu-devel@nongnu.org; Thu, 23 Jan 2014 09:47:07 -0500 From: Amos Kong Date: Thu, 23 Jan 2014 22:46:36 +0800 Message-Id: <1390488396-16538-6-git-send-email-akong@redhat.com> In-Reply-To: <1390488396-16538-1-git-send-email-akong@redhat.com> References: <1390488396-16538-1-git-send-email-akong@redhat.com> Subject: [Qemu-devel] [PATCH v4 5/5] update docs/qmp-full-introspection.txt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qiaonuohan@cn.fujitsu.com, lcapitulino@redhat.com, mdroth@linux.vnet.ibm.com, xiawenc@linux.vnet.ibm.com Signed-off-by: Amos Kong --- docs/qmp-full-introspection.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/qmp-full-introspection.txt b/docs/qmp-full-introspection.txt index 8ecbc0c..4cb1b9e 100644 --- a/docs/qmp-full-introspection.txt +++ b/docs/qmp-full-introspection.txt @@ -8,6 +8,44 @@ information, it returns a range of schema structs, which contain the useful metadata to help management to check supported features, QMP commands detail, etc. +== Usage == + +Json schema: + { 'type': 'NameInfo', 'data': {'*name': 'str'} } + { 'command': 'query-name', 'returns': 'NameInfo' } + +Execute QMP command: + + { "execute": "query-qmp-schema" } + +Returns: + + { "return": [ + { + "name": "query-name", + "type": "command", + "returns": { + "name": "NameInfo", + "type": "type", + "data": [ + { + "name": "name", + "optional": true, + "recursive": false, + "type": "str" + } + ] + } + }, + ... + } + +The whole schema information will be returned in one go, it contains +all the schema entries. It doesn't support to be filtered by type +or name. Currently it takes about 4 seconds to return about 1.7M string. +Management only needs to execute this command once after installing +QEMU package. + == 'DataObject' union == { 'union': 'DataObject', -- 1.8.4.2