Revision 9a8861d1
b/kamaki/cli/commands/astakos.py | ||
---|---|---|
85 | 85 |
@errors.generic.all |
86 | 86 |
@errors.user.authenticate |
87 | 87 |
def _run(self, custom_token=None): |
88 |
super(self.__class__, self)._run() |
|
89 | 88 |
token_bu = self.client.token |
90 | 89 |
try: |
91 | 90 |
r = self.client.authenticate(custom_token) |
... | ... | |
96 | 95 |
self._print(r, self._print_access) |
97 | 96 |
|
98 | 97 |
def main(self, custom_token=None): |
98 |
super(self.__class__, self)._run() |
|
99 | 99 |
self._run(custom_token) |
100 |
|
|
101 |
|
|
102 |
@command(user_cmds) |
|
103 |
class user_list(_user_init, _optional_json): |
|
104 |
"""Get service endpoints""" |
|
105 |
|
|
106 |
@errors.generic.all |
|
107 |
def _run(self, custom_token=None): |
|
108 |
self._print(self.client.list_users()) |
|
109 |
|
|
110 |
def main(self): |
|
111 |
super(self.__class__, self)._run() |
|
112 |
self._run() |
b/kamaki/clients/astakos/__init__.py | ||
---|---|---|
117 | 117 |
|
118 | 118 |
def list_users(self): |
119 | 119 |
"""list cached users information""" |
120 |
if not self._cache: |
|
121 |
self.authenticate() |
|
120 | 122 |
r = [] |
121 | 123 |
for k, v in self._cache.items(): |
122 | 124 |
r.append(dict(v['access']['user'])) |
Also available in: Unified diff