Update docs to recommend KSA instead of KSC
For the session workflow (which is really the only workflow a dev should use), session objects should now come from keystoneauth1 instead of python-keystoneclient. Change-Id: Icb5f20ce3dc09ff7790b27d07f7f0cb3b83e1e7e
This commit is contained in:
parent
8cf2bfce3c
commit
5a247055ae
@ -3,19 +3,19 @@ Python API v2
|
|||||||
|
|
||||||
To create a client::
|
To create a client::
|
||||||
|
|
||||||
from keystoneclient.auth.identity import v2 as identity
|
from keystoneauth1 import loading
|
||||||
from keystoneclient import session
|
from keystoneauth1 import session
|
||||||
from glanceclient import Client
|
from glanceclient import Client
|
||||||
|
|
||||||
auth = identity.Password(auth_url=AUTH_URL,
|
loader = loading.get_plugin_loader('password')
|
||||||
username=USERNAME,
|
auth = loader.load_from_options(
|
||||||
password=PASSWORD,
|
auth_url=AUTH_URL,
|
||||||
tenant_name=PROJECT_ID)
|
username=USERNAME,
|
||||||
|
password=PASSWORD,
|
||||||
|
project_id=PROJECT_ID)
|
||||||
|
session = session.Session(auth=auth)
|
||||||
|
|
||||||
sess = session.Session(auth=auth)
|
glance = Client('2', session=session)
|
||||||
token = auth.get_token(sess)
|
|
||||||
|
|
||||||
glance = Client('2', endpoint=OS_IMAGE_ENDPOINT, token=token)
|
|
||||||
|
|
||||||
|
|
||||||
Create
|
Create
|
||||||
|
Loading…
x
Reference in New Issue
Block a user