[PATCH 10/10] pwclient: Integrate 'status' endpoint

Stephen Finucane stephen.finucane at intel.com
Wed Jul 29 18:58:48 AEST 2015


Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
---
 patchwork/bin/pwclient | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient
index 8d1f476..bcb0293 100755
--- a/patchwork/bin/pwclient
+++ b/patchwork/bin/pwclient
@@ -207,6 +207,11 @@ def action_projects(rpc):
                 project['linkname'], \
                 project['name']))
 
+def action_statuses(rpc):
+    statuses = rpc.status_list("", 0)
+    for status in statuses:
+        print("%d (for '%s')" % (status['id'], status['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')
+    statuses_parser = subparsers.add_parser(
+        'statuses',
+        add_help=False,
+        help='''Show list of patch statuses'''
+    )
+    statuses_parser.set_defaults(subcmd='statuses')
     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('status'):
+        action_statuses(rpc)
+
     elif action.startswith('state'):
         action_states(rpc)
 
-- 
2.0.0



More information about the Patchwork mailing list