Created
April 26, 2017 16:31
-
-
Save j-griffith/3f6f3b88a9ad2acb2d46e4e546b5bc8a to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/python | |
| import os | |
| import brick_cinderclient_ext | |
| from cinderclient import client | |
| from cinderclient.contrib import noauth | |
| from keystoneauth1 import loading | |
| from keystoneauth1 import session | |
| bypass_url = "http://localhost:8776/v3" | |
| project_id = "cinderflex" | |
| auth_plugin = noauth.CinderNoAuthPlugin('', | |
| project_id, | |
| None, | |
| bypass_url) | |
| loader = loading.get_plugin_loader('password') | |
| auth = loader.load_from_options(auth_url=bypass_url, | |
| username="foo", | |
| password="password", | |
| project_id="cinderflex", | |
| user_domain_id="default", | |
| project_domain_id="default") | |
| sess = session.Session(auth=auth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment