841389810f
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
2.1 KiB
2.1 KiB
Python bindings to the OpenStack Identity API (Keystone)
This is a client for the OpenStack Identity API, implemented by the
Keystone team; it contains a Python API (the keystoneclient
module) for OpenStack's Identity Service. For command line interface
support, use OpenStackClient.
- PyPi - package installation
- Online Documentation
- Launchpad project - release management
- Blueprints - feature specifications
- Bugs - issue tracking
- Source
- Specs
- How to Contribute
Contents:
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
>>> 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()