From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Up9-00047i-Bl for qemu-devel@nongnu.org; Thu, 25 Jul 2013 19:19:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2Up7-0002PW-Vd for qemu-devel@nongnu.org; Thu, 25 Jul 2013 19:19:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Up7-0002OK-M4 for qemu-devel@nongnu.org; Thu, 25 Jul 2013 19:19:53 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6PNJrgS028763 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Jul 2013 19:19:53 -0400 Message-ID: <51F1B298.5080507@redhat.com> Date: Thu, 25 Jul 2013 17:19:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1374584606-5615-1-git-send-email-kwolf@redhat.com> <1374584606-5615-5-git-send-email-kwolf@redhat.com> In-Reply-To: <1374584606-5615-5-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Fdq7egBrFeuQr60UVjKFm7DQPFTKCqfae" Subject: Re: [Qemu-devel] [PATCH 04/18] qapi-visit.py: Implement 'base' for unions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Fdq7egBrFeuQr60UVjKFm7DQPFTKCqfae Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/23/2013 07:03 AM, Kevin Wolf wrote: > This implements the visitor part of base types for unions. Parsed into > QMP, this example schema definiton... s/definiton/definition/ >=20 > { 'type': 'BlockOptionsBase', 'data': { 'read-only': 'bool' } } > { 'type': 'BlockOptionsQcow2, 'data': { 'lazy-refcounts': 'bool' } = } >=20 > { 'union': 'BlockOptions', > 'base': 'BlockOptionsBase', > 'data': { > 'raw': 'BlockOptionsRaw' > 'qcow2': 'BlockOptionsQcow2' > } } >=20 > ...would describe the following JSON object: >=20 > { "type": "qcow2", > "read-only": true, > "data": { "lazy-refcounts": false } } >=20 > Signed-off-by: Kevin Wolf > --- > scripts/qapi-visit.py | 30 +++++++++++++++++++++++++----- > 1 file changed, 25 insertions(+), 5 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Fdq7egBrFeuQr60UVjKFm7DQPFTKCqfae Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR8bKYAAoJEKeha0olJ0NqsgMH/3+dBvKycYbiwaOEtX9cr55a sbTGommQVCEpsM72quG+0jurs8jTcE/3GfpUzOZTc5a7LG6GENIEMDwLvY1q8M+x 368Kz1PO53Oph/rLlG/1+zHKyI3nORKajFc8i+FaTaJlxzxLf5w84R0twLQdA+KO Kc4L+UnlQdGHnrI8vVV6i4X1iOsDlxcQ/kSBgdSN6BU+2My++I+lsqYuogb5svP9 DwMnf6h0I726NMwG3cR2RvV1tCYsHRAEii44qB4M5//mRx8EL0V0CZ3dHXDGVsdi y4jUjSXfO7Ygl0krto8m3TmLZUPuCu9DPNXwCGYhTt5S83ExSAfhbcms5Z/kKwE= =m4R9 -----END PGP SIGNATURE----- --Fdq7egBrFeuQr60UVjKFm7DQPFTKCqfae--