From patchwork Mon Mar 16 03:29:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moshe Levi X-Patchwork-Id: 1255277 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.a=rsa-sha256 header.s=selector1 header.b=iSwqRwVo; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48ghz14BD3z9sPJ for ; Mon, 16 Mar 2020 14:45:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A53E389501; Mon, 16 Mar 2020 03:45:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id icSgHt7XCwOH; Mon, 16 Mar 2020 03:45:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 0D77588680; Mon, 16 Mar 2020 03:45:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E3FEFC18DA; Mon, 16 Mar 2020 03:45:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 43D28C013E for ; Mon, 16 Mar 2020 03:45:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 38280899ED for ; Mon, 16 Mar 2020 03:45:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uIDjM1oLPqjZ for ; Mon, 16 Mar 2020 03:45:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70080.outbound.protection.outlook.com [40.107.7.80]) by hemlock.osuosl.org (Postfix) with ESMTPS id ECEA3899AE for ; Mon, 16 Mar 2020 03:45:25 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SqRLZlmcpVgPm8KkTVg0p74d9NW7ermtCVPmMSn09VX3sBa0VOt4aTDugW0IoY3ut3XFKBl04g9t2Uxu4kp9HdiMZhAtIUAW2Pi0lyZLT7uVCHlXcXSl/4jP5PB+JSc6S8SR9C8Kf+TUELBwoRUlmbzmBtLKiz6gjgJytiNvvdLN1UfB0pU/mAlUmlTazvqvjen0dWsu4BKD6/ljJjjpt80Sryvd0Wk1JV5JmxrxTPQX/ajCeTSdUynE2VbwNWrQPbWw9mSDyi9wjXr/PO6DD7SoHfv9x+Ur3fYS3XUDwRvoIS6sY6MUWxZUWgQpUFxLPnazfl+H4xkcNpOWNkS8Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zvgXEnKSCdLBXb5ZGAJ0agouj4jkZa4CkTZgko9sGfA=; b=YHbZKLFk1go8jwBMU5dhCKskOnG5y2MaGBu+ELVefEjTXJVcaGmqSQs4Fkw3E34WO1JRpFj+YQmsCimpiaZDhUbjDUqbs0poUBWDO6UccFoYn31IzygzDWdsjMIudsExhc/feniiaHWwc4EkECjkO1s1oZ2eeOTjQ8Ik+IStIq3UBVEzkUVKgdzZHsXk968+ceBHFfIykt44/YonPjAxTXOxANY6VGw3fQN9rz+jUS3kuHQrpIVp55mFlFnqtwX2GhJKVj9E6E5GQFwPw7B/C1m6LaB4RO2kJ8bP3TCsm3yPHLGmLfxYGULNpf/eM5wJYLIxRL0q/+QODdU1l9WnZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zvgXEnKSCdLBXb5ZGAJ0agouj4jkZa4CkTZgko9sGfA=; b=iSwqRwVobAugyv6w0NIIoV0n9kBwbceV4nPDIHZCz8/pgsGlux6mMls3pmLolPKJFMwsd2SbRO3VWegV30St50kuYU60427yqHrwfDeP+t1az4eOHdkMImkF6owjnh82AKwfTFbuLW3fdwG+RroSgf6r4R+wQ1v5uZc5e4Phlng= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=moshele@mellanox.com; Received: from AM6PR05MB5425.eurprd05.prod.outlook.com (20.177.119.11) by AM6PR05MB4933.eurprd05.prod.outlook.com (20.177.34.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.18; Mon, 16 Mar 2020 03:29:56 +0000 Received: from AM6PR05MB5425.eurprd05.prod.outlook.com ([fe80::dc89:3647:777e:a6af]) by AM6PR05MB5425.eurprd05.prod.outlook.com ([fe80::dc89:3647:777e:a6af%6]) with mapi id 15.20.2814.021; Mon, 16 Mar 2020 03:29:56 +0000 From: Moshe Levi To: dev@openvswitch.org Date: Mon, 16 Mar 2020 05:29:47 +0200 Message-Id: <20200316032947.2252-1-moshele@mellanox.com> X-Mailer: git-send-email 2.23.0.windows.1 X-ClientProxiedBy: ZRAP278CA0001.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::11) To AM6PR05MB5425.eurprd05.prod.outlook.com (2603:10a6:20b:5d::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from MTR-MOSHELE.mtl.com (141.226.14.120) by ZRAP278CA0001.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.14 via Frontend Transport; Mon, 16 Mar 2020 03:29:55 +0000 X-Mailer: git-send-email 2.23.0.windows.1 X-Originating-IP: [141.226.14.120] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9590f7d1-d3b4-4425-2f6f-08d7c95a4c58 X-MS-TrafficTypeDiagnostic: AM6PR05MB4933:|AM6PR05MB4933: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(39860400002)(136003)(346002)(366004)(199004)(8936002)(52116002)(4326008)(36756003)(8676002)(316002)(81156014)(956004)(6486002)(81166006)(2616005)(6506007)(6512007)(478600001)(5660300002)(2906002)(1076003)(6916009)(6666004)(26005)(4744005)(66556008)(66946007)(107886003)(16526019)(66476007)(86362001)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4933; H:AM6PR05MB5425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V728wrHr1dID0rsexT3SqIh7jbb8XgpTpSvotv2DnbtCj8MqjkVIfqsBQgdRTJQySSjZAujPiVQrJlEUUXLB4GJpRp0fQyqLPYfplU3ocVE6me5ZYZu8c+wdx/Tq5FYYHWXkjyky1YzutfpcUgU7Vp1HuYASNyDmUo+7wAVCis9HOffcRSNfTGBw3yPj5NOGliEyNOePgKAi2pIZzRqplDN2+Tl1jh8rKw7M9dZXvd07rCbvZFI800nMrhU+HRA7RpZBVOPWukcl/wjo1XVWBGs4UDIQqkPMSRjFjb/iUQFdx7BV/Fxn8OlO5hRug8nLUy4jldHDdEu1BGmDR4XB7mzjDK/Ozt/g33RgudnadAj324YPuufTzSbxz9O82Fm9+tOXlMG2OlAEil6AkU3d1/iZWio8AKYYaMbCvb3Pwodxtz9C9ApstgDlOYOG5A8i X-MS-Exchange-AntiSpam-MessageData: peVJ/8szQKc52uZXR7zMhGOWpWsgVvvWcBlk7lKyXuxtz5n4GsBwziwhcEHEseUfi/UYHIjSbTaCeWs78Nr7B2XulW9XWOvmUuPn7ge9hksC7zmoX53BPkVSOoS4IAiDDrt7LLXaDrsuREM1AqPVaw== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9590f7d1-d3b4-4425-2f6f-08d7c95a4c58 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2020 03:29:56.3640 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VfhrJ0lgDpDuUVOgYv/6zPj9KWIVZyKcUc/cVJiZykhFKMkkIFXs63oPC93QW7qBjcgodGHFzYO9wruk11FsZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4933 Subject: [ovs-dev] [PATCH] python: allow UnixctlClient to get argv as tuple in transact X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Currently transact check that argv is of type list. This patch allow argv also to be tuple. Signed-off-by: Moshe Levi --- python/ovs/unixctl/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ovs/unixctl/client.py b/python/ovs/unixctl/client.py index 8283f99bb..50f619f4b 100644 --- a/python/ovs/unixctl/client.py +++ b/python/ovs/unixctl/client.py @@ -28,7 +28,7 @@ class UnixctlClient(object): def transact(self, command, argv): assert isinstance(command, str) - assert isinstance(argv, list) + assert isinstance(argv, (list, tuple)) for arg in argv: assert isinstance(arg, str)