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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qmp: Include 'abstract' field on 'qom-list-types' output
Date: Fri, 26 May 2017 15:51:53 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

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.

>  # 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?

>  ##
>  { 'struct': 'ObjectTypeInfo',
> -  'data': { 'name': 'str' } }
> +  'data': { 'name': 'str', '*abstract': 'bool' } }

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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