Repository: libcloud
Updated Branches:
  refs/heads/trunk 64b29201f -> 6edeeaff6


LIBCLOUD-719: AuroraObjects storage driver

AuroraObjects is a object store compatible with Amazon S3.

The driver extends the Amazon S3 driver and overwrites the host pointing
it towards the AuroraObjects servers in the European Union.

Signed-off-by: Sebastien Goasguen <[email protected]>

This closes #540


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

Branch: refs/heads/trunk
Commit: 6edeeaff6514ee9d1e8e65ad0dba65a70da0a067
Parents: 64b2920
Author: Wido den Hollander <[email protected]>
Authored: Mon Jun 29 21:33:39 2015 +0200
Committer: Sebastien Goasguen <[email protected]>
Committed: Fri Jul 3 09:38:19 2015 +0200

----------------------------------------------------------------------
 CHANGES.rst                               |  4 ++
 docs/storage/drivers/auroraobjects.rst    | 57 ++++++++++++++++++++++++++
 libcloud/storage/drivers/auroraobjects.py | 52 +++++++++++++++++++++++
 libcloud/storage/providers.py             |  2 +
 libcloud/storage/types.py                 |  2 +
 5 files changed, 117 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6edeeaff/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index bec87fa..243be3b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -232,6 +232,10 @@ Storage
   (GITHUB-492, LIBCLOUD-635)
   [Tom Fifield]
 
+- Add AuroraObjects Storage Driver.
+  (GITHUB-540, LIBCLOUD-719)
+  [Wido den Hollander]
+
 Loadbalancer
 ~~~~~~~~~~~~
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6edeeaff/docs/storage/drivers/auroraobjects.rst
----------------------------------------------------------------------
diff --git a/docs/storage/drivers/auroraobjects.rst 
b/docs/storage/drivers/auroraobjects.rst
new file mode 100644
index 0000000..e81efa5
--- /dev/null
+++ b/docs/storage/drivers/auroraobjects.rst
@@ -0,0 +1,57 @@
+AuroraObjects Storage Driver Documentation
+======================================
+
+`PCextreme B.V.`_ is a Dutch cloud provider. It provides a public cloud 
offering
+under the name AuroraCompute. All cloud services are under the family name 
Aurora.
+
+All data is stored on servers in the European Union.
+
+.. figure:: /_static/images/provider_logos/pcextreme.png
+    :align: center
+    :width: 300
+    :target: https://www.pcextreme.nl/en/aurora/objects
+
+Protocol
+------------------
+
+AuroraObjects talks the Amazon S3 protocol and thus supports almost all 
functions
+which the Amazon S3 storage driver supports.
+
+It however does not support CDN support. Calling any of the CDN functions will 
raise
+a LibcloudError.
+
+As a backend AuroraObjects uses `Ceph`_ for storage.
+
+Multipart uploads
+------------------
+
+AuroraObjects storage driver supports multipart uploads which means you can
+upload objects with a total size of up to 5 TB.
+
+Multipart upload works similar to Amazon S3. After uploading all the parts the
+AuroraObjects servers combine the parts into one large object.
+
+If you use
+:meth:`libcloud.storage.base.StorageDriver.upload_object_via_stream` method,
+Libcloud transparently handles all the splitting and uploading of the parts
+for you.
+
+By default, to prevent excessive buffering and use of memory, each part is
+5 MB in size. This is also the smallest size of a part you can use with the
+multi part upload.
+
+Examples
+--------
+
+Please refer to the Amazon S3 storage driver documentation for examples.
+
+
+API Docs
+--------
+
+.. autoclass:: 
libcloud.compute.drivers.auroraobjects.AuroraObjectsStorageDriver
+    :members:
+    :inherited-members:
+
+.. _`PCextreme B.V.`: https://www.pcextreme.nl/
+.. _`Ceph`: https://ceph.com/

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6edeeaff/libcloud/storage/drivers/auroraobjects.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/auroraobjects.py 
b/libcloud/storage/drivers/auroraobjects.py
new file mode 100644
index 0000000..0369c5c
--- /dev/null
+++ b/libcloud/storage/drivers/auroraobjects.py
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from libcloud.common.types import LibcloudError
+from libcloud.storage.providers import Provider
+from libcloud.storage.drivers.s3 import BaseS3StorageDriver, BaseS3Connection
+
+__all__ = [
+    'AuroraObjectsStorageDriver'
+]
+
+AURORA_OBJECTS_EU_HOST = 'o.auroraobjects.eu'
+
+NO_CDN_SUPPORT_ERROR = 'CDN is not supported by AuroraObjects'
+
+
+class BaseAuroraObjectsConnection(BaseS3Connection):
+    host = AURORA_OBJECTS_EU_HOST
+
+
+class BaseAuroraObjectsStorageDriver(BaseS3StorageDriver):
+    type = Provider.AURORAOBJECTS
+    name = 'PCextreme AuroraObjects'
+    website = 'https://www.pcextreme.nl/en/aurora/objects'
+
+
+class AuroraObjectsStorageDriver(BaseAuroraObjectsStorageDriver):
+    connectionCls = BaseAuroraObjectsConnection
+
+    def enable_container_cdn(self, *argv):
+        raise LibcloudError(NO_CDN_SUPPORT_ERROR, driver=self)
+
+    def enable_object_cdn(self, *argv):
+        raise LibcloudError(NO_CDN_SUPPORT_ERROR, driver=self)
+
+    def get_container_cdn_url(self, *argv):
+        raise LibcloudError(NO_CDN_SUPPORT_ERROR, driver=self)
+
+    def get_object_cdn_url(self, *argv):
+        raise LibcloudError(NO_CDN_SUPPORT_ERROR, driver=self)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6edeeaff/libcloud/storage/providers.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/providers.py b/libcloud/storage/providers.py
index 1be212e..1ae4e44 100644
--- a/libcloud/storage/providers.py
+++ b/libcloud/storage/providers.py
@@ -48,6 +48,8 @@ DRIVERS = {
     ('libcloud.storage.drivers.azure_blobs', 'AzureBlobsStorageDriver'),
     Provider.KTUCLOUD:
     ('libcloud.storage.drivers.ktucloud', 'KTUCloudStorageDriver'),
+    Provider.AURORAOBJECTS:
+    ('libcloud.storage.drivers.auroraobjects', 'AuroraObjectsStorageDriver'),
 
     # Deprecated
     Provider.CLOUDFILES_US:

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6edeeaff/libcloud/storage/types.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/types.py b/libcloud/storage/types.py
index ddc8035..4ba714b 100644
--- a/libcloud/storage/types.py
+++ b/libcloud/storage/types.py
@@ -42,6 +42,7 @@ class Provider(object):
     :cvar S3_US_WEST_OREGON: Amazon S3 US West 2 (Oregon)
     :cvar NIMBUS: Nimbus.io driver
     :cvar LOCAL: Local storage driver
+    :cvar AURORAOBJECTS: AuroraObjects storage driver
     """
     DUMMY = 'dummy'
     S3 = 's3'
@@ -58,6 +59,7 @@ class Provider(object):
     CLOUDFILES = 'cloudfiles'
     AZURE_BLOBS = 'azure_blobs'
     KTUCLOUD = 'ktucloud'
+    AURORAOBJECTS = 'auroraobjects'
 
     # Deperecated
     CLOUDFILES_US = 'cloudfiles_us'

Reply via email to