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 2011/05/09 22:13:59 UTC
svn commit: r1101203 - /incubator/libcloud/trunk/libcloud/storage/base.py
Author: tomaz
Date: Mon May 9 20:13:58 2011
New Revision: 1101203
URL: http://svn.apache.org/viewvc?rev=1101203&view=rev
Log:
Add something method stubs which will be added in the future.
Modified:
incubator/libcloud/trunk/libcloud/storage/base.py
Modified: incubator/libcloud/trunk/libcloud/storage/base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/storage/base.py?rev=1101203&r1=1101202&r2=1101203&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/storage/base.py (original)
+++ incubator/libcloud/trunk/libcloud/storage/base.py Mon May 9 20:13:58 2011
@@ -69,6 +69,9 @@ class Object(object):
def get_cdn_url(self):
return self.driver.get_object_cdn_url(obj=self)
+ def enable_cdn(self):
+ return self.driver.enable_object_cdn(obj=self)
+
def download(self, destination_path, overwrite_existing=False,
delete_on_failure=True):
return self.driver.download_object(self, destination_path,
@@ -112,6 +115,9 @@ class Container(object):
def get_cdn_url(self):
return self.driver.get_container_cdn_url(container=self)
+ def enable_cdn(self):
+ return self.driver.enable_container_cdn(container=self)
+
def get_object(self, object_name):
return self.driver.get_object(container_name=self.name,
object_name=object_name)
@@ -249,6 +255,14 @@ class StorageDriver(object):
raise NotImplementedError(
'get_object_cdn_url not implemented for this driver')
+ def enable_container_cdn(self, container):
+ raise NotImplementedError(
+ 'enable_container_cdn not implemented for this driver')
+
+ def enable_object_cdn(self, obj):
+ raise NotImplementedError(
+ 'enable_object_cdn not implemented for this driver')
+
def download_object(self, obj, destination_path, delete_on_failure=True):
"""
Download an object to the specified destination path.