[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network
Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax
Tue, 19 May 2015 16:23:29 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
Am 19.05.2015 um 16:17 schrieb Eric Blake:
> On 05/19/2015 08:12 AM, Martin Cerveny wrote:
>> On Tue, 19 May 2015, Eric Blake wrote:
>>> On 05/19/2015 06:51 AM, Andreas Färber wrote:
>>>> Am 13.05.2015 um 14:14 schrieb Martin Cerveny:
>>>>> Add network syntax parsing (ip address, port) to qom-* scripts.
>>>>> Signed-off-by: Martin Cerveny <address@hidden>
>>>>> scripts/qmp/qom-fuse | 13 ++++++++++++-
>>>>> scripts/qmp/qom-get | 12 +++++++++++-
>>>>> scripts/qmp/qom-list | 12 +++++++++++-
>>>>> scripts/qmp/qom-set | 12 +++++++++++-
>>>>> scripts/qmp/qom-tree | 12 +++++++++++-
>>>>> 5 files changed, 56 insertions(+), 5 deletions(-)
>>>> Could some Python guru please take a look at this?
>>>>> +if len(connection) == 2:
>>>>> + try:
>>>>> + port = int(connection)
>>>>> + except ValueError:
>>>>> + raise QMPBadPort
>>>>> + connection = ( connection, port )
>>> Won't that mishandle IPv6 connections, such as something like [::1]:8000
>>> for connecting to port 8000 on localhost, since it splits into more than
>>> 2 pieces when splitting on :?
>> Yes, this is problem, but I copy-paste the same construct from
>> scripts/qmp/qmp-shell to be compatible.
> Might be worth mentioning that, as justification in the commit message.
>> Is the IPv6 support for utilities mandatory ?
> I don't have any strong feelings about it (I'm okay if you don't). But
> others might.
>> If yes I can make V2.
> If so, it would be good to fix qmp-shell, too - which makes it sound
> like it would be a separate commit.
Is there a chance this can be fixed in a way that we don't need to
replicate that code? :)
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
Description: OpenPGP digital signature
[Qemu-trivial] [PATCH 1/2] scripts: qom-*: add network syntax, Martin Cerveny, 2015/05/13
Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax, Daniel P. Berrange, 2015/05/19
- [Qemu-trivial] [PATCH 2/2] scripts: qom-tree: add support of path as argument, (continued)