From: "Andreas Färber" <afaerber@suse.de>
To: Eric Blake <eblake@redhat.com>, Martin Cerveny <M.Cerveny@computer.org>
Cc: qemu-trivial@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax
Date: Tue, 19 May 2015 16:23:29 +0200 [thread overview]
Message-ID: <555B4761.6020104@suse.de> (raw)
In-Reply-To: <555B45E2.5090008@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
Am 19.05.2015 um 16:17 schrieb Eric Blake:
> On 05/19/2015 08:12 AM, Martin Cerveny wrote:
>> Hello.
>>
>> 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 <M.Cerveny@computer.org>
>>>>> ---
>>>>> 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[1])
>>>>> + except ValueError:
>>>>> + raise QMPBadPort
>>>>> + connection = ( connection[0], 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? :)
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: Eric Blake <eblake@redhat.com>, Martin Cerveny <M.Cerveny@computer.org>
Cc: qemu-trivial@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] scripts: qom-*: add network syntax
Date: Tue, 19 May 2015 16:23:29 +0200 [thread overview]
Message-ID: <555B4761.6020104@suse.de> (raw)
In-Reply-To: <555B45E2.5090008@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
Am 19.05.2015 um 16:17 schrieb Eric Blake:
> On 05/19/2015 08:12 AM, Martin Cerveny wrote:
>> Hello.
>>
>> 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 <M.Cerveny@computer.org>
>>>>> ---
>>>>> 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[1])
>>>>> + except ValueError:
>>>>> + raise QMPBadPort
>>>>> + connection = ( connection[0], 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? :)
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-05-19 14:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 12:14 [Qemu-trivial] [PATCH 0/2] Some fixes to qom scripts Martin Cerveny
2015-05-13 12:14 ` [Qemu-devel] " Martin Cerveny
2015-05-13 12:14 ` [Qemu-trivial] [PATCH 1/2] scripts: qom-*: add network syntax Martin Cerveny
2015-05-13 12:14 ` [Qemu-devel] " Martin Cerveny
2015-05-19 12:51 ` [Qemu-trivial] " Andreas Färber
2015-05-19 12:51 ` Andreas Färber
2015-05-19 13:56 ` [Qemu-trivial] " Eric Blake
2015-05-19 13:56 ` Eric Blake
2015-05-19 14:12 ` [Qemu-trivial] " Martin Cerveny
2015-05-19 14:12 ` Martin Cerveny
2015-05-19 14:17 ` [Qemu-trivial] " Eric Blake
2015-05-19 14:17 ` Eric Blake
2015-05-19 14:23 ` Andreas Färber [this message]
2015-05-19 14:23 ` Andreas Färber
2015-05-19 14:16 ` [Qemu-trivial] " Daniel P. Berrange
2015-05-19 14:16 ` Daniel P. Berrange
2015-05-13 12:14 ` [Qemu-trivial] [PATCH 2/2] scripts: qom-tree: add support of path as argument Martin Cerveny
2015-05-13 12:14 ` [Qemu-devel] " Martin Cerveny
2015-05-14 10:00 ` [Qemu-trivial] " Paolo Bonzini
2015-05-14 10:00 ` [Qemu-devel] " Paolo Bonzini
2015-05-14 11:41 ` [Qemu-trivial] " Martin Cerveny
2015-05-14 11:41 ` [Qemu-devel] " Martin Cerveny
2015-05-14 11:47 ` [Qemu-trivial] " Paolo Bonzini
2015-05-14 11:47 ` [Qemu-devel] " Paolo Bonzini
2015-05-19 12:47 ` [Qemu-trivial] " Andreas Färber
2015-05-19 12:47 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555B4761.6020104@suse.de \
--to=afaerber@suse.de \
--cc=M.Cerveny@computer.org \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.