diff options
author | Joao Paulo Targino <joaotargino@pimpim.lsd.ufcg.edu.br> | 2016-06-28 16:42:00 -0300 |
---|---|---|
committer | Steve Martinelli <s.martinelli@gmail.com> | 2016-06-28 20:08:34 +0000 |
commit | 97e100d87e6eb25a2c50e6c2d38743672b5a6534 (patch) | |
tree | e6c8c46bf8581c53781b5ba359d1b82e2f8b2998 | |
parent | d97d92b4539263cbf6b6a3130211ad35cda47e0d (diff) | |
download | python-keystoneclient-97e100d87e6eb25a2c50e6c2d38743672b5a6534.tar.gz |
Update README to comply with Identity V3
Updated the README instructions to use Identity V3 parameters
and removed the reference to the deprecated 2.0 as an auth endpoint.
Change-Id: Ia2bb8934277f6386b8c44ce51931b10d937e6bdf
-rw-r--r-- | README.rst | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -41,13 +41,15 @@ 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.identity import v3 >>> from keystoneauth1 import session - >>> from keystoneclient.v2_0 import client - >>> auth = v2.Password(username=USERNAME, password=PASSWORD, tenant_name=TENANT, auth_url=AUTH_URL) + >>> from keystoneclient.v3 import client + >>> auth = v3.Password(auth_url="http://example.com:5000/v3", username="admin", + ... password="password", project_name="admin", + ... user_domain_id="default", project_domain_id="default") >>> 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() + >>> keystone.projects.list() + [...] + >>> project = keystone.projects.create(name="test", description="My new Project!", domain="default", enabled=True) + >>> project.delete() |