summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorTin Lam <tl3438@att.com>2016-04-19 20:22:03 -0500
committerTin Lam <tl3438@att.com>2016-04-19 20:25:55 -0500
commit841389810f0fe5363d06c1b46531de951c0228f3 (patch)
tree9f65b197537758b842abe5bf14c93acce8cff43e /README.rst
parentbba24d32bf0aed28d6981218bc81de10883e6273 (diff)
downloadpython-keystoneclient-841389810f0fe5363d06c1b46531de951c0228f3.tar.gz
Updated example in README
Update the usage example in the README to a working one shown in [1]. [1] http://paste.openstack.org/show/494514/ Change-Id: Iab2693d82cc2bfeda7cb7634fc5bdeae34cdbb46 Closes-Bug: #1571833
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 43bd620..2e24bf3 100644
--- a/README.rst
+++ b/README.rst
@@ -42,8 +42,12 @@ Python API
By way of a quick-start::
# use v2.0 auth with http://example.com:5000/v2.0
+ >>> from keystoneauth1.identity import v2
+ >>> from keystoneauth1 import session
>>> from keystoneclient.v2_0 import client
- >>> keystone = client.Client(username=USERNAME, password=PASSWORD, tenant_name=TENANT, auth_url=AUTH_URL)
+ >>> auth = v2.Password(username=USERNAME, password=PASSWORD, tenant_name=TENANT, auth_url=AUTH_URL)
+ >>> sess = session.Session(auth=auth)
+ >>> keystone = client.Client(session=sess)
>>> keystone.tenants.list()
>>> tenant = keystone.tenants.create(tenant_name="test", description="My new tenant!", enabled=True)
>>> tenant.delete()