You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/07/16 00:54:51 UTC

[1/4] libcloud git commit: V4 authenticaion and multipart_upload currently fails with "InvalidCreds" error. Disabled the upload using mutlipart uploads. Disabled upload_object_via_stream from using multipart uploads which allows V4 Auth uploads to comple

Repository: libcloud
Updated Branches:
  refs/heads/trunk a47a51e14 -> dcb4cd998


V4 authenticaion and multipart_upload currently fails with "InvalidCreds" error. Disabled the upload using mutlipart uploads. Disabled upload_object_via_stream from using multipart uploads which allows V4 Auth uploads to complete.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f4f284c1
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f4f284c1
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f4f284c1

Branch: refs/heads/trunk
Commit: f4f284c1ca25711a81a3d366c759e6d048ede3aa
Parents: 8abdc22
Author: Luke Morfitt <lu...@Lukes-MacBook-Pro.local>
Authored: Mon Jul 11 13:46:22 2016 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jul 16 10:53:05 2016 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/f4f284c1/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index b5cf00c..169f704 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -961,6 +961,8 @@ class S3CNNorthStorageDriver(S3StorageDriver):
     connectionCls = S3CNNorthConnection
     ex_location_name = 'cn-north-1'
     region_name = 'cn-north-1'
+    # v4 auth and multipart_upload currently do not work.
+    supports_s3_multipart_upload = False
 
 
 class S3EUWestConnection(S3Connection):
@@ -1016,6 +1018,8 @@ class S3APNE2StorageDriver(S3StorageDriver):
     connectionCls = S3APNE2Connection
     ex_location_name = 'ap-northeast-2'
     region_name = 'ap-northeast-2'
+    # v4 auth and multipart_upload currently do not work.
+    supports_s3_multipart_upload = False
 
 
 class S3SAEastConnection(S3Connection):


[4/4] libcloud git commit: Changes for #839

Posted by an...@apache.org.
Changes for #839


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/dcb4cd99
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/dcb4cd99
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/dcb4cd99

Branch: refs/heads/trunk
Commit: dcb4cd998573c0fd8d48c7187e8a4fdcc4899fa8
Parents: f01da6c
Author: Anthony Shaw <an...@apache.org>
Authored: Sat Jul 16 10:54:43 2016 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jul 16 10:54:43 2016 +1000

----------------------------------------------------------------------
 CHANGES.rst | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/dcb4cd99/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 8c31e49..410b0ff 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -55,6 +55,13 @@ Container
   (GITHUB-831)
   [Jamie Cressey]
 
+Storage
+~~~~~~~
+
+- Fix authentication issue in S3/China region, disabled multipart uploads as not supported
+  by region.
+  (GITHUB-839)
+  [Luke Morfitt]
 
 Changes with Apache Libcloud 1.1.0
 ----------------------------------


[3/4] libcloud git commit: Fix up error "libcloud/storage/drivers/s3.py:954:80: E501 line too long (80 > 79 characters)" Closes #839

Posted by an...@apache.org.
Fix up error "libcloud/storage/drivers/s3.py:954:80: E501 line too long (80 > 79 characters)"
Closes #839


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f01da6c9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f01da6c9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f01da6c9

Branch: refs/heads/trunk
Commit: f01da6c91b6fefc56ec292b493bf83cb1053acf4
Parents: f4f284c
Author: Luke Morfitt <lu...@Lukes-MacBook-Pro.local>
Authored: Fri Jul 15 11:52:55 2016 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jul 16 10:53:10 2016 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/f01da6c9/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 169f704..5b237a5 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -950,10 +950,11 @@ class S3CNNorthConnection(SignedAWSConnection, BaseS3Connection):
     def __init__(self, user_id, key, secure=True, host=None, port=None,
                  url=None, timeout=None, proxy_url=None, token=None,
                  retry_delay=None, backoff=None):
-        super(S3CNNorthConnection, self).__init__(user_id, key, secure, host,
-                                                  port, url, timeout, proxy_url,
-                                                  token, retry_delay, backoff,
-                                                  4)  # force version 4
+        super(S3CNNorthConnection, self).__init__(
+            user_id, key, secure, host,
+            port, url, timeout, proxy_url,
+            token, retry_delay, backoff,
+            4)  # force version 4
 
 
 class S3CNNorthStorageDriver(S3StorageDriver):


[2/4] libcloud git commit: China requrest v4 authentication

Posted by an...@apache.org.
China requrest v4 authentication


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8abdc222
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8abdc222
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8abdc222

Branch: refs/heads/trunk
Commit: 8abdc2224e412493ac9d618102ea5316df9c6736
Parents: a47a51e
Author: Luke Morfitt <lu...@Lukes-MacBook-Pro.local>
Authored: Mon Jul 11 13:43:04 2016 +0100
Committer: Anthony Shaw <an...@apache.org>
Committed: Sat Jul 16 10:53:05 2016 +1000

----------------------------------------------------------------------
 libcloud/storage/drivers/s3.py | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8abdc222/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index fbc59cb..b5cf00c 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -244,7 +244,7 @@ class BaseS3StorageDriver(StorageDriver):
         :rtype: ``list`` of :class:`Object`
         """
         return list(self.iterate_container_objects(container,
-                    ex_prefix=ex_prefix))
+                                                   ex_prefix=ex_prefix))
 
     def iterate_container_objects(self, container, ex_prefix=None):
         """
@@ -846,7 +846,7 @@ class BaseS3StorageDriver(StorageDriver):
 
     def _to_containers(self, obj, xpath):
         for element in obj.findall(fixxpath(xpath=xpath,
-                                   namespace=self.namespace)):
+                                            namespace=self.namespace)):
             yield self._to_container(element)
 
     def _to_objs(self, obj, xpath, container):
@@ -942,14 +942,25 @@ class S3USWestOregonStorageDriver(S3StorageDriver):
     ex_location_name = 'us-west-2'
 
 
-class S3CNNorthConnection(S3Connection):
+class S3CNNorthConnection(SignedAWSConnection, BaseS3Connection):
     host = S3_CN_NORTH_HOST
+    service_name = 's3'
+    version = API_VERSION
+
+    def __init__(self, user_id, key, secure=True, host=None, port=None,
+                 url=None, timeout=None, proxy_url=None, token=None,
+                 retry_delay=None, backoff=None):
+        super(S3CNNorthConnection, self).__init__(user_id, key, secure, host,
+                                                  port, url, timeout, proxy_url,
+                                                  token, retry_delay, backoff,
+                                                  4)  # force version 4
 
 
 class S3CNNorthStorageDriver(S3StorageDriver):
     name = 'Amazon S3 (cn-north-1)'
     connectionCls = S3CNNorthConnection
-    ex_location_name = 'CN'
+    ex_location_name = 'cn-north-1'
+    region_name = 'cn-north-1'
 
 
 class S3EUWestConnection(S3Connection):