Revision f724cd35 kamaki/cli/commands/astakos.py

b/kamaki/cli/commands/astakos.py
32 32
# or implied, of GRNET S.A.command
33 33

  
34 34
from kamaki.cli import command
35
from kamaki.clients.astakos import AstakosClient
35
#from kamaki.clients.astakos import AstakosClient
36 36
from kamaki.cli.commands import _command_init, errors, _optional_json
37 37
from kamaki.cli.command_tree import CommandTree
38 38

  
......
45 45
    @errors.generic.all
46 46
    @errors.user.load
47 47
    def _run(self):
48
        token = self.config.get('user', 'token')\
49
            or self.config.get('global', 'token')
50
        base_url = self.config.get('user', 'url')\
51
            or self.config.get('global', 'url')
52
        self.client = AstakosClient(base_url=base_url, token=token)
48
        #token = self.config.get('user', 'token')\
49
        #    or self.config.get('global', 'token')
50
        #base_url = self.config.get('global', 'url')
51
        #self.client = AstakosClient(base_url=base_url, token=token)
52
        self.client = self.auth_base
53 53
        self._set_log_params()
54 54
        self._update_max_threads()
55 55

  
......
71 71
    @errors.user.authenticate
72 72
    def _run(self, custom_token=None):
73 73
        super(self.__class__, self)._run()
74
        self._print(
75
            [self.client.authenticate(custom_token)],
76
            title=('uuid', 'name',), with_redundancy=True)
74
        r = self.auth_base.authenticate(custom_token)
75
        self._print([r], title=('uuid', 'name',), with_redundancy=True)
77 76

  
78 77
    def main(self, custom_token=None):
79 78
        self._run(custom_token)

Also available in: Unified diff