Carrying over token expiry time when token chaining

Fixes bug #998185

This commit causes the token expiry time to be maintained when
one token is being created from another

Change-Id: I7b61692a60d9227423b93c267864a5abe939ca33
Tweak for easier, safer subclassing

Implements the "follow up suggestion" in blueprint sql-identiy-pam

Moved the call to utils.check_password call to its own subroutine.
This allows anyone creating a subclass for sql.Identity to just replace
this new 'check_password' method rather than the entire
'authenticate' method. (This is modeled after ldap/core.py which
already does this.) If the logic in 'authenticate' changes, any
derrived classes won't need to be modified.

Updated to make method private.

Change-Id: I1a06596861fd016f63f5f1a5fe8180993f04f4f5
Use cfg's new global CONF object

Implements blueprint cfg-global-object

Change-Id: Ic53b41dafa8666ce21f33697f7e8697f1e5cb0fd
Merge "Tweak for easier, safer subclassing"
Merge "Use cfg's new global CONF object"
Merge "Carrying over token expiry time when token chaining"
Clean up test requires a bit.

The main culprit here was prettytable - but because of the way this was
working, it was causing intermittent transient network issues from pypi in
the devstack gates.

Change-Id: I62117116c850361c5e2de7e6485c14ef43007c1d
PEP8 fixes

Change-Id: I0989396691eb31d9008c016e64f2c197f8c7e48c
Speed up SQL unit tests.

Using a cached copy of the SQLite Data base speeds up the tests:

Before this change

Ran 44 tests in 126.154s
OK
Slowest 5 tests took 15.87 secs:
    3.34       test_delete_role (test_backend_sql.SqlIdentity)
    3.17       test_delete_user_with_tenant_association (test_backend_sql.SqlIdentity)
    3.17       test_create_tenant_invalid_name_fails (test_backend_sql.SqlIdentity)
    3.10       test_get_user (test_backend_sql.SqlIdentity)
    3.10       test_get_tenant_bad_tenant (test_backend_sql.SqlIdentity)

After this change:

Ran 44 tests in 58.996s

OK
Slowest 5 tests took 8.64 secs:
    2.57       test_add_user_to_tenant (test_backend_sql.SqlIdentity)
    1.58       test_update_tenant_long_name_fails (test_backend_sql.SqlIdentity)
    1.51       test_rename_duplicate_user_name_fails (test_backend_sql.SqlIdentity)
    1.50       test_delete_tenant_with_user_association (test_backend_sql.SqlIdentity)
    1.49       test_delete_user_with_tenant_association (test_backend_sql.SqlIdentity)

Slowest test was where the database was initialized

Change-Id: Idf046763e8718762695bbcedce4d223f654054db
Monkey patching 'thread'.

Fixes bug 1012381.

Change-Id: Icb7b2372df96d647fc6dcd4c4ebe72c8aa607f9d
400 on unrecognized content type (bug 1012282)

Unrecognized content type:
  http://paste.openstack.org/raw/18537/

Malformed JSON:
  http://paste.openstack.org/raw/18536/

Change-Id: I76afbf9300bcb1c11bed74eddbe4972c451c5877
Merge "Speed up SQL unit tests."
Fixed typo in routing conditions (bug 1006793)

The kwarg should be 'method' not 'methods', per Routes docs.
See: http://routes.readthedocs.org/en/latest/setting_up.html#conditions

Example in lieu of negative tests...
Without this change: http://paste.openstack.org/raw/18326/
With this change: http://paste.openstack.org/raw/18325/

Change-Id: If91fc0c79b320652674c68c433989a60c098dc1e
Merge "400 on unrecognized content type (bug 1012282)"
Merge "Fixed typo in routing conditions (bug 1006793)"
Pass serviceCatalog in auth_token middleware

 * This will allow  for chained requests (novaclient -> nova -> cinder)
 * Fixes bug 1010237

Change-Id: Iab126cb1f2fb01ca7da24fa9fe97ec81ee96e455
Reorder imports by full module path

Fixes bug #1013441

Sort imports by lexicographical order of full module path

Change-Id: I60231d87618466426dc7bfac7bb0644a0dbd079a
Merge "Monkey patching 'thread'."