[
https://issues.apache.org/jira/browse/LIBCLOUD-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14026651#comment-14026651
]
ASF GitHub Bot commented on LIBCLOUD-540:
-----------------------------------------
GitHub user rgbkrk opened a pull request:
https://github.com/apache/libcloud/pull/314
[LIBCLOUD-540] [WIP] Copy object
This is the beginning of a patch for
https://issues.apache.org/jira/browse/LIBCLOUD-540. It's been sitting on my
machine gathering dust, so I'm submitting the WIP it to make sure I finish it
off.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rgbkrk/libcloud 540_copy_object
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/314.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #314
----
commit 06104bed2026e7db29530e07498057fc29ea0c52
Author: Kyle Kelley <[email protected]>
Date: 2014-04-18T16:26:09Z
Stub out copy object interface.
commit e4dbd02ab16744f6a630b29a6bc9f56be4518fff
Author: Kyle Kelley <[email protected]>
Date: 2014-04-21T21:57:47Z
Copy object in cloudfiles
commit 6f99f4eef4dbf18c4b320197511d4e61cafc465c
Author: Kyle Kelley <[email protected]>
Date: 2014-06-10T16:37:43Z
Test copy object.
----
> Implement Copy Object Semantic
> ------------------------------
>
> Key: LIBCLOUD-540
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-540
> Project: Libcloud
> Issue Type: Improvement
> Components: Storage
> Reporter: Kyle Kelley
> Labels: features
> Original Estimate: 612h
> Remaining Estimate: 612h
>
> Several providers have a copy object semantic that works within one
> datacenter/region.
> * [Azure copy Blob|http://msdn.microsoft.com/library/azure/dd894037.aspx]
> * [OpenStack Swift object
> copy|http://docs.openstack.org/api/openstack-object-storage/1.0/content/copy-object.html].
> I have not dug into Amazon S3 or any others, so I could use some guidance
> there.
> I'd like to design it to be used cross-providers instead of ex_copy_object,
> as discussed [in
> #275|https://issues.apache.org/jira/browse/LIBCLOUD-275?focusedCommentId=13959367&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13959367].
> I'm imagining that the StorageDriver class would get this function header:
> {code:title=libcloud/storage/base.py|borderStyle=solid}
> class StorageDriver(BaseDriver):
> ...
> def copy_object(self, src_container_name, src_object_name,
> dst_container_name, dst_object_name):
> """
> Copy object from one container to another (or the same container with
> a new name).
> :param src_container_name: Source container name
> :type src_container_name: ``str``
> :param src_object_name: Source object name
> :type src_object_name: ``str``
> :param dst_container_name: Destination container name
> :type dst_container_name: ``str``
> :param dst_object_name: Destination object name
> :type dst_object_name: ``str``
> :rtype: :class:`Object`
> """
> raise NotImplementedError(
> 'copy_object not implemented for this driver')
> {code}
> That layout works for both OpenStack/Rackspace/HP and Azure, minus any
> additional metadata headers that you might want to send for these providers.
> Is there a clean way to handle that?
--
This message was sent by Atlassian JIRA
(v6.2#6252)