On Wed, Mar 11, 2015 at 11:21:43AM +0100, Markus Armbruster wrote:

> > I can actually try to implement full introspection support, but I
> > would like to know what API you would like. Something like this?
> >
> >    'query-commands'
> >    'query-enums'
> >    'query-events'
> >    'query-types'
> >    'query-unions'
> 
> You propose a separate query-FOO for each kind of thing in the
> schema: command, event, the various types.  Not fundamentally
> different to a single query-schema.  We can discuss which of the two
> approaches is easier to use.

I don't think it makes much difference in terms of complexity
from the QEMU side. I proposed those because query-commands and
query-events already exist, so adding the missing ones seemed the most
straightforward solution to me.

But if query-schema is more convenient I don't have any problem with
that.

> Here's how I'd try to do that.  Treat the schema as a graph, its
> nodes are the definitions of types, commands and events are nodes,
> and a use of a type adds an edge from the node containing the use to
> the type.  The external interface is exactly the sub-graph reachable
> QMP command and event nodes.

Makes sense.

Berto

Reply via email to