Revision 1f5debf7

b/kamaki/cli/commands/pithos_cli.py
53 53
from kamaki.cli.argument import ProgressBarArgument
54 54
from kamaki.cli.commands import _command_init, errors
55 55
from kamaki.clients.pithos import PithosClient, ClientError
56
from kamaki.clients.astakos import AstakosClient
56 57

  
57 58

  
58 59
kloger = getLogger('kamaki')
......
79 80
            '  to get the service url: /config get store.url',
80 81
            '  to set the service url: /config set store.url <url>',
81 82
            ' ',
82
            '  to get user the account: /config get store.account',
83
            '  to get user account:     /config get store.account',
83 84
            '           or              /config get account',
84 85
            '  to set the user account: /config set store.account <account>',
85 86
            ' ',
......
189 190
            or self.config.get('global', 'token')
190 191
        self.base_url = self.config.get('store', 'url')\
191 192
            or self.config.get('global', 'url')
192
        self.account = self.config.get('store', 'account')\
193
            or self.config.get('global', 'account')
193
        self._set_account()
194 194
        self.container = self.config.get('store', 'container')\
195 195
            or self.config.get('global', 'container')
196 196
        self.client = PithosClient(base_url=self.base_url,
......
201 201
    def main(self):
202 202
        self._run()
203 203

  
204
    def _set_account(self):
205
        astakos = AstakosClient(self.config.get('astakos', 'url'), self.token)
206
        self.account = astakos.term('uuid')
207

  
204 208

  
205 209
class _store_account_command(_pithos_init):
206 210
    """Base class for account level storage commands"""
b/kamaki/clients/tests/pithos.py
38 38

  
39 39
from kamaki.clients import tests, ClientError
40 40
from kamaki.clients.pithos import PithosClient
41
from kamaki.clients.astakos import AstakosClient
41 42

  
42 43

  
43 44
class Pithos(tests.Generic):
......
48 49
        self.client = PithosClient(
49 50
            self['store', 'url'],
50 51
            self['store', 'token'],
51
            self['store', 'account'])
52
            AstakosClient(
53
                self['astakos', 'url'],
54
                self['store', 'token']
55
            ).term('uuid'))
52 56

  
53 57
        self.now = time.mktime(time.gmtime())
54 58
        self.now_unformated = datetime.datetime.utcnow()
......
58 62
        self.client.container = self.c1
59 63
        self.client.object_post('test',
60 64
            update=True,
61
            permissions={'read': 'someUser'})
65
            permissions={'read': [self.client.account]})
62 66

  
63 67
        self.create_remote_object(self.c1, 'another.test')
64 68

  

Also available in: Unified diff