Revision 49517b8a
b/snf-tools/synnefo_tools/burnin/common.py | ||
---|---|---|
198 | 198 |
delete_stale = False |
199 | 199 |
temp_directory = None |
200 | 200 |
failfast = None |
201 |
temp_containers = [] |
|
202 |
|
|
201 | 203 |
|
202 | 204 |
quotas = Proper(value=None) |
203 | 205 |
|
... | ... | |
496 | 498 |
assert container, "No pithos container was given" |
497 | 499 |
|
498 | 500 |
self.info("Creating pithos container %s", container) |
499 |
self.clients.pithos.container = container
|
|
500 |
self.clients.pithos.container_put()
|
|
501 |
self.clients.pithos.create_container(container)
|
|
502 |
self.temp_containers.append(container)
|
|
501 | 503 |
|
502 | 504 |
# ---------------------------------- |
503 | 505 |
# Quotas |
b/snf-tools/synnefo_tools/burnin/pithos_tests.py | ||
---|---|---|
285 | 285 |
@classmethod |
286 | 286 |
def tearDownClass(cls): # noqa |
287 | 287 |
"""Clean up""" |
288 |
print cls.created_container |
|
289 |
if cls.created_container is not None: |
|
290 |
cls.clients.pithos.del_container(delimiter='/') |
|
291 |
cls.clients.pithos.purge_container() |
|
288 |
pithos = cls.clients.pithos |
|
289 |
for c in getattr(cls, 'temp_containers', []): |
|
290 |
pithos.container = c |
|
291 |
try: |
|
292 |
pithos.del_container(delimiter='/') |
|
293 |
pithos.purge_container(c) |
|
294 |
except ClientError as ce: |
|
295 |
print ('Failed to destroy container (%s)' % ce) |
Also available in: Unified diff