Module for handling OpenStack Swift calls Author: Anthony Stanton <anthony.stanton@gmail.com>
Inspired by the S3 and Nova modules
depends: |
|
---|---|
configuration: | This module is not usable until the user, password, tenant, and auth URL are specified either in a pillar or in the minion's config file. For example: keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
If configuration for multiple OpenStack accounts is required, they can be set up as different configuration profiles: For example: openstack1:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
openstack2:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.2:5000/v2.0/'
With this configuration in place, any of the swift functions can make use of a configuration profile by declaring it explicitly. For example: salt '*' swift.get mycontainer myfile /tmp/file profile=openstack1
|
Delete a container, or delete an object from a container.
CLI Example to delete a container:
salt myminion swift.delete mycontainer
CLI Example to delete an object from a container:
salt myminion swift.delete mycontainer remoteobject
List the contents of a container, or return an object from a container. Set return_bin to True in order to retrieve an object wholesale. Otherwise, Salt will attempt to parse an XML response.
CLI Example to list containers:
salt myminion swift.get
CLI Example to list the contents of a container:
salt myminion swift.get mycontainer
CLI Example to return the binary contents of an object:
salt myminion swift.get mycontainer myfile.png return_bin=True
CLI Example to save the binary contents of an object to a local file:
salt myminion swift.get mycontainer myfile.png local_file=/tmp/myfile.png
Create a new container, or upload an object to a container.
CLI Example to create a container:
salt myminion swift.put mycontainer
CLI Example to upload an object to a container:
salt myminion swift.put mycontainer remotepath local_file=/path/to/file
Docs for previous releases are available on salt.rtfd.org.
Latest Salt release: 2014.7.1
22.16.203. salt.modules.sysbench
Upcoming SaltStack events, webinars and local meet ups and user groups.