Synced jsonutils from oslo-incubator

The sync includes change that drastically enhances performance on Python
2.6 with fresh simplejson library installed.

The latest commit in oslo-incubator:
- 732bdb6297eb9de81667f7713ebcb1ccc2ee45a7

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
auth_token configurable check of revocations for cached

The auth_token middleware would fail if it couldn't fetch the
revocation list. If the system is configured for UUID tokens then
the revocation list may not be available.

With this fix, the revocation list will only be checked for
cached tokens if the new check_revocations_for_cached option
is set to True.

Also, this change prevents the revocation list from being
checked twice for a PKI token that's validate off-line.

Change-Id: I5408bbe12aefda608ebcb81cf3c7ef068b2bf2f6
Closes-Bug: #1312858
Fix docstrings in keystoneclient

Trusts and service catalog had a few malformed docstrings
that caused warnings when building docs.

Change-Id: Iea8612c3aaebea54c00b02c73c77f0c9e79f86bc
Partial-Bug: #1315523
Merge "Fix docstrings in keystoneclient"
fixed typos found by RETF rules

rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos

Change-Id: I67fb3e0d02c931cb7e605ac74ea8272956afa8e1
Merge "fixed typos found by RETF rules"
Fix client fixtures

Some of the client fixtures used for testing were invalid. v2
tokens must have 'access'/'token'/'expires', and v3 tokens must
have 'token'/'expires_at'.

Change-Id: I2614c7deed47c9758c2031418110108308634296
Related-Bug: #1174499
Make auth_token return a V2 Catalog

As there is no way to distinguish a v2 or v3 catalog from the headers
provided to an application we will for the meantime always return a v2
catalog. This should not cause any issues as the full token data is not
provided to the service so there is no-one that will get caught out by a
v2/v3 mix, and anyone that is already supporting the v3 catalog format
will have to support the v2 catalog format as well so it will continue
to work.

Change-Id: Ic9b38e0ba4682b47ae295bd3f89bac59ef7437cf
Closes-Bug: #1302970
Move auth_token cache pool tests out of NoMemcache

There were cache pool tests in NoMemcacheAuthToken. Since this class
un-imports memcache, setting the memcached_servers option would just
be ignored anyways.

The tests were moved into a separate class and changed to not set
memcached_servers. The behavior should be the same.

Also, there was a cache pool test in CommonAuthTokenMiddlewareTest
that fit better in this new class.

Change-Id: Icfce7398f2a29753200c2010bba58924980622c0
Cached tokens aren't expired

The auth_token test said that the cached tokens are expired. The
tokens weren't expired, so remove the code.

Change-Id: I8ce30cc09ee9bbc19cc4ebdb5d935a80d2d5d473
Move auth_token tests not requiring v2/v3 to new class

The tests in CommonAuthTokenMiddlewareTest run for both v2 and v3
tokens, but contained tests that weren't affected by the token
version.

The tests that aren't affected by the token version are now in
their own class.

Change-Id: I0e8aecafcd8e0da262dded48a612c84b1629d953
Remove importutils from oslo config

The importutils module is only used by other oslo modules, so
remove it from openstack-common.conf. It'll be pulled in
automatically if it's needed.

Change-Id: Iaa7e047a9ff76f911f8c64b45ceb1f240855670a
Discovery URL querying functions

The existing discovery mechanism is geared around allowing users to
create appropriate client objects. It does not provide any means to
query version responses to determine the URLs of available versions.
This patch adds url_for (similar to the functions available on service
catalog) and data_for functions that can do lower level queries for
URLs and version response data.

Because of the client creation functionality the existing discover.py
cannot be imported from within keystoneclient due to cyclical dependency
resolution. The querying functions are therefore added to a private
keystoneclient file and exposed to the original Discover object via
inheritance. This private object can then be used within the
keystoneclient library.

Blueprint: endpoint-version-query
Change-Id: I7e1891536289c57ad3fbe8ef1c6e50b7344d83d5
Sync with oslo-incubator 2640847

Sync with oslo-incubator commit
2640847e3df7720457103d2111846c27fc8fdcd5 .

First, remove the existing code to cleanup:

 $ rm -r keyestoneclient/openstack/*

Then, sync from oslo-incubator:

 $ python update.py ../python-keystoneclient

Change-Id: Ic94906002e0257ffc56245e49890e7ee2f3b4a2a
Merge "Synced jsonutils from oslo-incubator"
Merge "Discovery URL querying functions"
Regions Management

Client code for v3 API regions implementation.

Change-Id: I5c1526457395ba3fb06977bea775ff572ec840ba
Closes-Bug: 1289519
Add mailmap entry

Add mailmap entry for my email address

Change-Id: Ia46c28c86ef3f440556b1b027d2bf0a7f3e721c5
OAuth request/access token and consumer support for oauth client API

Add support for creating request and access tokens,
and to authorize request tokens. Also adding basic CRUD for
consumer entities.

DocImpact
Change-Id: Ib9d0b223f202a7e33cbad1602da5be7479cd3284
implements: bp add-oauth-support
Merge "OAuth request/access token and consumer support for oauth client API"