diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-26 11:41:21 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-26 11:41:21 +0000 |
commit | e9887703d09bb42ddc3ab1f38855286f8d569ad6 (patch) | |
tree | 2962c689cf91a92e91bc10a62354855aba2015bc /doc | |
parent | a0d1fe04bc9f9566986b0496a78562b5ec4702e1 (diff) | |
parent | 73e4296a389893c750f7c70a477ec828e4360197 (diff) | |
download | python-swiftclient-e9887703d09bb42ddc3ab1f38855286f8d569ad6.tar.gz |
Merge "Adding keystoneauth sessions support"
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/client-api.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/source/client-api.rst b/doc/source/client-api.rst index b0bb637..ff88d7d 100644 --- a/doc/source/client-api.rst +++ b/doc/source/client-api.rst @@ -18,6 +18,28 @@ version are detailed below, but are just a subset of those that can be used to successfully authenticate. These are the most common and recommended combinations. +Keystone Session +~~~~~~~~~~~~~~~~ + +.. code-block:: python + + from keystoneauth1 import session + from keystoneauth1 import v3 + + # Create a password auth plugin + auth = v3.Password(auth_url='http://127.0.0.1:5000/v3/', + username='tester', + password='testing', + user_domain_name='Default', + project_name='Default', + project_domain_name='Default') + + # Create session + session = session.Session(auth=auth) + + # Create swiftclient Connection + swift_conn = Connection(session=session) + Keystone v3 ~~~~~~~~~~~ |