Part of libcloud.storage.base View Source View In Hierarchy
Known subclasses: libcloud.storage.drivers.cloudfiles.CloudFilesStorageDriver, libcloud.storage.drivers.dummy.DummyStorageDriver, libcloud.storage.drivers.s3.S3StorageDriver
Method | __init__ | Undocumented |
Method | list_containters | Return a list of containers. |
Method | list_container_objects | Return a list of objects for the given container. |
Method | get_container | Return a container instance. |
Method | get_container_cdn_url | Return a container CDN URL. |
Method | get_object | Return an object instance. |
Method | get_object_cdn_url | Return a container CDN URL. |
Method | enable_container_cdn | Undocumented |
Method | enable_object_cdn | Undocumented |
Method | download_object | Download an object to the specified destination path. |
Method | download_object_as_stream | Return a generator which yields object data. |
Method | upload_object | Upload an object. |
Method | upload_object_via_stream | |
Method | delete_object | Delete an object. |
Method | create_container | Create a new container. |
Method | delete_container | Delete a container. |
Method | _get_object | Call passed callback and start transfer of the object' |
Method | _save_object | Save object to the provided path. |
Method | _upload_object | Helper function for setting common request headers and calling the passed in callback which uploads an object. |
Method | _stream_data | Stream a data over an http connection. |
Method | _upload_file | Upload a file to the server. |
Returns | A list of Container instances. |
Parameters | container | Container instance (type: Container ) |
Returns | A list of Object instances. |
Parameters | container_name | Container name. (type: str ) |
Returns | Container instance. |
Parameters | container | Container instance (type: Container ) |
Returns | A CDN URL for this container. |
Parameters | container_name | Container name. (type: str ) |
object_name | Object name. (type: str ) | |
Returns | Object instance. |
Parameters | obj | Object instance (type: Object ) |
Returns | A CDN URL for this object. |
Parameters | obj | Object instance. (type: Object ) |
destination_path | Full path to a file or a directory where the incoming file will be saved. (type: str ) | |
overwrite_existing | True to overwrite an existing file, defaults to False. (type: bool ) | |
delete_on_failure | True to delete a partially downloaded file if the download was not
successful (hash mismatch / file size). (type: bool ) | |
Returns | True if an object has been successfully downloaded, False otherwise. (type: bool ) |
Parameters | obj | Object instance (type: Object ) |
chunk_size | Optional chunk size (in bytes). (type: int ) |
Parameters | file_path | Path to the object on disk. (type: str ) |
container | Destination container. (type: Container ) | |
object_name | Object name. (type: str ) | |
extra | (optional) Extra attributes (driver specific). (type: dict ) | |
verify_hash | True to do a file integrity check. (type: boolean ) |
Parameters | iterator | An object which implements the iterator interface. (type: object ) |
container | Destination container. (type: Container ) | |
object_name | Object name. (type: str ) | |
extra | (optional) Extra attributes (driver specific). (type: dict ) |
Parameters | obj | Object instance. (type: Object ) |
Returns | bool True on success. |
Parameters | container_name | Container name. (type: str ) |
Returns | Container instance on success. |
Parameters | container | Container instance (type: Container ) |
Returns | True on success, False otherwise. (type: bool ) |
Parameters | obj | Object instance. (type: Object ) |
callback | Function which is called with the passed callback_kwargs (type: Function ) | |
callback_kwargs | Keyword arguments which are passed to the callback. (type: dict ) | |
response | Response instance. | |
success_status_code | Status code which represents a successful transfer (defaults to httplib.OK) (type: int ) | |
Returns | True on success, False otherwise. (type: bool ) | |
Unknown Field: typed | response | Response |
Parameters | response | RawResponse instance. (type: RawResponse ) |
obj | Object instance. (type: Object ) | |
destination_path | Destination directory. (type: Str ) | |
delete_on_failure | True to delete partially downloaded object if the download fails. (type: bool ) | |
overwrite_existing | True to overwrite a local path if it already exists. (type: bool ) | |
chunk_size | Optional chunk size (defaults to
libcloud.storage.base.CHUNK_SIZE , 8kb) (type: int ) | |
Returns | True on success, False otherwise. (type: bool ) |
Parameters | response | RawResponse object. (type: RawResponse ) |
response | An object which implements an iterator interface or a File like object with
read method. (type: RawResponse ) | |
chunk_size | Optional chunk size (defaults to CHUNK_SIZE) (type: int ) | |
Returns | First item is a boolean indicator of success, second one is the uploaded
data MD5 hash and the third one is the number of transferred bytes. (type: tuple ) |
Parameters | response | RawResponse object. (type: RawResponse ) |
file_path | Path to a local file. (type: str ) | |
response | An object which implements an iterator interface (File object, etc.) (type: RawResponse ) | |
Returns | First item is a boolean indicator of success, second one is the uploaded
data MD5 hash and the third one is the number of transferred bytes. (type: tuple ) |