From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zen2z-0003NL-5I for qemu-devel@nongnu.org; Wed, 23 Sep 2015 12:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zen2y-0000ow-B4 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 12:37:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zen2y-0000op-5Y for qemu-devel@nongnu.org; Wed, 23 Sep 2015 12:37:32 -0400 References: <1442872682-6523-1-git-send-email-eblake@redhat.com> <1442872682-6523-46-git-send-email-eblake@redhat.com> <5602C7DE.10701@redhat.com> From: Eric Blake Message-ID: <5602D545.3050405@redhat.com> Date: Wed, 23 Sep 2015 10:37:25 -0600 MIME-Version: 1.0 In-Reply-To: <5602C7DE.10701@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NEpgT2pb83FawjlSTufgN0h8lpgvKNiMl" Subject: Re: [Qemu-devel] [PATCH v5 45/46] net: Complete qapi-fication of netdev_add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, Jason Wang , armbru@redhat.com, ehabkost@redhat.com, DirtY.iCE.hu@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NEpgT2pb83FawjlSTufgN0h8lpgvKNiMl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/23/2015 09:40 AM, Paolo Bonzini wrote: >=20 >=20 > 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. >=20 > Is this still type-unsafe like the old netdev_add (e.g. accepts a strin= g > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --NEpgT2pb83FawjlSTufgN0h8lpgvKNiMl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWAtVFAAoJEKeha0olJ0NqUysH/R5XDny9TDE6tua/oUIpCIiJ ze+zNZRb7WJNv+ZiXkKs44h5sOOyjZXpw+UV+UQ+ajt8MFt/2sZhrP1JSouOEGjO wVBuzCQbckSr5g8Af6cCb/yid03orfUy377OTur7Z/kQtrWH43+RPER5wrSQJdQV 0gCatjn2X3ooB+HSzoY2OPD3Kejc6C3xu/16/7nbVXvnl5WjHBEkBoHPI3+Tc8eQ xvUF5fSXLSYQW+g6VuMMAodtyHvVrywRPf71PKUQHhyrR/1uky/TmAad5C9Jx/AG bzK5Bqa1+eJAaRr7k5fCLwgVWBGBGXgKTGqSbtt/HbuVlCgkzjbnTwm7Fz4foyY= =MJtW -----END PGP SIGNATURE----- --NEpgT2pb83FawjlSTufgN0h8lpgvKNiMl--