From nobody Tue Feb 10 19:48:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1696514283; cv=none; d=zohomail.com; s=zohoarc; b=HdarKX0e8OLYRhNBECVG6VqlyWnczwMqVU51MC1LjO7efgm9C230HoDUqPzuODrgotImcI5AkC9MvNCLHbqka+nZ0IpR1To3cBibSu1UhggD4YX7kjui9axag+3Bl55WlRGAyIYLRZoog+PrU221zdLUQJa8B5Thna6ELhvw7d0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696514283; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=f9XlzrFQee7Z3f0e7OySwpMTh7Xh4VyJA74uMaRrsWc=; b=it/jQOhrjUFTxOgHXAMrsuc0tqDIVHMkINHllLX9gtsW8nerny9k6uzbNZgXCubETsXutzlnFAiXFMDZuGTkLjIdhgZBUzpQp8jtESqnAMbzRsASEe5KNp1JJOtOOGPyX0y0/y+V4fu8AgRev1bftBChG/W3KDmUPPMRrHjxAwY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696514283014776.1281752240924; Thu, 5 Oct 2023 06:58:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoOq5-0000AJ-T4; Thu, 05 Oct 2023 09:56:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoOpv-0008WN-U3; Thu, 05 Oct 2023 09:56:20 -0400 Received: from forwardcorp1b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:df01]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoOpo-0001wZ-Bt; Thu, 05 Oct 2023 09:56:15 -0400 Received: from mail-nwsmtp-smtp-corp-main-11.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-11.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7d8a:0:640:8fc3:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTP id 8C53761199; Thu, 5 Oct 2023 16:56:09 +0300 (MSK) Received: from vsementsov-lin.. (unknown [2a02:6b8:b081:b584::1:2f]) by mail-nwsmtp-smtp-corp-main-11.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id qtYmoW4Oi4Y0-qQsAwHAs; Thu, 05 Oct 2023 16:56:08 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1696514168; bh=f9XlzrFQee7Z3f0e7OySwpMTh7Xh4VyJA74uMaRrsWc=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=TR8lfP//mMke/sbLvUNe3A+T67A6nODY6KZEmBFPRpcam3qFG1pQLpgYJZotA0sBW +IF2qgXyny8Ka6nRHEqYZjEYTZapdv3wMx4TrXLeUM9yaubxwwh42l3qBi4KAl7TrU bP+dpBPvzFSVIHeefrbYKXVsL4eNek2NzYJDrqNQ= Authentication-Results: mail-nwsmtp-smtp-corp-main-11.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, vsementsov@yandex-team.ru, jsnow@redhat.com, crosa@redhat.com, kwolf@redhat.com, hreitz@redhat.com, Beraldo Leal Subject: [PATCH v6 04/14] python: rename QEMUMonitorProtocol.cmd() to cmd_raw() Date: Thu, 5 Oct 2023 16:55:40 +0300 Message-Id: <20231005135550.331657-5-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005135550.331657-1-vsementsov@yandex-team.ru> References: <20231005135550.331657-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:df01; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1696514284439100003 Content-Type: text/plain; charset="utf-8" Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better. We also want to rename command() to cmd() in future, so this commit is a necessary step. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- python/qemu/machine/machine.py | 2 +- python/qemu/qmp/legacy.py | 4 ++-- tests/qemu-iotests/iotests.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index 35d5a672db..dd1a79cb37 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -692,7 +692,7 @@ def qmp(self, cmd: str, conv_keys =3D True =20 qmp_args =3D self._qmp_args(conv_keys, args) - ret =3D self._qmp.cmd(cmd, args=3Dqmp_args) + ret =3D self._qmp.cmd_raw(cmd, args=3Dqmp_args) if cmd =3D=3D 'quit' and 'error' not in ret and 'return' in ret: self._quit_issued =3D True return ret diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py index fe115e301c..e5fa1ce9c4 100644 --- a/python/qemu/qmp/legacy.py +++ b/python/qemu/qmp/legacy.py @@ -194,8 +194,8 @@ def cmd_obj(self, qmp_cmd: QMPMessage) -> QMPMessage: ) ) =20 - def cmd(self, name: str, - args: Optional[Dict[str, object]] =3D None) -> QMPMessage: + def cmd_raw(self, name: str, + args: Optional[Dict[str, object]] =3D None) -> QMPMessage: """ Build a QMP command and send it to the QMP Monitor. =20 diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index ef66fbd62b..8ffd9fb660 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -460,7 +460,7 @@ def __init__(self, *args: str, instance_id: str =3D 'a'= , qmp: bool =3D False): def qmp(self, cmd: str, args: Optional[Dict[str, object]] =3D None) \ -> QMPMessage: assert self._qmp is not None - return self._qmp.cmd(cmd, args) + return self._qmp.cmd_raw(cmd, args) =20 def get_qmp(self) -> QEMUMonitorProtocol: assert self._qmp is not None --=20 2.34.1