Save test_auth_token_middleware from unlimited recursion

For Python 2.6, BaseAuthTokenMiddlewareTest will be
equal to AdjustedBaseAuthTokenMiddlewareTest in
BaseAuthTokenMiddlewareTest.setUp thus leading to
infinite recursion.

Also, parent's setUp was incorrectly called by
BaseAuthTokenMiddlewareTest.setUp twice: at the beginning
and at the end of the function.

Change-Id: I63fce65866ef9d8aebe9eb60f7ceb17463de0989
Fixes: bug #1130200
Sync memorycache and timeutils from oslo.

Change-Id: Ibc61b07fe65d97f9a0eb60e514e29bc12b2f9f4a
Remove test dep on name of dir (bug 1124283)

The name of the project's directory was previously hardcoded into the
tests, so tests would fail if executed from another directory (such as
"python-keystoneclient-master", as checked-out by keystone for
integration testing).

Also, the tests should now be executable on Windows.

Change-Id: I0a1e052054e509b0f795fd13f95a804e0c255907
Work better in server env with no keyrings

We should not try loading keyrings if we dont' have to. We
certainly should not print messages if keyrings are not even
needed

Fix for LP# 1145071

Change-Id: I700a2b40620359f6f1fbe03c6a6239d162ddea61
update v3 domains - remove public/private namespace

removed the private namespace options that were lingering in create/update/tests
it should now adhere to the v3 api specs

Change-Id: I853c2b8a13bc657e9cd2a3f24e6eb7deb68a4c5c
Switch to oslo.config.

The oslo-config package has been renamed. Switch to the new
version. (should fix SmokeStack).

Change-Id: Ied8804035d748932e7763cbaa9a7e295a887f1f5
Merge "Save test_auth_token_middleware from unlimited recursion"
Merge "Work better in server env with no keyrings"
Merge "Switch to oslo.config."
Merge "Remove test dep on name of dir (bug 1124283)"
help text improvements

from comments in Ibbc7fab2033d8f037262b465b98d1713579adfc2

v2: synced to the README
manpage will be updated in https://review.openstack.org/#/c/20976

Change-Id: I33006a4b935b9272fd99775936a17b3cfd08e294
Fix auth-token middleware to understand v3 tokens

Now that the Identity server supports v3 tokens, the auth_token
middleware should permit the in-line validation of such a token.  This
essentially means just setting any new environment items
that correspond to the new attributes that may be in a v3 token (such
as domains), as well as allowing for the slight format differences.

Most of the work in this change is actually in the unit tests, where
it was important to try and enable the existing tests to be run against
an auth_token middleware configured for both v2 and v3.  This meant
restructing the test class so that the token format is separated
from the individual tests and is initialized by the class Setup().

Since there are some new signed token formats included in this testing,
a new set of the signed tokens was generated.

Fixes Bug #1132390

Change-Id: I78b232d30f5310c39089fbbc8e56c23df291f89f
Switch to final 1.1.0 oslo.config release

Fixes bug #1128256

oslo.config has now been released to PyPI in time for Grizzly RC1 so
we can switch to using it directly.

Change-Id: I655f831718ae5f4e25e941ee206fe195214a9a91
Use v2.0 api by default in auth_token middleware

Fixes an issue that crept in with d782a99 where auth_token
started defaulting to the v3.0 API by default when no version
was specified.

Given that bin/keystone still defaults to using the v2.0 API
it seems like auth_token.py should too.

Fixes LP Bug #1154144

Change-Id: Ia5620bccc182bbc73cb60dcccb1f701304450e5a
Retry http_request and json_request failure.

Temporary network outages or keystone server restarts can lead
to a connection refused in auth_token middleware. Rather than
failing immediately, this patch attempts to retry a few times.

Fixes bug 1150299

Change-Id: I2ecf0d7745290976efcb3e3cd6511817a53d3e0a
Doc info and other readability improvements

A few good suggestions were made on the final round of reviews
on the previous patch to add v3 token support, but were not
implemented. This patch applies these, which should not create
any functional change.

Fixes Bug #1154768

Change-Id: Ie5408a5477d176bd28b2c385e49cd29b39c0de39
Make auth_token lazy load the auth_version.

Updates recent changes to the auth_token middleware (this
is a regression in d782a99) so that self.auth_version is
lazy loaded.

This fixes issues where other openstack services would fail
to startup correctly if Keystone is not running. The issue
was auth_token was trying to make a request to '/' to get
versions information on startup to "autodetect" the correct
version to use.

This patch fixes startup issues by moving the version detection
so that it is lazy loaded right before it is actually used.

This issue should fix SmokeStack :)

Fixes LP Bug #1154806.

Change-Id: Ib24f5386fa1ffe0e0365548840f0cfeaae36f548
Make keystone client handle the response code 300.

Keystone discover command currently fails to list
the keystone server. Fix is
made such that client handle the response code
300 from the keystone server.

Fixes Bug #1136476

Change-Id: Iada31f1e274aade90aa4b4be2a136793a0ba64d7
Merge "Make auth_token lazy load the auth_version."
Merge "Use v2.0 api by default in auth_token middleware"