2016-11-25 09:55:39 +01:00
|
|
|
========================
|
|
|
|
Team and repository tags
|
|
|
|
========================
|
|
|
|
|
2018-03-11 03:06:00 +08:00
|
|
|
.. image:: https://governance.openstack.org/tc/badges/python-keystoneclient.svg
|
|
|
|
:target: https://governance.openstack.org/tc/reference/tags/index.html
|
2016-11-25 09:55:39 +01:00
|
|
|
|
|
|
|
.. Change things from this point on
|
|
|
|
|
2012-10-24 07:12:30 -05:00
|
|
|
Python bindings to the OpenStack Identity API (Keystone)
|
|
|
|
========================================================
|
2011-10-25 16:50:08 -07:00
|
|
|
|
2015-09-25 00:13:13 -04:00
|
|
|
.. image:: https://img.shields.io/pypi/v/python-keystoneclient.svg
|
2018-04-20 17:20:18 +07:00
|
|
|
:target: https://pypi.org/project/python-keystoneclient/
|
2015-09-25 00:13:13 -04:00
|
|
|
:alt: Latest Version
|
|
|
|
|
2015-04-29 12:27:30 -04:00
|
|
|
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`_
|
2018-06-28 12:53:06 +08:00
|
|
|
* `Release Notes`_
|
2015-04-29 12:27:30 -04:00
|
|
|
|
2018-04-20 17:20:18 +07:00
|
|
|
.. _PyPi: https://pypi.org/project/python-keystoneclient
|
2017-07-14 09:56:01 +08:00
|
|
|
.. _Online Documentation: https://docs.openstack.org/python-keystoneclient/latest/
|
2015-04-29 12:27:30 -04:00
|
|
|
.. _Launchpad project: https://launchpad.net/python-keystoneclient
|
|
|
|
.. _Blueprints: https://blueprints.launchpad.net/python-keystoneclient
|
|
|
|
.. _Bugs: https://bugs.launchpad.net/python-keystoneclient
|
2019-04-23 13:44:34 +08:00
|
|
|
.. _Source: https://opendev.org/openstack/python-keystoneclient
|
2018-04-20 17:20:18 +07:00
|
|
|
.. _OpenStackClient: https://pypi.org/project/python-openstackclient
|
2017-02-05 20:45:52 -08:00
|
|
|
.. _How to Contribute: https://docs.openstack.org/infra/manual/developers.html
|
|
|
|
.. _Specs: https://specs.openstack.org/openstack/keystone-specs/
|
2018-06-28 12:53:06 +08:00
|
|
|
.. _Release Notes: https://docs.openstack.org/releasenotes/python-keystoneclient
|
2011-10-25 16:50:08 -07:00
|
|
|
|
|
|
|
.. contents:: Contents:
|
|
|
|
:local:
|
|
|
|
|
|
|
|
Python API
|
|
|
|
----------
|
|
|
|
|
|
|
|
By way of a quick-start::
|
|
|
|
|
2016-06-28 16:42:00 -03:00
|
|
|
>>> from keystoneauth1.identity import v3
|
2016-04-19 20:22:03 -05:00
|
|
|
>>> from keystoneauth1 import session
|
2016-06-28 16:42:00 -03:00
|
|
|
>>> 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")
|
2016-04-19 20:22:03 -05:00
|
|
|
>>> sess = session.Session(auth=auth)
|
|
|
|
>>> keystone = client.Client(session=sess)
|
2016-06-28 16:42:00 -03:00
|
|
|
>>> keystone.projects.list()
|
|
|
|
[...]
|
|
|
|
>>> project = keystone.projects.create(name="test", description="My new Project!", domain="default", enabled=True)
|
|
|
|
>>> project.delete()
|