From patchwork Thu Nov 5 17:13:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 540535 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 E809A14018C for ; Fri, 6 Nov 2015 04:14:21 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id B92C01A0CDB for ; Fri, 6 Nov 2015 04:14:21 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lists.ozlabs.org (Postfix) with ESMTP id 74FE41A0B8C for ; Fri, 6 Nov 2015 04:13:40 +1100 (AEDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 05 Nov 2015 09:13:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,248,1444719600"; d="scan'208";a="828107346" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 05 Nov 2015 09:13:37 -0800 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 tA5HDaEE023489; Thu, 5 Nov 2015 17:13:36 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id tA5HDanv032244; Thu, 5 Nov 2015 17:13:36 GMT Received: (from sfinucan@localhost) by sivswdev01.ir.intel.com with id tA5HDax0032240; Thu, 5 Nov 2015 17:13:36 GMT From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH v3 8/8] pwclient: Integrate 'checks' endpoint Date: Thu, 5 Nov 2015 17:13:23 +0000 Message-Id: <1446743603-31517-9-git-send-email-stephen.finucane@intel.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1446743603-31517-1-git-send-email-stephen.finucane@intel.com> References: <1446743603-31517-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 76dd97b..39d8f8a 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -225,6 +225,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")) @@ -439,6 +444,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', help='''Show list of potential patch states''' @@ -640,6 +651,9 @@ def main(): elif action.startswith('project'): action_projects(rpc) + elif action.startswith('check'): + action_checks(rpc) + elif action.startswith('state'): action_states(rpc)