From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8FFEC433EF for ; Fri, 17 Dec 2021 16:29:33 +0000 (UTC) Received: from localhost ([::1]:59698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myG6t-00018b-LD for qemu-devel@archiver.kernel.org; Fri, 17 Dec 2021 11:29:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myG5p-0000Be-8r for qemu-devel@nongnu.org; Fri, 17 Dec 2021 11:28:25 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myG5l-0000pZ-Jz for qemu-devel@nongnu.org; Fri, 17 Dec 2021 11:28:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639758500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5U44A8+v1GVVjCZZEqZbRv3fvWmOHJ4XKta+nWQmiPg=; b=bvp2dYuEOsFs4Osgf/tykyFmrhLRn0m/KqmeityDh+aC5pYH1x2i/lzLrSwvB51Dgf0x2C iehrOJn5zVckxvXnk8UrN9M6sl9b5DX06+ziuSVj+eTQiQ9B1AJhP2j5YjH/GSgPxn0zZF Cj3TSRDm2iJq78ddNCykqDhBfIK8K8k= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-216-amyTgROgMQiIuv0T-YQRzQ-1; Fri, 17 Dec 2021 11:28:17 -0500 X-MC-Unique: amyTgROgMQiIuv0T-YQRzQ-1 Received: by mail-ua1-f70.google.com with SMTP id x4-20020ab05ac4000000b002f713d873c4so1529205uae.9 for ; Fri, 17 Dec 2021 08:28:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5U44A8+v1GVVjCZZEqZbRv3fvWmOHJ4XKta+nWQmiPg=; b=ryhBtorclb1HKbr4j7IR07jB/SyqKce3U+cPHiQ2ZmEDqkLgvrOZyjSIc2d83rhEDK 7kDf09172csQzqw4iPr6b+VWrpQd4Wet+s6+Td2s1IKIrfcmIiPgVrXhUm6CS5kUPtck xGT4yUU7VMAs7a4Q0KPeL5TGLMpOy3K9H46UGUTzydubZphYirz9Z7uJ041rXfz7Hqe6 y5uFoqztzvDNk6k/BUJeleYhojozfCMadTCwXGb8F/5LIwaiWvBXDM9pqCVwVGWrlNdG 5DueH8SasBfGA2jO6cbDjIV+neoKuUaf8df4VYkSJJx2O+ODLv/9PfI16ohKknWd4Vun EaJA== X-Gm-Message-State: AOAM530YVYmQfFrarsfzOIP+KFrdSYCWby/eZ8XT2rw1KwyP0EW8r9Mo KiTpEVPjaAI9MXqOjabuE8e189JV8KA3OEhspG4qEvbIl360qVb4DVV1QBfapvNlT0UBb4FjnXx THKl8PCLytFCcu951QTTFkYKq0q1tX1k= X-Received: by 2002:a05:6102:c86:: with SMTP id f6mr1613537vst.38.1639758496555; Fri, 17 Dec 2021 08:28:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoPp3eA4Xcx0DrIkfqTXCgJ/scAvf6cpXd3GsUyDnL1rxSIJuukZKfDG/X0S54vZ1HtQ5RWIlWpXVVq32rMjo= X-Received: by 2002:a05:6102:c86:: with SMTP id f6mr1613527vst.38.1639758496353; Fri, 17 Dec 2021 08:28:16 -0800 (PST) MIME-Version: 1.0 References: <20211215193939.3768033-1-jsnow@redhat.com> <20211215193939.3768033-26-jsnow@redhat.com> <59b70dd8-cae7-4106-7ba3-ba0b6f74897d@virtuozzo.com> In-Reply-To: From: John Snow Date: Fri, 17 Dec 2021 11:28:05 -0500 Message-ID: Subject: Re: [PATCH v2 25/25] python: rename qemu.aqmp to qemu.qmp To: Vladimir Sementsov-Ogievskiy Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000b1640305d35a0613" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.718, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Kevin Wolf , Daniel Berrange , Beraldo Leal , Qemu-block , Markus Armbruster , qemu-devel , Wainer Moschetta , Andrea Bolognani , Hanna Reitz , Gerd Hoffmann , Cleber Rosa Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000b1640305d35a0613 Content-Type: text/plain; charset="UTF-8" On Fri, Dec 17, 2021, 2:40 AM Vladimir Sementsov-Ogievskiy < vsementsov@virtuozzo.com> wrote: > 17.12.2021 00:10, John Snow wrote: > > > > > > On Thu, Dec 16, 2021 at 6:41 AM Vladimir Sementsov-Ogievskiy < > vsementsov@virtuozzo.com > wrote: > > > > 15.12.2021 22:39, John Snow wrote: > > > Now that we are fully switched over to the new QMP library, move > it back > > > over the old namespace. This is being done primarily so that we > may > > > upload this package simply as "qemu.qmp" without introducing > confusion > > > over whether or not "aqmp" is a new protocol or not. > > > > > > The trade-off is increased confusion inside the QEMU developer > > > tree. Sorry! > > > > > > Signed-off-by: John Snow jsnow@redhat.com>> > > > > Great job! > > > > I looked thorough the patch, changes looks correct. Simply rename > every aqmp / AQMP occurrence.. But: > > > > > > [root@kvm review]# git grep -i aqmp > > python/qemu/qmp/aqmp_tui.py:AQMP TUI > > python/qemu/qmp/aqmp_tui.py:AQMP TUI is an asynchronous interface > built on top the of the AQMP library. > > python/qemu/qmp/aqmp_tui.py:Example Usage: aqmp-tui IP:PORT> > > python/qemu/qmp/aqmp_tui.py:Full Usage: aqmp-tui --help > > python/qemu/qmp/aqmp_tui.py: Implements the AQMP TUI. > > python/qemu/qmp/aqmp_tui.py: parser = > argparse.ArgumentParser(description='AQMP TUI') > > python/qemu/qmp/legacy.py: self._aqmp = QMPClient(nickname) > > python/qemu/qmp/legacy.py: if self._aqmp.greeting is not None: > > python/qemu/qmp/legacy.py: return > self._aqmp.greeting._asdict() > > python/qemu/qmp/legacy.py: self._aqmp.await_greeting = > negotiate > > python/qemu/qmp/legacy.py: self._aqmp.negotiate = negotiate > > python/qemu/qmp/legacy.py: > self._aqmp.connect(self._address) > > python/qemu/qmp/legacy.py: self._aqmp.await_greeting = True > > python/qemu/qmp/legacy.py: self._aqmp.negotiate = True > > python/qemu/qmp/legacy.py: > self._aqmp.accept(self._address), > > python/qemu/qmp/legacy.py: self._aqmp._raw(qmp_cmd, > assign_id=False), > > python/qemu/qmp/legacy.py: self._aqmp.execute(cmd, kwds), > > python/qemu/qmp/legacy.py: if self._aqmp.events.empty(): > > python/qemu/qmp/legacy.py: self._aqmp.events.get(), > > python/qemu/qmp/legacy.py: events = [dict(x) for x in > self._aqmp.events.clear()] > > python/qemu/qmp/legacy.py: self._aqmp.events.clear() > > python/qemu/qmp/legacy.py: self._aqmp.disconnect() > > python/qemu/qmp/legacy.py: self._aqmp.send_fd_scm(fd) > > python/qemu/qmp/legacy.py: if self._aqmp.runstate == > Runstate.IDLE: > > python/setup.cfg:# AQMP TUI dependencies > > python/setup.cfg: aqmp-tui = qemu.qmp.aqmp_tui:main [tui] > > python/setup.cfg:[mypy-qemu.qmp.aqmp_tui] > > > > [root@kvm review]# git ls-tree -r --name-only HEAD | grep -i aqmp > > python/qemu/qmp/aqmp_tui.py > > > > > > I think, this all should be renamed too > > > > > > For aqmp_tui.py, sure. The new TUI isn't 100% ready to replace qmp-shell > yet, so I wasn't entirely certain what to name it... qmp-tui? > > > > *shrugs*. > > I don't remember what tui is abbreviating) qmp-tui is OK, and it may be > renamed to qmp-shell when it is ready to replace it.. > "text user interface", by analogy with GUI (graphical UI). > > > > for legacy.py, it's just an internal variable name and I wasn't sure it > was worth the churn just to change a private variable. I could still do it > if you feel strongly about it. > > > > I'd rename everything. > Alright, I'll do so in the respin. > > -- > Best regards, > Vladimir > Thanks for the reviews! > --000000000000b1640305d35a0613 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Dec 17, 2021, 2:40 AM Vladimir Sementsov-Ogiev= skiy <vsementsov@virtuozzo.c= om> wrote:
17.12.2021 00:10,= John Snow wrote:
>
>
> On Thu, Dec 16, 2021 at 6:41 AM Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com <mailto:vsementsov@virtuozzo.com= >> wrote:
>
>=C2=A0 =C2=A0 =C2=A015.12.2021 22:39, John Snow wrote:
>=C2=A0 =C2=A0 =C2=A0 > Now that we are fully switched over to the ne= w QMP library, move it back
>=C2=A0 =C2=A0 =C2=A0 > over the old namespace. This is being done pr= imarily so that we may
>=C2=A0 =C2=A0 =C2=A0 > upload this package simply as "qemu.qmp&= quot; without introducing confusion
>=C2=A0 =C2=A0 =C2=A0 > over whether or not "aqmp" is a new= protocol or not.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > The trade-off is increased confusion inside t= he QEMU developer
>=C2=A0 =C2=A0 =C2=A0 > tree. Sorry!
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Signed-off-by: John Snow<jsnow@redhat.com <mailto:jsnow@redhat.com>>
>
>=C2=A0 =C2=A0 =C2=A0Great job!
>
>=C2=A0 =C2=A0 =C2=A0I looked thorough the patch, changes looks correct.= Simply rename every aqmp / AQMP occurrence.. But:
>
>
>=C2=A0 =C2=A0 =C2=A0[root@kvm review]# git grep -i aqmp
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py:AQMP TUI
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py:AQMP TUI is an asynchro= nous interface built on top the of the AQMP library.
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py:Example Usage: aqmp-tui= <SOCKET | TCP IP:PORT>
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py:Full Usage: aqmp-tui --= help
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py:=C2=A0 =C2=A0 Implement= s the AQMP TUI.
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py:=C2=A0 =C2=A0 parser = =3D argparse.ArgumentParser(description=3D'AQMP TUI')
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp =3D QMPClient(nickname)
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 if self._aqmp.greeting is not None:
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 return self._aqmp.greeting._asdict()
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp.await_greeting =3D negotiate
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp.negotiate =3D negotiate
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 self._aqmp.connect(self._address)
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp.await_greeting =3D True
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp.negotiate =3D True
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 self._aqmp.accept(self._address),
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._aqmp._raw(qmp_cmd, assign_id=3DFalse)= ,
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 self._aqmp.execute(cmd, kwds),
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 if self._aqmp.events.empty():
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._aqmp.events.get(),
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 events =3D [dict(x) for x in self._aqmp.events.clear()]
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp.events.clear()
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 self._aqmp.disconnect()
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 self._aqmp.send_fd_scm(fd)
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/legacy.py:=C2=A0 =C2=A0 =C2=A0 =C2= =A0 if self._aqmp.runstate =3D=3D Runstate.IDLE:
>=C2=A0 =C2=A0 =C2=A0python/setup.cfg:# AQMP TUI dependencies
>=C2=A0 =C2=A0 =C2=A0python/setup.cfg:=C2=A0 =C2=A0 aqmp-tui =3D qemu.qm= p.aqmp_tui:main [tui]
>=C2=A0 =C2=A0 =C2=A0python/setup.cfg:[mypy-qemu.qmp.aqmp_tui]
>
>=C2=A0 =C2=A0 =C2=A0[root@kvm review]# git ls-tree -r --name-only HEAD = | grep -i aqmp
>=C2=A0 =C2=A0 =C2=A0python/qemu/qmp/aqmp_tui.py
>
>
>=C2=A0 =C2=A0 =C2=A0I think, this all should be renamed too
>
>
> For aqmp_tui.py, sure. The new TUI isn't 100% ready to replace qmp= -shell yet, so I wasn't entirely certain what to name it... qmp-tui? >
> *shrugs*.

I don't remember what tui is abbreviating) qmp-tui is OK, and it may be= renamed to qmp-shell when it is ready to replace it..

"text user inter= face", by analogy with GUI (graphical UI).

=

>
> for legacy.py, it's just an internal variable name and I wasn'= t sure it was worth the churn just to change a private variable. I could st= ill do it if you feel strongly about it.
>

I'd rename everything.
Alright, I'll do so in the respin.=C2=A0

<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">

--
Best regards,
Vladimir

Thanks for the reviews!
--000000000000b1640305d35a0613--