Connection module for Apache Libcloud Storage (object/blob) management for a full list of supported clouds, see http://libcloud.readthedocs.io/en/latest/storage/supported_providers.html
Clouds include Amazon S3, Google Storage, Aliyun, Azure Blobs, Ceph, OpenStack swift
New in version 2018.3.0.
configuration: | This module uses a configuration profile for one or multiple Storage providers libcloud_storage:
profile_test1:
driver: google_storage
key: GOOG0123456789ABCXYZ
secret: mysecret
profile_test2:
driver: s3
key: 12345
secret: mysecret
|
---|---|
depends: | apache-libcloud |
salt.modules.libcloud_storage.
create_container
(container_name, profile, **libcloud_kwargs)¶Create a container in the cloud
Parameters: |
|
---|
CLI Example:
salt myminion libcloud_storage.create_container MyFolder profile1
salt.modules.libcloud_storage.
delete_container
(container_name, profile, **libcloud_kwargs)¶Delete an object container in the cloud
Parameters: |
|
---|---|
Returns: | True if an object container has been successfully deleted, False otherwise. |
Return type: |
|
CLI Example:
salt myminion libcloud_storage.delete_container MyFolder profile1
salt.modules.libcloud_storage.
delete_object
(container_name, object_name, profile, **libcloud_kwargs)¶Delete an object in the cloud
Parameters: |
|
---|---|
Returns: | True if an object has been successfully deleted, False otherwise. |
Return type: |
|
CLI Example:
salt myminion libcloud_storage.delete_object MyFolder me.jpg profile1
salt.modules.libcloud_storage.
download_object
(container_name, object_name, destination_path, profile, overwrite_existing=False, delete_on_failure=True, **libcloud_kwargs)¶Download an object to the specified destination path.
Parameters: |
|
---|---|
Returns: | True if an object has been successfully downloaded, False otherwise. |
Return type: |
|
CLI Example:
salt myminion libcloud_storage.download_object MyFolder me.jpg /tmp/me.jpg profile1
salt.modules.libcloud_storage.
extra
(method, profile, **libcloud_kwargs)¶Call an extended method on the driver
Parameters: |
|
---|
CLI Example:
salt myminion libcloud_storage.extra ex_get_permissions google container_name=my_container object_name=me.jpg --out=yaml
salt.modules.libcloud_storage.
get_container
(container_name, profile, **libcloud_kwargs)¶List container details for the given container_name on the given profile
Parameters: |
|
---|
CLI Example:
salt myminion libcloud_storage.get_container MyFolder profile1
salt.modules.libcloud_storage.
get_container_object
(container_name, object_name, profile, **libcloud_kwargs)¶Get the details for a container object (file or object in the cloud)
Parameters: |
|
---|
CLI Example:
salt myminion libcloud_storage.get_container_object MyFolder MyFile.xyz profile1
salt.modules.libcloud_storage.
list_container_objects
(container_name, profile, **libcloud_kwargs)¶List container objects (e.g. files) for the given container_id on the given profile
Parameters: |
|
---|
CLI Example:
salt myminion libcloud_storage.list_container_objects MyFolder profile1
salt.modules.libcloud_storage.
list_containers
(profile, **libcloud_kwargs)¶Return a list of containers.
Parameters: |
|
---|
CLI Example:
salt myminion libcloud_storage.list_containers profile1
salt.modules.libcloud_storage.
upload_object
(file_path, container_name, object_name, profile, extra=None, verify_hash=True, headers=None, **libcloud_kwargs)¶Upload an object currently located on a disk.
Parameters: |
|
---|---|
Returns: | The object name in the cloud |
Return type: |
|
CLI Example:
salt myminion libcloud_storage.upload_object /file/to/me.jpg MyFolder me.jpg profile1