OpenStack Identity (Keystone) Client
Go to file
Tobias Diaz 3e56e0d7e5 Prevent MemoryError when logging response bodies
Response bodies are loaded into memory prior to
being logged.

Loading huge response bodies may result in a
MemoryError.

This patch proposes that only JSON and TEXT
responses be logged, i.e when the Content-Type
header is application/json or application/text.

Responses that do not include or have a different
Content-Type header will have their body omitted.

This is a sort of backport of the fix for
keystoneauth sessions, see
I93b6fff73368c4f58bdebf8566c4948b50980cee

Co-Authored-By: Samuel de Medeiros Queiroz <samueldmq@gmail.com>

Closes-bug: 1616105

Change-Id: I8f43eee3a0b35041c6cf672e476f8151cf2f8d14
2017-01-05 10:19:25 -03:00
doc import warnings in doc/source/conf.py 2016-05-31 15:48:31 -04:00
examples/pki Remove keystoneclient.middleware 2015-12-11 02:00:30 -05:00
keystoneclient Prevent MemoryError when logging response bodies 2017-01-05 10:19:25 -03:00
releasenotes Prevent MemoryError when logging response bodies 2017-01-05 10:19:25 -03:00
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:53:26 +00:00
.gitignore Add release notes for keystoneclient 2015-11-29 20:02:58 -05:00
.gitreview Added in common test, venv and gitreview stuff. 2011-12-22 00:12:22 +00:00
.mailmap Add mailmap entry 2014-05-07 12:12:43 -07:00
.testr.conf Create functional test base 2015-02-13 17:55:34 +11:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2015-02-05 17:56:32 +00:00
HACKING.rst Make HACKING.rst DRYer and turn into rst file 2013-11-11 11:05:00 -08:00
LICENSE Initial commit. 2011-10-25 16:50:08 -07:00
README.rst Update README to comply with Identity V3 2016-06-28 20:08:34 +00:00
babel.cfg enabling i18n with Babel 2012-09-29 16:03:23 -07:00
bindep.txt Move other-requirements.txt to bindep.txt 2016-08-12 21:14:07 +02:00
requirements.txt Updated from global requirements 2016-08-04 02:41:26 +00:00
setup.cfg Add Python 3.5 classifier 2016-08-05 16:25:02 +08:00
setup.py Updated from global requirements 2015-09-17 12:16:43 +00:00
test-requirements.txt Updated from global requirements 2016-08-20 01:03:23 +00:00
tox.ini List system dependencies for running common tests 2016-06-28 16:29:44 +02:00

README.rst

Python bindings to the OpenStack Identity API (Keystone)

Latest Version

Downloads

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.

Contents:

Python API

By way of a quick-start:

>>> from keystoneauth1.identity import v3
>>> from keystoneauth1 import session
>>> 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.projects.list()
    [...]
>>> project = keystone.projects.create(name="test", description="My new Project!", domain="default", enabled=True)
>>> project.delete()