From 946c5b72b2e3f9db851379c1cf68f1f9d7eebe7f Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 21 Jul 2015 18:01:13 +0100 Subject: [PATCH] pwclient: Integrate 'checks' endpoint 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 76dd97b9..39d8f8aa 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) -- 2.47.3