libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1444088 - in /libcloud/branches/0.12.x: ./ libcloud/common/ libcloud/storage/ libcloud/storage/drivers/ libcloud/test/ libcloud/test/storage/ libcloud/test/storage/fixtures/azure_blobs/
Date Fri, 08 Feb 2013 15:58:48 GMT
Author: tomaz
Date: Fri Feb  8 15:58:47 2013
New Revision: 1444088

URL: http://svn.apache.org/r1444088
Log:
Backport changes from trunk.

Added:
    libcloud/branches/0.12.x/libcloud/common/azure.py
      - copied unchanged from r1444080, libcloud/trunk/libcloud/common/azure.py
    libcloud/branches/0.12.x/libcloud/storage/drivers/azure_blobs.py
      - copied unchanged from r1444080, libcloud/trunk/libcloud/storage/drivers/azure_blobs.py
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/
      - copied from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/list_containers_1.xml
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/list_containers_1.xml
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/list_containers_2.xml
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/list_containers_2.xml
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/list_containers_empty.xml
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/list_containers_empty.xml
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/list_objects_1.xml
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/list_objects_1.xml
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/list_objects_2.xml
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/list_objects_2.xml
    libcloud/branches/0.12.x/libcloud/test/storage/fixtures/azure_blobs/list_objects_empty.xml
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/fixtures/azure_blobs/list_objects_empty.xml
    libcloud/branches/0.12.x/libcloud/test/storage/test_azure_blobs.py
      - copied unchanged from r1444080, libcloud/trunk/libcloud/test/storage/test_azure_blobs.py
Modified:
    libcloud/branches/0.12.x/   (props changed)
    libcloud/branches/0.12.x/CHANGES
    libcloud/branches/0.12.x/libcloud/storage/base.py
    libcloud/branches/0.12.x/libcloud/storage/providers.py
    libcloud/branches/0.12.x/libcloud/storage/types.py
    libcloud/branches/0.12.x/libcloud/test/secrets.py-dist

Propchange: libcloud/branches/0.12.x/
------------------------------------------------------------------------------
  Merged /libcloud/trunk:r1443563-1444080

Modified: libcloud/branches/0.12.x/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/CHANGES?rev=1444088&r1=1444087&r2=1444088&view=diff
==============================================================================
--- libcloud/branches/0.12.x/CHANGES (original)
+++ libcloud/branches/0.12.x/CHANGES Fri Feb  8 15:58:47 2013
@@ -182,6 +182,10 @@ Changes with Apache Libcloud 0.12.0:
       (LIBCLOUD-269)
       [Mahendra M]
 
+    - Add new driver for Windows Azure Storage with support for block and page
+      blobs. (LIBCLOUD-80)
+      [Mahendra M]
+
   *) DNS
 
     - Update 'if type' checks in the update_record methods to behave correctly

Modified: libcloud/branches/0.12.x/libcloud/storage/base.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/storage/base.py?rev=1444088&r1=1444087&r2=1444088&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/storage/base.py (original)
+++ libcloud/branches/0.12.x/libcloud/storage/base.py Fri Feb  8 15:58:47 2013
@@ -134,13 +134,14 @@ class Container(object):
         return self.driver.get_object(container_name=self.name,
                                       object_name=object_name)
 
-    def upload_object(self, file_path, object_name, extra=None):
+    def upload_object(self, file_path, object_name, extra=None, **kwargs):
         return self.driver.upload_object(
-            file_path, self, object_name, extra)
+            file_path, self, object_name, extra=extra, **kwargs)
 
-    def upload_object_via_stream(self, iterator, object_name, extra=None):
+    def upload_object_via_stream(self, iterator, object_name, extra=None,
+                                 **kwargs):
         return self.driver.upload_object_via_stream(
-            iterator, self, object_name, extra)
+            iterator, self, object_name, extra=extra, **kwargs)
 
     def download_object(self, obj, destination_path, overwrite_existing=False,
                         delete_on_failure=True):
@@ -615,7 +616,7 @@ class StorageDriver(BaseDriver):
             file_size = os.path.getsize(file_path)
             upload_func_kwargs['chunked'] = False
 
-        if file_size is not None:
+        if file_size is not None and 'Content-Length' not in headers:
             headers['Content-Length'] = file_size
 
         headers['Content-Type'] = content_type
@@ -676,7 +677,7 @@ class StorageDriver(BaseDriver):
         return True, data_hash, bytes_transferred
 
     def _stream_data(self, response, iterator, chunked=False,
-                     calculate_hash=True, chunk_size=None):
+                     calculate_hash=True, chunk_size=None, data=None):
         """
         Stream a data over an http connection.
 

Modified: libcloud/branches/0.12.x/libcloud/storage/providers.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/storage/providers.py?rev=1444088&r1=1444087&r2=1444088&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/storage/providers.py (original)
+++ libcloud/branches/0.12.x/libcloud/storage/providers.py Fri Feb  8 15:58:47 2013
@@ -40,6 +40,8 @@ DRIVERS = {
         ('libcloud.storage.drivers.nimbus', 'NimbusStorageDriver'),
     Provider.LOCAL:
         ('libcloud.storage.drivers.local', 'LocalStorageDriver'),
+    Provider.AZURE_BLOBS:
+        ('libcloud.storage.drivers.azure_blobs', 'AzureBlobsStorageDriver'),
 
     Provider.CLOUDFILES_US:
         ('libcloud.storage.drivers.cloudfiles', 'CloudFilesUSStorageDriver'),

Modified: libcloud/branches/0.12.x/libcloud/storage/types.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/storage/types.py?rev=1444088&r1=1444087&r2=1444088&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/storage/types.py (original)
+++ libcloud/branches/0.12.x/libcloud/storage/types.py Fri Feb  8 15:58:47 2013
@@ -55,6 +55,7 @@ class Provider(object):
     S3_US_WEST_OREGON = 's3_us_west_oregon'
     NIMBUS = 'nimbus'
     LOCAL = 'local'
+    AZURE_BLOBS = 'azure_blobs'
 
     CLOUDFILES_US = 'cloudfiles_us'
     CLOUDFILES_UK = 'cloudfiles_uk'

Modified: libcloud/branches/0.12.x/libcloud/test/secrets.py-dist
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/test/secrets.py-dist?rev=1444088&r1=1444087&r2=1444088&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/test/secrets.py-dist (original)
+++ libcloud/branches/0.12.x/libcloud/test/secrets.py-dist Fri Feb  8 15:58:47 2013
@@ -44,6 +44,9 @@ HOSTVIRTUAL_PARAMS = ('key',)
 STORAGE_S3_PARAMS = ('key', 'secret')
 STORAGE_GOOGLE_STORAGE_PARAMS = ('key', 'secret')
 
+# Azure key is b64 encoded and must be decoded before signing requests
+STORAGE_AZURE_BLOBS_PARAMS = ('account', 'cGFzc3dvcmQ=')
+
 # Loadbalancer
 LB_BRIGHTBOX_PARAMS = ('user', 'key')
 LB_ELB_PARAMS = ('access_id', 'secret', 'region')



Mime
View raw message