Guest User

Untitled

a guest
Oct 17th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from keystoneauth1.identity import v2
  2. from keystoneauth1 import session
  3. from keystoneclient.v2_0 import client
  4.  
  5. username = ''
  6. password = ''
  7. tenant_name = ''
  8. tenant_id = ''
  9. auth_url = ''
  10.  
  11. auth = v2.Password(username=username, password=password, tenant_id=tenant_id,
  12. tenant_name=tenant_name, auth_url=auth_url)
  13. sess = session.Session(auth=auth)
  14. keystone = client.Client(version=2, session=sess, debug=True)
  15.  
  16.  
  17. print keystone.tenants.list()
Add Comment
Please, Sign In to add comment