On 09/23/2015 09:40 AM, Paolo Bonzini wrote: > > > On 21/09/2015 23:58, Eric Blake wrote: >> We finally have all the required pieces for doing a type-safe >> representation of netdev_add as a flat union, where the >> discriminator 'type' now selects which additional members may >> appear in the "arguments" JSON object sent over QMP, while >> making no changes to the set of previously-valid QMP commands >> that would work, and without breaking command line parsing. > > Is this still type-unsafe like the old netdev_add (e.g. accepts a string > for an integer)?
I did not address that yet; it still needs further patches to accept an integer as a port number. I can investigate what additional patches are needed along those lines, while still preserving back-compat to previously-accepted QMP command lines (it may require the use of an 'alternate' type that accepts both int and string). The main goal here was that the command line is unchanged, and that now the QMP command is introspectable, even if what introspection shows is ugly types. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature