You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2014/01/06 18:54:06 UTC
[1/8] git commit: Update CHANGES.
Updated Branches:
refs/heads/trunk 26537d8db -> 14e3f0e62
Update CHANGES.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8e5a1f42
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8e5a1f42
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8e5a1f42
Branch: refs/heads/trunk
Commit: 8e5a1f42be26faf580276522e58cd5ca24a30bb7
Parents: 26537d8
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 17:16:37 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 17:16:37 2014 +0100
----------------------------------------------------------------------
CHANGES | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8e5a1f42/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index c5c04ed..05014c8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -197,6 +197,12 @@ Changes with Apache Libcloud in development
(LIBCLOUD-433)
[Michael Farrell]
+ - Fix a bug so you can now upload 0 bytes sized objects using multipart
+ upload in the S3 driver. (LIBCLOUD-490)
+
+ Reported by Noah Kantrowitz.
+ [Tomaz Muraus]
+
*) DNS
- Implement iterate_* methods in the Route53 driver and makes it work
[8/8] git commit: docs: Reword some stuff.
Posted by to...@apache.org.
docs: Reword some stuff.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/14e3f0e6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/14e3f0e6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/14e3f0e6
Branch: refs/heads/trunk
Commit: 14e3f0e62963bd1ef7d63347cc6f4181ab4bf788
Parents: 6d48b14
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 18:45:52 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 18:45:52 2014 +0100
----------------------------------------------------------------------
docs/storage/drivers/openstack_swift.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/14e3f0e6/docs/storage/drivers/openstack_swift.rst
----------------------------------------------------------------------
diff --git a/docs/storage/drivers/openstack_swift.rst b/docs/storage/drivers/openstack_swift.rst
index 2d64add..cac8185 100644
--- a/docs/storage/drivers/openstack_swift.rst
+++ b/docs/storage/drivers/openstack_swift.rst
@@ -17,7 +17,7 @@ the driver constructor:
For more information about other keyword arguments you can pass to the
constructor, please refer to the :ref:`Connecting to the OpenStack installation
-section <connecting-to-openstack-installation>` of our documentation.
+<connecting-to-openstack-installation>` section of our documentation.
Examples
--------
@@ -26,7 +26,8 @@ Examples
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This example shows how to connect to a Swift installation which uses a
-non-default value for the service name attribute in the service catalog.
+non-default value (``Object Storage Service``) for the service name attribute
+in the service catalog.
.. literalinclude:: /examples/storage/swift/connect_to_swift.py
:language: python
[6/8] git commit: Update contrib script to ignore some deprecated
provider constants.
Posted by to...@apache.org.
Update contrib script to ignore some deprecated provider constants.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/60274141
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/60274141
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/60274141
Branch: refs/heads/trunk
Commit: 6027414164dedac42784560d3601f45228889f06
Parents: b30c9b3
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 18:42:38 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 18:42:38 2014 +0100
----------------------------------------------------------------------
contrib/generate_provider_feature_matrix_table.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/60274141/contrib/generate_provider_feature_matrix_table.py
----------------------------------------------------------------------
diff --git a/contrib/generate_provider_feature_matrix_table.py b/contrib/generate_provider_feature_matrix_table.py
index 118ce64..14b20db 100755
--- a/contrib/generate_provider_feature_matrix_table.py
+++ b/contrib/generate_provider_feature_matrix_table.py
@@ -138,7 +138,10 @@ FRIENDLY_METHODS_NAMES = {
IGNORED_PROVIDERS = [
'dummy',
- 'local'
+ 'local',
+
+ # Deprecated constants
+ 'cloudfiles_swift'
]
[4/8] git commit: Deprecate "CLOUDFILES_SWIFT" provider constant in
favor of "OPENSTACK_SWIFT".
Posted by to...@apache.org.
Deprecate "CLOUDFILES_SWIFT" provider constant in favor of "OPENSTACK_SWIFT".
Also rename driver and connection classes: CloudFilesSwiftStorageDriver ->
OpenStackSwiftStorageDriver, CloudFilesSwiftConnection ->
OpenStackSwiftConnection.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/19a8c0cb
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/19a8c0cb
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/19a8c0cb
Branch: refs/heads/trunk
Commit: 19a8c0cb96a449bfdf578211d23aee8fb85d741f
Parents: 3b99d4a
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 18:29:56 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 18:29:56 2014 +0100
----------------------------------------------------------------------
libcloud/storage/drivers/cloudfiles.py | 16 ++++++++--------
libcloud/storage/providers.py | 8 +++++---
libcloud/storage/types.py | 3 ++-
3 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/19a8c0cb/libcloud/storage/drivers/cloudfiles.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/cloudfiles.py b/libcloud/storage/drivers/cloudfiles.py
index df1c434..d6e7742 100644
--- a/libcloud/storage/drivers/cloudfiles.py
+++ b/libcloud/storage/drivers/cloudfiles.py
@@ -161,13 +161,13 @@ class CloudFilesConnection(OpenStackBaseConnection):
raw=raw)
-class CloudFilesSwiftConnection(CloudFilesConnection):
+class OpenStackSwiftConnection(CloudFilesConnection):
"""
- Connection class for the Cloudfiles Swift endpoint.
+ Connection class for the OpenStack Swift endpoint.
"""
def __init__(self, *args, **kwargs):
- super(CloudFilesSwiftConnection, self).__init__(*args, **kwargs)
+ super(OpenStackSwiftConnection, self).__init__(*args, **kwargs)
self._service_type = self._ex_force_service_type or 'object-store'
self._service_name = self._ex_force_service_name or 'swift'
self._service_region = self._ex_force_service_region.upper()
@@ -836,16 +836,16 @@ class CloudFilesUSStorageDriver(CloudFilesStorageDriver):
super(CloudFilesUSStorageDriver, self).__init__(*args, **kwargs)
-class CloudFilesSwiftStorageDriver(CloudFilesStorageDriver):
+class OpenStackSwiftStorageDriver(CloudFilesStorageDriver):
"""
- Cloudfiles storage driver for the OpenStack Swift.
+ Storage driver for the OpenStack Swift.
"""
type = Provider.CLOUDFILES_SWIFT
- name = 'CloudFiles (SWIFT)'
- connectionCls = CloudFilesSwiftConnection
+ name = 'OpenStack Swift'
+ connectionCls = OpenStackSwiftConnection
def __init__(self, *args, **kwargs):
- super(CloudFilesSwiftStorageDriver, self).__init__(*args, **kwargs)
+ super(OpenStackSwiftStorageDriver, self).__init__(*args, **kwargs)
class CloudFilesUKStorageDriver(CloudFilesStorageDriver):
http://git-wip-us.apache.org/repos/asf/libcloud/blob/19a8c0cb/libcloud/storage/providers.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/providers.py b/libcloud/storage/providers.py
index f704254..1be212e 100644
--- a/libcloud/storage/providers.py
+++ b/libcloud/storage/providers.py
@@ -22,6 +22,8 @@ DRIVERS = {
('libcloud.storage.drivers.dummy', 'DummyStorageDriver'),
Provider.CLOUDFILES:
('libcloud.storage.drivers.cloudfiles', 'CloudFilesStorageDriver'),
+ Provider.OPENSTACK_SWIFT:
+ ('libcloud.storage.drivers.cloudfiles', 'OpenStackSwiftStorageDriver'),
Provider.S3:
('libcloud.storage.drivers.s3', 'S3StorageDriver'),
Provider.S3_US_WEST:
@@ -38,8 +40,6 @@ DRIVERS = {
('libcloud.storage.drivers.ninefold', 'NinefoldStorageDriver'),
Provider.GOOGLE_STORAGE:
('libcloud.storage.drivers.google_storage', 'GoogleStorageDriver'),
- Provider.CLOUDFILES_SWIFT:
- ('libcloud.storage.drivers.cloudfiles', 'CloudFilesSwiftStorageDriver'),
Provider.NIMBUS:
('libcloud.storage.drivers.nimbus', 'NimbusStorageDriver'),
Provider.LOCAL:
@@ -53,7 +53,9 @@ DRIVERS = {
Provider.CLOUDFILES_US:
('libcloud.storage.drivers.cloudfiles', 'CloudFilesUSStorageDriver'),
Provider.CLOUDFILES_UK:
- ('libcloud.storage.drivers.cloudfiles', 'CloudFilesUKStorageDriver')
+ ('libcloud.storage.drivers.cloudfiles', 'CloudFilesUKStorageDriver'),
+ Provider.CLOUDFILES_SWIFT:
+ ('libcloud.storage.drivers.cloudfiles', 'OpenStackSwiftStorageDriver')
}
http://git-wip-us.apache.org/repos/asf/libcloud/blob/19a8c0cb/libcloud/storage/types.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/types.py b/libcloud/storage/types.py
index ae48430..ddc8035 100644
--- a/libcloud/storage/types.py
+++ b/libcloud/storage/types.py
@@ -52,9 +52,9 @@ class Provider(object):
NINEFOLD = 'ninefold'
GOOGLE_STORAGE = 'google_storage'
S3_US_WEST_OREGON = 's3_us_west_oregon'
- CLOUDFILES_SWIFT = 'cloudfiles_swift'
NIMBUS = 'nimbus'
LOCAL = 'local'
+ OPENSTACK_SWIFT = 'openstack_swift'
CLOUDFILES = 'cloudfiles'
AZURE_BLOBS = 'azure_blobs'
KTUCLOUD = 'ktucloud'
@@ -62,6 +62,7 @@ class Provider(object):
# Deperecated
CLOUDFILES_US = 'cloudfiles_us'
CLOUDFILES_UK = 'cloudfiles_uk'
+ CLOUDFILES_SWIFT = 'cloudfiles_swift'
class ContainerError(LibcloudError):
[3/8] git commit: Fix generic OpenStack Swift driver and don't ignore
ex_force_service_type and ex_force_service_name argument provided by the
user.
Posted by to...@apache.org.
Fix generic OpenStack Swift driver and don't ignore ex_force_service_type
and ex_force_service_name argument provided by the user.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3b99d4ae
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3b99d4ae
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3b99d4ae
Branch: refs/heads/trunk
Commit: 3b99d4ae861223b1491b60cbf1bdd0e1d42f519e
Parents: 509040a
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 18:20:19 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 18:20:19 2014 +0100
----------------------------------------------------------------------
libcloud/storage/drivers/cloudfiles.py | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3b99d4ae/libcloud/storage/drivers/cloudfiles.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/cloudfiles.py b/libcloud/storage/drivers/cloudfiles.py
index 08e12d2..df1c434 100644
--- a/libcloud/storage/drivers/cloudfiles.py
+++ b/libcloud/storage/drivers/cloudfiles.py
@@ -167,18 +167,20 @@ class CloudFilesSwiftConnection(CloudFilesConnection):
"""
def __init__(self, *args, **kwargs):
- self.region_name = kwargs.pop('ex_region_name', None)
super(CloudFilesSwiftConnection, self).__init__(*args, **kwargs)
+ self._service_type = self._ex_force_service_type or 'object-store'
+ self._service_name = self._ex_force_service_name or 'swift'
+ self._service_region = self._ex_force_service_region.upper()
def get_endpoint(self, *args, **kwargs):
if '2.0' in self._auth_version:
endpoint = self.service_catalog.get_endpoint(
- service_type='object-store',
- name='swift',
- region=self.region_name)
+ service_type=self._service_type,
+ name=self._service_name,
+ region=self._service_region)
elif ('1.1' in self._auth_version) or ('1.0' in self._auth_version):
endpoint = self.service_catalog.get_endpoint(
- name='swift', region=self.region_name)
+ name=self._service_name, region=self._region_name)
if 'publicURL' in endpoint:
return endpoint['publicURL']
@@ -843,15 +845,8 @@ class CloudFilesSwiftStorageDriver(CloudFilesStorageDriver):
connectionCls = CloudFilesSwiftConnection
def __init__(self, *args, **kwargs):
- self._ex_region_name = kwargs.get('ex_region_name', 'RegionOne')
super(CloudFilesSwiftStorageDriver, self).__init__(*args, **kwargs)
- def openstack_connection_kwargs(self):
- rv = super(CloudFilesSwiftStorageDriver,
- self).openstack_connection_kwargs()
- rv['ex_region_name'] = self._ex_region_name
- return rv
-
class CloudFilesUKStorageDriver(CloudFilesStorageDriver):
"""
[5/8] git commit: docs: Add some documentation and examples for
OpenStack Swift driver.
Posted by to...@apache.org.
docs: Add some documentation and examples for OpenStack Swift driver.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b30c9b31
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b30c9b31
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b30c9b31
Branch: refs/heads/trunk
Commit: b30c9b31f47f2f356723b334a405879ecc40c217
Parents: 19a8c0c
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 18:39:51 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 18:39:51 2014 +0100
----------------------------------------------------------------------
docs/compute/drivers/openstack.rst | 2 +
.../swift/connect_to_rackspace_cloudfiles.py | 12 +++++
docs/examples/storage/swift/connect_to_swift.py | 12 +++++
docs/storage/drivers/openstack_swift.rst | 46 ++++++++++++++++++++
4 files changed, 72 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b30c9b31/docs/compute/drivers/openstack.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/openstack.rst b/docs/compute/drivers/openstack.rst
index 57c15f6..73bf703 100644
--- a/docs/compute/drivers/openstack.rst
+++ b/docs/compute/drivers/openstack.rst
@@ -1,6 +1,8 @@
OpenStack Compute Driver Documentation
======================================
+.. _connecting-to-openstack-installation:
+
Connecting to the OpenStack installation
----------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b30c9b31/docs/examples/storage/swift/connect_to_rackspace_cloudfiles.py
----------------------------------------------------------------------
diff --git a/docs/examples/storage/swift/connect_to_rackspace_cloudfiles.py b/docs/examples/storage/swift/connect_to_rackspace_cloudfiles.py
new file mode 100644
index 0000000..095b492
--- /dev/null
+++ b/docs/examples/storage/swift/connect_to_rackspace_cloudfiles.py
@@ -0,0 +1,12 @@
+from libcloud.storage.types import Provider
+from libcloud.storage.providers import get_driver
+
+cls = get_driver(Provider.OPENSTACK_SWIFT)
+
+driver = cls('username', 'api key',
+ region='ord',
+ ex_force_auth_url='https://auth.api.rackspacecloud.com:443',
+ ex_force_service_type='object-store',
+ ex_force_service_name='cloudFiles')
+
+print(driver.list_containers())
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b30c9b31/docs/examples/storage/swift/connect_to_swift.py
----------------------------------------------------------------------
diff --git a/docs/examples/storage/swift/connect_to_swift.py b/docs/examples/storage/swift/connect_to_swift.py
new file mode 100644
index 0000000..b641c08
--- /dev/null
+++ b/docs/examples/storage/swift/connect_to_swift.py
@@ -0,0 +1,12 @@
+from libcloud.storage.types import Provider
+from libcloud.storage.providers import get_driver
+
+cls = get_driver(Provider.OPENSTACK_SWIFT)
+
+driver = cls('username', 'api key',
+ region='ord',
+ ex_force_auth_url='http://192.168.1.101:5000',
+ ex_force_service_type='object-store',
+ ex_force_service_name='Object Storage Service')
+
+print(driver.list_containers())
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b30c9b31/docs/storage/drivers/openstack_swift.rst
----------------------------------------------------------------------
diff --git a/docs/storage/drivers/openstack_swift.rst b/docs/storage/drivers/openstack_swift.rst
new file mode 100644
index 0000000..2d64add
--- /dev/null
+++ b/docs/storage/drivers/openstack_swift.rst
@@ -0,0 +1,46 @@
+OpenStack Swift Storage Driver Documentation
+============================================
+
+Connecting to the OpenStack Swift installation
+----------------------------------------------
+
+When connecting to the OpenStack Swift installation, you need to, besides
+the username and api key argument also pass the following keyword arguments to
+the driver constructor:
+
+* ``ex_force_auth_url`` - Authentication service (Keystone) API URL. It can
+ either be a full URL with a path.
+* ``ex_force_service_type`` - Service type which will be used to find a
+ matching service in the service catalog. Defaults to ``object-store``
+* ``ex_force_service_name`` Service name which will be used to find a matching
+ service in the service catalog. Defaults to ``swift``
+
+For more information about other keyword arguments you can pass to the
+constructor, please refer to the :ref:`Connecting to the OpenStack installation
+section <connecting-to-openstack-installation>` of our documentation.
+
+Examples
+--------
+
+1. Connect to OpenStack Swift Installation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This example shows how to connect to a Swift installation which uses a
+non-default value for the service name attribute in the service catalog.
+
+.. literalinclude:: /examples/storage/swift/connect_to_swift.py
+ :language: python
+
+2. Connecting to Rackspace CloudFiles using a generic Swift driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This example shows how to connect to the Rackspace CloudFiles using a generic
+Swift driver.
+
+Keep in mind that this example is here only for demonstration purposes. When
+you are connecting to Rackspace CloudFiles installation for real, you should use
+``CLOUDFILES`` provider constant which only requires you to specify username,
+api key and region.
+
+.. literalinclude:: /examples/storage/swift/connect_to_rackspace_cloudfiles.py
+ :language: python
[7/8] git commit: Re-generate documentation fixtures.
Posted by to...@apache.org.
Re-generate documentation fixtures.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6d48b14f
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6d48b14f
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6d48b14f
Branch: refs/heads/trunk
Commit: 6d48b14f3f610231ae3fb9af82a936783c6e9e6d
Parents: 6027414
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 18:42:52 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 18:42:52 2014 +0100
----------------------------------------------------------------------
docs/storage/_supported_methods_cdn.rst | 4 +--
docs/storage/_supported_methods_main.rst | 4 +--
docs/storage/_supported_providers.rst | 40 +++++++++++++--------------
3 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/6d48b14f/docs/storage/_supported_methods_cdn.rst
----------------------------------------------------------------------
diff --git a/docs/storage/_supported_methods_cdn.rst b/docs/storage/_supported_methods_cdn.rst
index a75cad5..6abdc9a 100644
--- a/docs/storage/_supported_methods_cdn.rst
+++ b/docs/storage/_supported_methods_cdn.rst
@@ -3,13 +3,13 @@ Provider enable container cdn enable object cdn get contain
============================= ==================== ================= ===================== ==================
`Microsoft Azure (blobs)`_ no no no no
`CloudFiles`_ yes no yes yes
-`CloudFiles (SWIFT)`_ yes no yes yes
`CloudFiles (UK)`_ yes no yes yes
`CloudFiles (US)`_ yes no yes yes
`Google Storage`_ no no no no
`KTUCloud Storage`_ yes no yes yes
`Nimbus.io`_ no no no no
`Ninefold`_ no yes no yes
+`OpenStack Swift`_ yes no yes yes
`Amazon S3 (standard)`_ no no no no
`Amazon S3 (ap-northeast-1)`_ no no no no
`Amazon S3 (ap-southeast-1)`_ no no no no
@@ -20,13 +20,13 @@ Provider enable container cdn enable object cdn get contain
.. _`Microsoft Azure (blobs)`: http://windows.azure.com/
.. _`CloudFiles`: http://www.rackspace.com/
-.. _`CloudFiles (SWIFT)`: http://www.rackspace.com/
.. _`CloudFiles (UK)`: http://www.rackspace.com/
.. _`CloudFiles (US)`: http://www.rackspace.com/
.. _`Google Storage`: http://cloud.google.com/
.. _`KTUCloud Storage`: http://www.rackspace.com/
.. _`Nimbus.io`: https://nimbus.io/
.. _`Ninefold`: http://ninefold.com/
+.. _`OpenStack Swift`: http://www.rackspace.com/
.. _`Amazon S3 (standard)`: http://aws.amazon.com/s3/
.. _`Amazon S3 (ap-northeast-1)`: http://aws.amazon.com/s3/
.. _`Amazon S3 (ap-southeast-1)`: http://aws.amazon.com/s3/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/6d48b14f/docs/storage/_supported_methods_main.rst
----------------------------------------------------------------------
diff --git a/docs/storage/_supported_methods_main.rst b/docs/storage/_supported_methods_main.rst
index df3c625..8f3423b 100644
--- a/docs/storage/_supported_methods_main.rst
+++ b/docs/storage/_supported_methods_main.rst
@@ -3,13 +3,13 @@ Provider list containers list objects create container dele
============================= =============== ============ ================ ================ ============= ======================= =============== ========================= =============
`Microsoft Azure (blobs)`_ yes yes yes yes yes yes yes yes yes
`CloudFiles`_ yes yes yes yes yes yes yes yes yes
-`CloudFiles (SWIFT)`_ yes yes yes yes yes yes yes yes yes
`CloudFiles (UK)`_ yes yes yes yes yes yes yes yes yes
`CloudFiles (US)`_ yes yes yes yes yes yes yes yes yes
`Google Storage`_ yes yes yes yes yes yes yes yes yes
`KTUCloud Storage`_ yes yes yes yes yes yes yes yes yes
`Nimbus.io`_ yes no yes no no no no no no
`Ninefold`_ yes yes yes yes yes yes yes yes yes
+`OpenStack Swift`_ yes yes yes yes yes yes yes yes yes
`Amazon S3 (standard)`_ yes yes yes yes yes yes yes yes yes
`Amazon S3 (ap-northeast-1)`_ yes yes yes yes yes yes yes yes yes
`Amazon S3 (ap-southeast-1)`_ yes yes yes yes yes yes yes yes yes
@@ -20,13 +20,13 @@ Provider list containers list objects create container dele
.. _`Microsoft Azure (blobs)`: http://windows.azure.com/
.. _`CloudFiles`: http://www.rackspace.com/
-.. _`CloudFiles (SWIFT)`: http://www.rackspace.com/
.. _`CloudFiles (UK)`: http://www.rackspace.com/
.. _`CloudFiles (US)`: http://www.rackspace.com/
.. _`Google Storage`: http://cloud.google.com/
.. _`KTUCloud Storage`: http://www.rackspace.com/
.. _`Nimbus.io`: https://nimbus.io/
.. _`Ninefold`: http://ninefold.com/
+.. _`OpenStack Swift`: http://www.rackspace.com/
.. _`Amazon S3 (standard)`: http://aws.amazon.com/s3/
.. _`Amazon S3 (ap-northeast-1)`: http://aws.amazon.com/s3/
.. _`Amazon S3 (ap-southeast-1)`: http://aws.amazon.com/s3/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/6d48b14f/docs/storage/_supported_providers.rst
----------------------------------------------------------------------
diff --git a/docs/storage/_supported_providers.rst b/docs/storage/_supported_providers.rst
index 4179e8f..29f78ba 100644
--- a/docs/storage/_supported_providers.rst
+++ b/docs/storage/_supported_providers.rst
@@ -1,32 +1,32 @@
-============================= ============================================== ================= ============================================== =====================================
-Provider Documentation Provider constant Module Class Name
-============================= ============================================== ================= ============================================== =====================================
-`Microsoft Azure (blobs)`_ AZURE_BLOBS :mod:`libcloud.storage.drivers.azure_blobs` :class:`AzureBlobsStorageDriver`
-`CloudFiles`_ CLOUDFILES :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesStorageDriver`
-`CloudFiles (SWIFT)`_ CLOUDFILES_SWIFT :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesSwiftStorageDriver`
-`CloudFiles (UK)`_ CLOUDFILES_UK :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesUKStorageDriver`
-`CloudFiles (US)`_ CLOUDFILES_US :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesUSStorageDriver`
-`Google Storage`_ :doc:`Click </storage/drivers/google_storage>` GOOGLE_STORAGE :mod:`libcloud.storage.drivers.google_storage` :class:`GoogleStorageDriver`
-`KTUCloud Storage`_ KTUCLOUD :mod:`libcloud.storage.drivers.ktucloud` :class:`KTUCloudStorageDriver`
-`Nimbus.io`_ NIMBUS :mod:`libcloud.storage.drivers.nimbus` :class:`NimbusStorageDriver`
-`Ninefold`_ NINEFOLD :mod:`libcloud.storage.drivers.ninefold` :class:`NinefoldStorageDriver`
-`Amazon S3 (standard)`_ S3 :mod:`libcloud.storage.drivers.s3` :class:`S3StorageDriver`
-`Amazon S3 (ap-northeast-1)`_ S3_AP_NORTHEAST :mod:`libcloud.storage.drivers.s3` :class:`S3APNEStorageDriver`
-`Amazon S3 (ap-southeast-1)`_ S3_AP_SOUTHEAST :mod:`libcloud.storage.drivers.s3` :class:`S3APSEStorageDriver`
-`Amazon S3 (eu-west-1)`_ S3_EU_WEST :mod:`libcloud.storage.drivers.s3` :class:`S3EUWestStorageDriver`
-`Amazon S3 (us-west-1)`_ S3_US_WEST :mod:`libcloud.storage.drivers.s3` :class:`S3USWestStorageDriver`
-`Amazon S3 (us-west-2)`_ S3_US_WEST_OREGON :mod:`libcloud.storage.drivers.s3` :class:`S3USWestOregonStorageDriver`
-============================= ============================================== ================= ============================================== =====================================
+============================= =============================================== ================= ============================================== ====================================
+Provider Documentation Provider constant Module Class Name
+============================= =============================================== ================= ============================================== ====================================
+`Microsoft Azure (blobs)`_ AZURE_BLOBS :mod:`libcloud.storage.drivers.azure_blobs` :class:`AzureBlobsStorageDriver`
+`CloudFiles`_ CLOUDFILES :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesStorageDriver`
+`CloudFiles (UK)`_ CLOUDFILES_UK :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesUKStorageDriver`
+`CloudFiles (US)`_ CLOUDFILES_US :mod:`libcloud.storage.drivers.cloudfiles` :class:`CloudFilesUSStorageDriver`
+`Google Storage`_ :doc:`Click </storage/drivers/google_storage>` GOOGLE_STORAGE :mod:`libcloud.storage.drivers.google_storage` :class:`GoogleStorageDriver`
+`KTUCloud Storage`_ KTUCLOUD :mod:`libcloud.storage.drivers.ktucloud` :class:`KTUCloudStorageDriver`
+`Nimbus.io`_ NIMBUS :mod:`libcloud.storage.drivers.nimbus` :class:`NimbusStorageDriver`
+`Ninefold`_ NINEFOLD :mod:`libcloud.storage.drivers.ninefold` :class:`NinefoldStorageDriver`
+`OpenStack Swift`_ :doc:`Click </storage/drivers/openstack_swift>` OPENSTACK_SWIFT :mod:`libcloud.storage.drivers.cloudfiles` :class:`OpenStackSwiftStorageDriver`
+`Amazon S3 (standard)`_ S3 :mod:`libcloud.storage.drivers.s3` :class:`S3StorageDriver`
+`Amazon S3 (ap-northeast-1)`_ S3_AP_NORTHEAST :mod:`libcloud.storage.drivers.s3` :class:`S3APNEStorageDriver`
+`Amazon S3 (ap-southeast-1)`_ S3_AP_SOUTHEAST :mod:`libcloud.storage.drivers.s3` :class:`S3APSEStorageDriver`
+`Amazon S3 (eu-west-1)`_ S3_EU_WEST :mod:`libcloud.storage.drivers.s3` :class:`S3EUWestStorageDriver`
+`Amazon S3 (us-west-1)`_ S3_US_WEST :mod:`libcloud.storage.drivers.s3` :class:`S3USWestStorageDriver`
+`Amazon S3 (us-west-2)`_ S3_US_WEST_OREGON :mod:`libcloud.storage.drivers.s3` :class:`S3USWestOregonStorageDriver`
+============================= =============================================== ================= ============================================== ====================================
.. _`Microsoft Azure (blobs)`: http://windows.azure.com/
.. _`CloudFiles`: http://www.rackspace.com/
-.. _`CloudFiles (SWIFT)`: http://www.rackspace.com/
.. _`CloudFiles (UK)`: http://www.rackspace.com/
.. _`CloudFiles (US)`: http://www.rackspace.com/
.. _`Google Storage`: http://cloud.google.com/
.. _`KTUCloud Storage`: http://www.rackspace.com/
.. _`Nimbus.io`: https://nimbus.io/
.. _`Ninefold`: http://ninefold.com/
+.. _`OpenStack Swift`: http://www.rackspace.com/
.. _`Amazon S3 (standard)`: http://aws.amazon.com/s3/
.. _`Amazon S3 (ap-northeast-1)`: http://aws.amazon.com/s3/
.. _`Amazon S3 (ap-southeast-1)`: http://aws.amazon.com/s3/
[2/8] git commit: Include server side error message in the multipart
error exception.
Posted by to...@apache.org.
Include server side error message in the multipart error exception.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/509040a6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/509040a6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/509040a6
Branch: refs/heads/trunk
Commit: 509040a68b5575e6785e6c085e76055cdc1da0fa
Parents: 8e5a1f4
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Jan 6 17:34:42 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Jan 6 17:37:34 2014 +0100
----------------------------------------------------------------------
libcloud/common/aws.py | 22 ++++++++++++++++------
libcloud/storage/drivers/s3.py | 7 +++++--
2 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/509040a6/libcloud/common/aws.py
----------------------------------------------------------------------
diff --git a/libcloud/common/aws.py b/libcloud/common/aws.py
index 22d9732..868b5eb 100644
--- a/libcloud/common/aws.py
+++ b/libcloud/common/aws.py
@@ -26,7 +26,21 @@ from libcloud.utils.xml import findtext, findall
class AWSBaseResponse(XmlResponse):
- pass
+ namespace = None
+
+ def _parse_error_details(self, element):
+ """
+ Parse code and message from the provided error element.
+
+ :return: ``tuple`` with two elements: (code, message)
+ :rtype: ``tuple``
+ """
+ code = findtext(element=element, xpath='Code',
+ namespace=self.namespace)
+ message = findtext(element=element, xpath='Message',
+ namespace=self.namespace)
+
+ return code, message
class AWSGenericResponse(AWSBaseResponse):
@@ -71,11 +85,7 @@ class AWSGenericResponse(AWSBaseResponse):
msgs = []
for err in errs:
- code = findtext(element=err, xpath='Code',
- namespace=self.namespace)
- message = findtext(element=err, xpath='Message',
- namespace=self.namespace)
-
+ code, message = self._parse_error_details(element=err)
exceptionCls = self.exceptions.get(code, None)
if exceptionCls is None:
http://git-wip-us.apache.org/repos/asf/libcloud/blob/509040a6/libcloud/storage/drivers/s3.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/s3.py b/libcloud/storage/drivers/s3.py
index 947b1d7..b89d4be 100644
--- a/libcloud/storage/drivers/s3.py
+++ b/libcloud/storage/drivers/s3.py
@@ -64,7 +64,7 @@ RESPONSES_PER_REQUEST = 100
class S3Response(AWSBaseResponse):
-
+ namespace = None
valid_response_codes = [httplib.NOT_FOUND, httplib.CONFLICT,
httplib.BAD_REQUEST]
@@ -588,7 +588,10 @@ class S3StorageDriver(StorageDriver):
method='POST')
if response.status != httplib.OK:
- raise LibcloudError('Error in multipart commit', driver=self)
+ element = response.object
+ code, message = response._parse_error_details(element=element)
+ msg = 'Error in multipart commit: %s (%s)' % (message, code)
+ raise LibcloudError(msg, driver=self)
# Get the server's etag to be passed back to the caller
body = response.parse_body()