diff options
author | Monty Taylor <mordred@inaugust.com> | 2015-10-21 04:09:07 +0900 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2015-10-21 17:38:54 +0900 |
commit | 5a247055ae3c718036d82b56842f08e4234ba4b2 (patch) | |
tree | 5c7f31148b782c84c9d93323e6fa0c7c150bab3b /doc | |
parent | 8cf2bfce3cbfdb7ec84385539b37258dbac408df (diff) | |
download | python-glanceclient-5a247055ae3c718036d82b56842f08e4234ba4b2.tar.gz |
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
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/apiv2.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/source/apiv2.rst b/doc/source/apiv2.rst index 436db8f..3f75bc6 100644 --- a/doc/source/apiv2.rst +++ b/doc/source/apiv2.rst @@ -3,19 +3,19 @@ Python API v2 To create a client:: - from keystoneclient.auth.identity import v2 as identity - from keystoneclient import session + from keystoneauth1 import loading + from keystoneauth1 import session from glanceclient import Client - auth = identity.Password(auth_url=AUTH_URL, - username=USERNAME, - password=PASSWORD, - tenant_name=PROJECT_ID) + loader = loading.get_plugin_loader('password') + auth = loader.load_from_options( + auth_url=AUTH_URL, + username=USERNAME, + password=PASSWORD, + project_id=PROJECT_ID) + session = session.Session(auth=auth) - sess = session.Session(auth=auth) - token = auth.get_token(sess) - - glance = Client('2', endpoint=OS_IMAGE_ENDPOINT, token=token) + glance = Client('2', session=session) Create |