Created
May 21, 2014 13:06
-
-
Save Kami/8ec3d7349bdc7d516fc6 to your computer and use it in GitHub Desktop.
Libcloud OpenStack Swift driver examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from libcloud.storage.types import Provider | |
| from libcloud.storage.providers import get_driver | |
| cls = get_driver(Provider.OPENSTACK_SWIFT) | |
| # 1. Specify all arguments | |
| driver = cls('test:tester', 'testing', | |
| region=None, | |
| ex_force_auth_url='http://127.0.0.1:8888/auth/v1.0', | |
| ex_force_auth_version='1.0', | |
| ex_force_service_type='object-store', | |
| ex_force_service_name='cloudFiles') | |
| # 2. Use default argument values | |
| driver = cls('test:tester', 'testing', | |
| ex_force_auth_url='http://127.0.0.1:8888/auth/v1.0', | |
| ex_force_service_type='object-store', | |
| ex_force_service_name='cloudFiles') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment