Commit b91111b9 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Implement user_info to show current user info

Refs: #3632
parent 9a8861d1
......@@ -32,6 +32,7 @@
# or implied, of GRNET S.A.command
from kamaki.cli import command
from kamaki.cli.argument import ValueArgument
from kamaki.clients.astakos import AstakosClient
from kamaki.cli.commands import (
_command_init, errors, _optional_json, addLogSettings)
......@@ -110,3 +111,20 @@ class user_list(_user_init, _optional_json):
def main(self):
super(self.__class__, self)._run()
class user_info(_user_init, _optional_json):
"""Get info for current or selected user"""
arguments = dict(
token=ValueArgument('Use this instead of current token', ('--token'))
def _run(self):
self._print(self.client.user_info(self['token']), print_dict)
def main(self):
super(self.__class__, self)._run()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment