From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voyde-0002Kw-CE for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoydY-0008Hh-TA for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:52:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoydY-0008Hb-Kj for qemu-devel@nongnu.org; Fri, 06 Dec 2013 11:52:20 -0500 Date: Fri, 6 Dec 2013 11:52:15 -0500 From: Luiz Capitulino Message-ID: <20131206115215.0427a956@redhat.com> In-Reply-To: <52A1EC31.7000709@redhat.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Eric Blake Cc: kwolf@redhat.com, famz@redhat.com, =?UTF-8?B?QmVub8OudA==?= Canet , jcody@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Fri, 06 Dec 2013 08:24:33 -0700 Eric Blake wrote: > On 12/06/2013 07:27 AM, Luiz Capitulino wrote: > > On Thu, 5 Dec 2013 18:15:00 +0100 > > Beno=C3=AEt Canet wrote: >=20 > >> -{ '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'} } >=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. Yes, and I dislike that very much. Btw, can anyone remind me why we can't have new commands instead? > 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. Well, we can pick up any descriptive name 'treat-device-as-a-node', 'device-is-a-graph-node'...