qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/3] qmp: Include 'abstract' field on 'qom-li


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qmp: Include 'abstract' field on 'qom-list-types' output
Date: Fri, 26 May 2017 18:09:15 -0300
User-agent: Mutt/1.8.0 (2017-02-23)

On Fri, May 26, 2017 at 03:51:53PM -0500, Eric Blake wrote:
> On 05/26/2017 03:23 PM, Eduardo Habkost wrote:
> > A client may be interested in getting the list of both abstract and
> > non-abstract types.  Instead of requiring them to make multiple queries
> > with different filter arguments, just return an 'abstract' field in
> > 'qom-list-types'.
> > 
> > In addition to the new test code for validating this field, update the
> > abstract-interfaces test case to query for all 'interface' subtypes
> > (including abstract ones), and to look at the 'abstract' field directly.
> > 
> > Signed-off-by: Eduardo Habkost <address@hidden>
> > ---
> 
> > +++ b/qapi-schema.json
> > @@ -3056,12 +3056,15 @@
> >  #
> >  # @name: the type name found in the search
> >  #
> > +# @abstract: the type is abstract and can't be directly instantiated.
> > +#            Omitted if false. (since 2.10)
> > +#
> 
> A little bit awkward in that libvirt will have to see if ANY entry in
> the large returned result has "abstract":true before it can assume
> "abstract":false on the remaining entries (that is, older qemu don't
> output abstract ever, but still mentions abstract types, so blindly
> writing code to assume absence of "abstract" means false breaks on those
> older versions).  Or a query of introspection to see if the field name
> is even supported would do.  Not insurmountable, though.

True.

I have the impression that management is not likely to look at
this field in the near future.  Probably the new field will be
more useful for automated test code like
device-instrospect-test.c and the device-crash-test script I
submitted recently.

> 
> >  # Since: 1.1
> >  #
> >  # Notes: This command is experimental and may change syntax in future 
> > releases.
> 
> Is this note still helpful, or should we delete it now?

The patch removing this line is already in a pending pull request
submitted by Markus last Tuesday.

> 
> >  ##
> >  { 'struct': 'ObjectTypeInfo',
> > -  'data': { 'name': 'str' } }
> > +  'data': { 'name': 'str', '*abstract': 'bool' } }
> 
> Reviewed-by: Eric Blake <address@hidden>

Thanks!

-- 
Eduardo



reply via email to

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