%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/modules/ |
Current File : //lib/python2.7/site-packages/salt/modules/swift.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l j j j Z e j e � Z d � Z i Z d d � Z d d d � Z d d d e d d � Z d � Z d d d d � Z d S( u( Module for handling OpenStack Swift calls Author: Anthony Stanton <anthony.stanton@gmail.com> Inspired by the S3 and Nova modules :depends: - swiftclient Python module :configuration: This module is not usable until the user, tenant, auth URL, and password or auth_key are specified either in a pillar or in the minion's config file. For example:: keystone.user: admin keystone.tenant: admin keystone.auth_url: 'http://127.0.0.1:5000/v2.0/' keystone.password: verybadpass # or keystone.auth_key: 203802934809284k2j34lkj2l3kj43k If configuration for multiple OpenStack accounts is required, they can be set up as different configuration profiles: For example:: openstack1: keystone.user: admin keystone.tenant: admin keystone.auth_url: 'http://127.0.0.1:5000/v2.0/' keystone.password: verybadpass # or keystone.auth_key: 203802934809284k2j34lkj2l3kj43k openstack2: keystone.user: admin keystone.tenant: admin keystone.auth_url: 'http://127.0.0.2:5000/v2.0/' keystone.password: verybadpass # or keystone.auth_key: 303802934809284k2j34lkj2l3kj43k 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 NOTE: For Rackspace cloud files setting keystone.auth_version = 1 is recommended. i ( t absolute_importt unicode_literalst print_functionNc C@ s t j � S( uI Only load this module if swift is installed on this minion. ( t suost check_swift( ( ( s6 /usr/lib/python2.7/site-packages/salt/modules/swift.pyt __virtual__<