diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-06 20:35:46 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-06 20:35:46 +0100 |
commit | f3ee9238ded2254b05f77a76e195538b4f18aace (patch) | |
tree | fcbaca1c17d805ed8ef9ee531f5ea0835d9fede8 | |
parent | 3b31de6529a6a0f196d8a26833d35957d079390a (diff) | |
download | ick2-f3ee9238ded2254b05f77a76e195538b4f18aace.tar.gz |
Add: icktool list-builds
-rwxr-xr-x | icktool | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -20,7 +20,6 @@ import logging import sys import cliapp -import urllib3 import requests import ick2 @@ -41,7 +40,8 @@ class Icktool(cliapp.Application): _default_scopes = [ 'uapi_version_get', - ] + scopes('projects') + scopes('workers') + 'uapi_work_post', + ] + scopes('projects') + scopes('work') + scopes('builds') def add_settings(self): self.settings.string( @@ -144,6 +144,10 @@ class Icktool(cliapp.Application): name = args[0] rc.delete(name) + def cmd_list_builds(self, args): + rc = self._new_rc('/builds', 'build') + self._prettyson(rc.list()) + def _new_token(self): scopes = self.settings['scope'] cmd = self.settings['token-private-key-cmd'] |