[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] full introspection support for QMP
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] full introspection support for QMP |
Date: |
Tue, 02 Jul 2013 11:06:41 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 07/02/2013 11:01 AM, Paolo Bonzini wrote:
>>> Arguably that rule of thumb would apply equally to the QEMU
>>> build scripts which already parse qapi-schema.json. It could
>>> be possible to normalize qapi-schema.json somewhat to remove
>>> this 2-stage parsing if we went down this route.
>>
>> Indeed, I wouldn't mind a one-time pass over qapi-schema.json to make it
>> follow a more rigid format if that made it easier to use it as-is with
>> less post-processing. It won't be very nice to backport such a
>> conversion, but I don't know how much distros are planning on
>> backporting introspection in the first place.
>
> How would the schema look like after this "one-time pass"?
>
> This:
>
>> [
>> { "name": "protocol",
>> "type": "str" },
>> { "name": "fdname",
>> "type": "str" },
>> { "name": "skipauth",
>> "type": "bool",
>> "optional": true },
>> { "name": "tls",
>> "type": "bool",
>> "optional": true }
>> ]
>
> Looks quite awful for a human to write and read.
Which puts us back in favor of my original argument that keeping
qapi-schema.json compact for human use, while expanding the QMP output
to be verbose for machine use, is probably what we'll have to live with.
While it is easy to document shortcuts that the qapi parser can use
when converting .json to code, it is harder to require that all other
QMP clients must implement those same shortcuts, instead of having
things already directly represented.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Amos Kong, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Anthony Liguori, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Eric Blake, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Daniel P. Berrange, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Eric Blake, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Paolo Bonzini, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP,
Eric Blake <=
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Anthony Liguori, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Amos Kong, 2013/07/03
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Anthony Liguori, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Paolo Bonzini, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Eric Blake, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Anthony Liguori, 2013/07/02
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Paolo Bonzini, 2013/07/03
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Anthony Liguori, 2013/07/03
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Paolo Bonzini, 2013/07/03
- Re: [Qemu-devel] [PATCH] full introspection support for QMP, Anthony Liguori, 2013/07/03