From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoxGn-0001p5-2u for qemu-devel@nongnu.org; Fri, 06 Dec 2013 10:24:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoxGi-0007Du-KG for qemu-devel@nongnu.org; Fri, 06 Dec 2013 10:24:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoxGi-0007Dm-Bh for qemu-devel@nongnu.org; Fri, 06 Dec 2013 10:24:40 -0500 Message-ID: <52A1EC31.7000709@redhat.com> Date: Fri, 06 Dec 2013 08:24:33 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386263703-19292-1-git-send-email-benoit@irqsave.net> <1386263703-19292-5-git-send-email-benoit@irqsave.net> <20131206092703.5d60345a@redhat.com> In-Reply-To: <20131206092703.5d60345a@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="16xm5r4EVe6Wcu6OeTMo5XTMo4w7kNdps" Subject: Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names block driver states. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , =?UTF-8?B?QmVub8OudCBDYW5ldA==?= Cc: kwolf@redhat.com, famz@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --16xm5r4EVe6Wcu6OeTMo5XTMo4w7kNdps Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/06/2013 07:27 AM, Luiz Capitulino wrote: > On Thu, 5 Dec 2013 18:15:00 +0100 > Beno=C3=AEt Canet wrote: >> -{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 's= tr'} } >> +{ 'command': 'block_passwd', 'data': {'*device': 'str', >> + '*node-name': 'str', 'password'= : 'str'} } >=20 > What about: >=20 > { 'command': 'block_passwd', 'data': {'device': 'str', > '*device-is-node': 'bool', 'passw= ord': 'str'} } That would also work; the naming is a bit more awkward, but then you don't have the issue of mutually-exclusive optional arguments where exactly one of the two arguments is required. I'm leaning slightly towards the approach that Beno=C3=AEt took, if only = for the naming aspect (that is, I also thought of the idea of a bool flag, but didn't suggest it because I didn't like the implications on the naming). But I can live with either approach, if anyone else has a strong opinion. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --16xm5r4EVe6Wcu6OeTMo5XTMo4w7kNdps 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSoewyAAoJEKeha0olJ0NqN28IAKY47Ihvze+XJFgM/N1/XYhN F7TD7+vLhyHD9/5bkdLF7JKKMeJLE4LAfwXvupSrHYzl/+uU/Jnbk1i251HyoCjI UTEEFSoPLaiiBzwGh4RU2VoRTjdog5jcJzDzSAn/hevaLsa4nbMJqYKJL1piE90H AEHpNYDtV2b4ChzJQA5jdFgjQQSqvkLxi0qpQLqOVsQTwRjMcql5X7fLr4RyAeXU 7DKWAYb1M6fsCjPnBW4yJiGmJm62B0Ewz5UjSTc4DH61gqZdlUPu0cWthVZaieRo odfpDZ2Dc3oSx2t8b9Q/esekqdrmAfpd1KXmLz4msq3J58/opuaTBe8Ts82jgos= =RWUY -----END PGP SIGNATURE----- --16xm5r4EVe6Wcu6OeTMo5XTMo4w7kNdps--