From: Stephen Finucane Date: Tue, 21 Jul 2015 17:01:13 +0000 (+0100) Subject: pwclient: Integrate 'checks' endpoint X-Git-Tag: v1.1.0~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=946c5b72b2e3f9db851379c1cf68f1f9d7eebe7f;p=thirdparty%2Fpatchwork.git pwclient: Integrate 'checks' endpoint Signed-off-by: Stephen Finucane --- 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)