Skip to content

Instantly share code, notes, and snippets.

@the2hill
Created April 20, 2015 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the2hill/8b2918679eb876286e68 to your computer and use it in GitHub Desktop.
Save the2hill/8b2918679eb876286e68 to your computer and use it in GitHub Desktop.
py intrepreter keystone v2/v3
from keystoneclient import session
from keystoneclient.v2_0 import client as v2_client
from keystoneclient.v3 import client as v3_client
client = v2_client
kc = client.Client(auth_url='http://localhost:5000/v2.0',username='admin', password='password',project_name='admin')
s = session.Session(auth=kc)
c = client.Client(session=s)
client = v3_client
kc = client.Client(auth_url='http://localhost:5000/v3',username='admin', password='password',project_name='admin')
s = session.Session(auth=kc)
c = client.Client(session=s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment