[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] RFC: Full introspection support for QMP

From: Amos Kong
Subject: [Qemu-devel] RFC: Full introspection support for QMP
Date: Wed, 22 May 2013 21:40:07 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi all,

We already have query-command-line-options to query details of command-line
options. As we discussed in the list, we also need full introspection of QMP
(command). The qmp-events also need to be dumped, we can define events in
qai-schema.json. We can also dump QMP errors in future if it's needed.

Command name: query-qmp-schema
Return: returns the contents of qapi-schema.json in json format.

Solution to query json content from C code:
  qapi-schema.json is processed by qapi python scripts to generate C
  files, I found the content is good enough for Libvirt to know the
  QMP command schema. We can change qapi scripts to generate a talbe/list
  to record the raw string, then we can return the raw string in

By default, return the complete schema in one go.

And support to query of unknown type in new command.
  -> { "execute": "query-qmp-schema" "arguments": { "command": "query-status" }}
  <- { "return" : "data": { "command': "query-status", "returns": "StatusInfo" 
  -> { "execute": "query-qmp-schema" "arguments": { "type": "StatusInfo" }}
  <- { "return" : "data": { "type": "StatusInfo", "data": {"running": "bool",
                            "singlestep": "bool", "status": "RunState"} }
  -> { "execute": "query-qmp-schema" "arguments": { "event": "RX-FILTER-CHANGE" 

Welcome your comments, thanks!

Target: 1.6
Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=557939


reply via email to

[Prev in Thread] Current Thread [Next in Thread]