summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-26 11:41:21 +0000
committerGerrit Code Review <review@openstack.org>2016-10-26 11:41:21 +0000
commite9887703d09bb42ddc3ab1f38855286f8d569ad6 (patch)
tree2962c689cf91a92e91bc10a62354855aba2015bc /doc
parenta0d1fe04bc9f9566986b0496a78562b5ec4702e1 (diff)
parent73e4296a389893c750f7c70a477ec828e4360197 (diff)
downloadpython-swiftclient-e9887703d09bb42ddc3ab1f38855286f8d569ad6.tar.gz
Merge "Adding keystoneauth sessions support"
Diffstat (limited to 'doc')
-rw-r--r--doc/source/client-api.rst22
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
~~~~~~~~~~~