Last active
September 26, 2016 20:40
-
-
Save rahulunair/bdfcae11c7da5e264e3f15ab936041db to your computer and use it in GitHub Desktop.
This file contains 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 keystoneauth1 import identity | |
from keystoneauth1 import session | |
from cinderclient.client import Client | |
auth = identity.v3.Password(auth_url="http://127.0.0.1:35357", | |
project_name="demo", | |
project_domain_name="default", | |
user_domain_name="default", | |
username="admin", | |
password="secret") | |
def _get_client(): | |
return Client(2, auth_url="http://127.0.0.1:35357", | |
session=session.Session(auth=auth)) | |
def list_volume(c_client): | |
print c_client.volumes.list() | |
print "list_volume_id:: ", list_volume(_get_client()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment