Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
9a8861d1
Commit
9a8861d1
authored
Jun 27, 2013
by
Stavros Sachtouris
Browse files
Implement a user_list to list cached shell users
Refs: #3632
parent
9d0a8ecf
Changes
2
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/commands/astakos.py
View file @
9a8861d1
...
...
@@ -85,7 +85,6 @@ class user_authenticate(_user_init, _optional_json):
@
errors
.
generic
.
all
@
errors
.
user
.
authenticate
def
_run
(
self
,
custom_token
=
None
):
super
(
self
.
__class__
,
self
).
_run
()
token_bu
=
self
.
client
.
token
try
:
r
=
self
.
client
.
authenticate
(
custom_token
)
...
...
@@ -96,4 +95,18 @@ class user_authenticate(_user_init, _optional_json):
self
.
_print
(
r
,
self
.
_print_access
)
def
main
(
self
,
custom_token
=
None
):
super
(
self
.
__class__
,
self
).
_run
()
self
.
_run
(
custom_token
)
@
command
(
user_cmds
)
class
user_list
(
_user_init
,
_optional_json
):
"""Get service endpoints"""
@
errors
.
generic
.
all
def
_run
(
self
,
custom_token
=
None
):
self
.
_print
(
self
.
client
.
list_users
())
def
main
(
self
):
super
(
self
.
__class__
,
self
).
_run
()
self
.
_run
()
kamaki/clients/astakos/__init__.py
View file @
9a8861d1
...
...
@@ -117,6 +117,8 @@ class AstakosClient(Client):
def
list_users
(
self
):
"""list cached users information"""
if
not
self
.
_cache
:
self
.
authenticate
()
r
=
[]
for
k
,
v
in
self
.
_cache
.
items
():
r
.
append
(
dict
(
v
[
'access'
][
'user'
]))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment