From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq0zz-0007tB-C6 for qemu-devel@nongnu.org; Mon, 09 Dec 2013 08:35:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vq0zs-0001LA-6V for qemu-devel@nongnu.org; Mon, 09 Dec 2013 08:35:47 -0500 Received: from nodalink.pck.nerim.net ([62.212.105.220]:46394 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vq0zr-0001Ko-T6 for qemu-devel@nongnu.org; Mon, 09 Dec 2013 08:35:40 -0500 Date: Mon, 9 Dec 2013 14:35:33 +0100 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20131209133533.GB3364@irqsave.net> References: <1386263703-19292-1-git-send-email-benoit@irqsave.net> <1386263703-19292-5-git-send-email-benoit@irqsave.net> <20131206092703.5d60345a@redhat.com> <52A1EC31.7000709@redhat.com> <20131206115215.0427a956@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20131206115215.0427a956@redhat.com> Content-Transfer-Encoding: quoted-printable 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 Cc: kwolf@redhat.com, famz@redhat.com, jcody@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Le Friday 06 Dec 2013 =E0 11:52:15 (-0500), Luiz Capitulino a =E9crit : > On Fri, 06 Dec 2013 08:24:33 -0700 > Eric Blake wrote: >=20 > > On 12/06/2013 07:27 AM, Luiz Capitulino wrote: > > > On Thu, 5 Dec 2013 18:15:00 +0100 > > > Beno=EEt Canet wrote: > >=20 > > >> -{ 'command': 'block_passwd', 'data': {'device': 'str', 'password'= : 'str'} } > > >> +{ 'command': 'block_passwd', 'data': {'*device': 'str', > > >> + '*node-name': 'str', 'passw= ord': 'str'} } > > >=20 > > > What about: > > >=20 > > > { 'command': 'block_passwd', 'data': {'device': 'str', > > > '*device-is-node': 'bool', 'p= assword': 'str'} } > >=20 > > 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. >=20 > Yes, and I dislike that very much. Luiz, I will rewrite these patch using your boolean. Best regards Beno=EEt >=20 > Btw, can anyone remind me why we can't have new commands instead? That would mean doubling the whole QMP block command set once the work is= done. >=20 > > I'm leaning slightly towards the approach that Beno=EEt 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 > Well, we can pick up any descriptive name 'treat-device-as-a-node', > 'device-is-a-graph-node'... >=20