Revision 3a066af4
b/kamaki/cli/commands/pithos_cli.py | ||
---|---|---|
529 | 529 |
class _source_destination_command(_store_container_command): |
530 | 530 |
|
531 | 531 |
arguments = dict( |
532 |
source_account=ValueArgument('', '--src-account'), |
|
532 | 533 |
recursive=FlagArgument('', ('-r', '--recursive')), |
533 | 534 |
prefix=FlagArgument('', '--with-prefix', default=''), |
534 | 535 |
suffix=ValueArgument('', '--with-suffix', default=''), |
... | ... | |
654 | 655 |
""" |
655 | 656 |
|
656 | 657 |
arguments = dict( |
658 |
source_account=ValueArgument('Account to copy from', '--src-account'), |
|
657 | 659 |
destination_container=ValueArgument( |
658 | 660 |
'use it if destination container name contains a : character', |
659 | 661 |
'--dst-container'), |
... | ... | |
692 | 694 |
@errors.pithos.container |
693 | 695 |
def _run(self, dst_cont, dst_path): |
694 | 696 |
no_source_object = True |
695 |
for src_object, dst_object in self.src_dst_pairs(dst_cont, dst_path):
|
|
697 |
for src_obj, dst_obj in self.src_dst_pairs(dst_cont, dst_path):
|
|
696 | 698 |
no_source_object = False |
697 | 699 |
self.client.copy_object( |
698 | 700 |
src_container=self.container, |
699 |
src_object=src_object,
|
|
701 |
src_object=src_obj, |
|
700 | 702 |
dst_container=dst_cont, |
701 |
dst_object=dst_object, |
|
703 |
dst_object=self.client.account, |
|
704 |
source_account=self['source_account'], |
|
702 | 705 |
source_version=self['source_version'], |
703 | 706 |
public=self['public'], |
704 | 707 |
content_type=self['content_type']) |
b/kamaki/clients/livetest/pithos.py | ||
---|---|---|
835 | 835 |
self._test_0110_object_copy() |
836 | 836 |
|
837 | 837 |
def _test_0110_object_copy(self): |
838 |
# TODO: check with source_account option |
|
838 | 839 |
self.client.container = self.c2 |
839 | 840 |
obj = 'test2' |
840 | 841 |
|
b/kamaki/clients/pithos.py | ||
---|---|---|
1072 | 1072 |
self, src_container, src_object, dst_container, |
1073 | 1073 |
dst_object=False, |
1074 | 1074 |
source_version=None, |
1075 |
source_account=None, |
|
1075 | 1076 |
public=False, |
1076 | 1077 |
content_type=None, |
1077 | 1078 |
delimiter=None): |
... | ... | |
1086 | 1087 |
|
1087 | 1088 |
:param source_version: (str) source object version |
1088 | 1089 |
|
1090 |
:param source_account: (str) account to copy from |
|
1091 |
|
|
1089 | 1092 |
:param public: (bool) |
1090 | 1093 |
|
1091 | 1094 |
:param content_type: (str) |
... | ... | |
1102 | 1105 |
copy_from=src_path, |
1103 | 1106 |
content_length=0, |
1104 | 1107 |
source_version=source_version, |
1108 |
source_account=source_account, |
|
1105 | 1109 |
public=public, |
1106 | 1110 |
content_type=content_type, |
1107 | 1111 |
delimiter=delimiter) |
Also available in: Unified diff