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