[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection |
Date: |
Tue, 1 Sep 2015 09:48:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 09/01/2015 07:09 AM, Markus Armbruster wrote:
> Markus Armbruster <address@hidden> writes:
>
>> Eric Blake <address@hidden> writes:
>>
>>> On 08/04/2015 09:58 AM, Markus Armbruster wrote:
> [...]
>>>> +++ b/qapi/introspect.json
>>>
>>>> +{ 'struct': 'SchemaInfoObject',
>>>> + 'data': { 'members': [ 'SchemaInfoObjectMember' ],
>>>> + '*tag': 'str',
>>>> + '*variants': [ 'SchemaInfoObjectVariant' ] } }
>>>
>>> I take it that either tag and variants will both be omitted, or both be
>>> present. No clean way to represent that in the schema, though.
>>
>> Needs a comment.
>
> Alternatively, wrap both tag and variants in an object, mandatory there,
> then make that object optional. Doesn't feel wortwhile to me, but if
> you like it better, I'll reconsider.
No; the extra nesting it would create in QMP is not worth it.
(Well, maybe we want to think about a qapi extension that would allow
unboxed substructs, where you either get all or none of a sub-struct,
but with all of the members of the substruct passed in QMP at the same
nesting level as the rest of the object; but I'm not sure we need it,
and it certainly is too complex to be worrying about right now while the
basics aren't even in place)
>>>> + def visit_enum_type(self, name, info, values):
>>>> + self._gen_json(name, 'enum', { 'values': values })
>>>
>>> Do you want to add a sort() on values here?
>>
>> I want to review the introspection schema systematically for sorting
>> opportunities.
>
> I'm going to leave this job for later, because I feel we should get the
> basics in as soon as possible. We then have the rest of the development
> cycle to refine stuff.
Sure; we have until 2.5 is released to bake in our final assumptions,
and the sooner we can get in a baseline, the easier it will be to play
with what further changes we want to make on top.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature