Revision e7e7dbbd kamaki/clients/tests/image.py
b/kamaki/clients/tests/image.py | ||
---|---|---|
57 | 57 |
def _prepare_img(self): |
58 | 58 |
f = open(self['image', 'local_path'], 'rb') |
59 | 59 |
(token, uuid) = (self['token'], self['store', 'account']) |
60 |
print('UUID HERE: %s (%s)' % (uuid, token)) |
|
61 | 60 |
if not uuid: |
62 | 61 |
from kamaki.clients.astakos import AstakosClient |
63 | 62 |
uuid = AstakosClient(self['astakos', 'url'], token).term('uuid') |
64 |
print('UUID HERE: %s' % uuid) |
|
65 | 63 |
from kamaki.clients.pithos import PithosClient |
66 | 64 |
self.pithcli = PithosClient(self['store', 'url'], token, uuid) |
67 | 65 |
cont = 'cont_%s' % self.now |
... | ... | |
70 | 68 |
print('\t- Create container %s on Pithos server' % cont) |
71 | 69 |
self.pithcli.container_put() |
72 | 70 |
self.location = 'pithos://%s/%s/%s' % (uuid, cont, self.obj) |
73 |
print('\t- Upload an image at %s...' % self.location) |
|
71 |
print('\t- Upload an image at %s...\n' % self.location)
|
|
74 | 72 |
self.pithcli.upload_object(self.obj, f) |
75 | 73 |
print('\t- ok') |
76 | 74 |
f.close() |
Also available in: Unified diff