qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names b


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH V4 4/7] qmp: Allow to change password on names block driver states.
Date: Wed, 11 Dec 2013 11:52:28 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 2013年12月10日 23:16, Luiz Capitulino wrote:
On Tue, 10 Dec 2013 15:25:07 +0100
Kevin Wolf <address@hidden> wrote:

My objection to your approach is strong because Benoît already sent an
alternative which I believe is less worse because with it, arguments
actually mean what their names tell instead of having additional bools
for "oh, and I said A, but I didn't mean it, I really want B".

Current proposal:

{ 'command': 'block_passwd', 'data': {'*device': 'str',
                                       '*node-name': 'str', 'password': 'str'} }


I vote for this.

When I look at it, I ask myself:

  - What happens when device=NULL?

  - What happens when node-name=NULL?

  - What happens when device=NULL and node-name=NULL?

  - What happens when device != NULL and node-node != NULL?

  - What happens when device != NULL but node-node=NULL?

  - What happens when device=NULL but node-node != NULL?

My proposal:

{ 'command': 'block_passwd', 'data': {'device': 'str',
                                       '*device-is-node': 'bool', 'password': 
'str'} }

  - What happens when device-is-node=NULL?

  - What happens when device-is-node != NULL?


I think our starting point is that device names and node names are separate name spaces. For this reason we should avoid connecting them by reusing one field. From a user's view, "device-is-node", or anything meaning this, just doesn't sound interesting, because we also told them "device-is-not-node".

Fam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]