diff options
Diffstat (limited to 'icktool')
-rwxr-xr-x | icktool | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -155,6 +155,16 @@ class Icktool(cliapp.Application): obj = json.loads(text) self._prettyson(obj) + def cmd_trigger(self, args): + project = args[0] + pipeline = args[1] + path = '/projects/{}/pipelines/{}/+trigger'.format(project, pipeline) + api = self._new_api() + code, text = api.get(path) + self._report(code, 200, text) + obj = json.loads(text) + self._prettyson(obj) + def cmd_list_workers(self, args): rc = self._new_rc('/workers', 'worker') self._prettyson(rc.list()) @@ -219,7 +229,7 @@ class Icktool(cliapp.Application): return ResourceCommands(path, api, field_name) def _prettyson(self, obj): - json.dump(obj, sys.stdout, indent=4) + json.dump(obj, sys.stdout, indent=4, sort_keys=True) sys.stdout.write('\n') def _read_object(self): |