Add blurb about using Deckhand client with Keystone Token

This PS simply adds a documentation blurb about how to use the
Decklahdn client via a pre-existing Keystone token.

Other auth plugins can be used with a similar effect. See:

edeb84715c/keystoneauth1/identity/v3

Change-Id: I5bf5a57ec02a7b2bda7304b5c5068f88cea228e1
This commit is contained in:
Felipe Monteiro 2017-12-15 17:31:55 +00:00
parent 848d288290
commit f8323063ab

View File

@ -39,7 +39,26 @@ session:
sess = session.Session(auth=auth)
deckhandclient = client.Client(session=sess)
Alternatively, one can use non-session authentication to instantiate the
You can also instantiate the client via one of Keystone's supported ``auth``
plugins:
::
from keystoneauth1.identity import v3
keystone_auth = {
'auth_url': AUTH_URL,
'token': TOKEN,
'project_id': PROJECT_ID,
'project_domain_name': PROJECT_DOMAIN_NAME
}
auth = v3.Token(**keystone_auth)
deckhandclient = client.Client(auth=auth)
Which will allow you to authenticate using a pre-exsting, project-scoped
token.
Alternatively, you can use non-session authentication to instantiate the
client, though this approach has been `deprecated`_.
::