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 <[email protected]>
Authored: Mon Jan 6 18:29:56 2014 +0100
Committer: Tomaz Muraus <[email protected]>
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):

Reply via email to