From patchwork Thu Oct 1 14:52:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 525074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7F480140D16 for ; Fri, 2 Oct 2015 00:52:47 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 65B701A02C3 for ; Fri, 2 Oct 2015 00:52:47 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lists.ozlabs.org (Postfix) with ESMTP id 150E01A010C for ; Fri, 2 Oct 2015 00:52:44 +1000 (AEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 01 Oct 2015 07:52:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,618,1437462000"; d="scan'208";a="572137163" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 01 Oct 2015 07:52:42 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t91EqfNN005384; Thu, 1 Oct 2015 15:52:41 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t91EqfxT019681; Thu, 1 Oct 2015 15:52:41 +0100 Received: (from sfinucan@localhost) by sivswdev01.ir.intel.com with id t91EqfE2019677; Thu, 1 Oct 2015 15:52:41 +0100 From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH v2 10/10] pwclient: Integrate 'checks' endpoint Date: Thu, 1 Oct 2015 15:52:34 +0100 Message-Id: <1443711154-18689-11-git-send-email-stephen.finucane@intel.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1443711154-18689-1-git-send-email-stephen.finucane@intel.com> References: <1443711154-18689-1-git-send-email-stephen.finucane@intel.com> X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Stephen Finucane --- patchwork/bin/pwclient | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index 8d1f476..4cccb6c 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -207,6 +207,11 @@ def action_projects(rpc): project['linkname'], \ project['name'])) +def action_checks(rpc): + checks = rpc.check_list("", 0) + for check in checks: + print("%d (for '%s')" % (check['id'], check['patch'])) + def action_states(rpc): states = rpc.state_list("", 0) print("%-5s %s" % ("ID", "Name")) @@ -466,6 +471,12 @@ def main(): help='''List all projects''' ) projects_parser.set_defaults(subcmd='projects') + checks_parser = subparsers.add_parser( + 'checks', + add_help=False, + help='''Show list of patch checks''' + ) + checks_parser.set_defaults(subcmd='checks') states_parser = subparsers.add_parser( 'states', add_help=False, @@ -680,6 +691,9 @@ def main(): elif action.startswith('project'): action_projects(rpc) + elif action.startswith('check'): + action_checks(rpc) + elif action.startswith('state'): action_states(rpc)