On 09/01/2015 07:09 AM, Markus Armbruster wrote: > Markus Armbruster <arm...@redhat.com> writes: > >> Eric Blake <ebl...@redhat.com> 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