Revision 14c72dbd
b/kamaki/clients/livetest/pithos.py | ||
---|---|---|
663 | 663 |
self.assertNotEqual(sc1, sc2) |
664 | 664 |
|
665 | 665 |
"""Upload an object to download""" |
666 |
container_info_cache = dict() |
|
666 | 667 |
trg_fname = 'remotefile_%s' % self.now |
667 | 668 |
f_size = 59247824 |
668 | 669 |
src_f = self.create_large_file(f_size) |
669 | 670 |
print('\tUploading...') |
670 |
r = self.client.upload_object(trg_fname, src_f) |
|
671 |
r = self.client.upload_object( |
|
672 |
trg_fname, src_f, |
|
673 |
container_info_cache=container_info_cache) |
|
671 | 674 |
print('\tDownloading...') |
672 | 675 |
self.files.append(NamedTemporaryFile()) |
673 | 676 |
dnl_f = self.files[-1] |
... | ... | |
683 | 686 |
trg_fname = 'boringfile_%s' % self.now |
684 | 687 |
src_f = self.create_boring_file(42) |
685 | 688 |
print('\tUploading boring file...') |
686 |
self.client.upload_object(trg_fname, src_f) |
|
689 |
self.client.upload_object( |
|
690 |
trg_fname, src_f, |
|
691 |
container_info_cache=container_info_cache) |
|
687 | 692 |
print('\tDownloading boring file...') |
688 | 693 |
self.files.append(NamedTemporaryFile()) |
689 | 694 |
dnl_f = self.files[-1] |
b/kamaki/clients/pithos/__init__.py | ||
---|---|---|
361 | 361 |
self._assert_container() |
362 | 362 |
|
363 | 363 |
#init |
364 |
block_info = (blocksize, blockhash, size, nblocks) =\ |
|
365 |
self._get_file_block_info(f, size, container_info_cache) |
|
364 |
block_info = ( |
|
365 |
blocksize, blockhash, size, nblocks) = self._get_file_block_info( |
|
366 |
f, size, container_info_cache) |
|
366 | 367 |
(hashes, hmap, offset) = ([], {}, 0) |
367 | 368 |
if not content_type: |
368 | 369 |
content_type = 'application/octet-stream' |
Also available in: Unified diff