Fix the order of assertEqual arguments(keystoneclient, kvs, etc)

assertEqual method's arguments should be in
('expected', 'actual') order.

Change-Id: Ic429c9264a823c3b03ca3b5c898b4aeb96891504
Partial-Bug: #1277104
Fix test_provider_token_expiration_validation transient failure

The keystone.tests.test_token_provider.TestTokenProvider.
test_provider_token_expiration_validation test would fail if the
tests weren't run before the expiration period passed. This could
happen if the system was slow and the previous tests took a long
time causing a potential transient failure.

Change-Id: I123aadd55770002fe1c9ed9b17669d5212198aa3
Closes-Bug: #1278550
remove the unused variable in test_sql_upgrade

There is an unused variable in tests/test_sql_upgrade.py. It needs
to be removed.

Change-Id: Ia50a4e91319d1a4dce9515c8b910de28fa68fcb5
Add slowest output to tox runs (testr)

Add --slowest for all tox test runs that don't use other various
test commands.

Change-Id: I9f9fdcdda8895ba33c817f87b566794dbcd6ccb9
Remove unused db_sync from extensions

The db_sync in the extensions isn't used, either by the tests or
by keystone-manage db_sync, so remove them.

Change-Id: Ia0598e8dae81e258a05767f47525d5c11acce8db
Start using to oslotest

oslotest provides a BaseTestCase class then enables proper capturing of
stdout, stderr and logging streams during a test run. We will take
advantage of this capability in the near future.

Change-Id: I16761053f631e709224eee813dc0f423f06c8870
Use assertIn in test_v3_catalog

assertEqual was used where assertIn should have been. assertIn
will provide a more useful error message.

Change-Id: I97ccbb8579ea726fd76c520d0573fdcbf5a261d7
Add a space after the hash for block comments

Automatic enforcement of this rule is added in:
https://review.openstack.org/78119

bp more-code-style-automation

Change-Id: I167d8e2e648eaf553c586f225939daddfaeddda6
Removes the use of mutables as default args

Automatic enforcement of this rule is added in:
https://review.openstack.org/78119

bp more-code-style-automation

Change-Id: I184105a456e9beae3cb3d6716b974ba52ef8bdad
Use assertIsNone when comparing against None

Automatic enforcement of this rule is added in:
https://review.openstack.org/78119

bp more-code-style-automation

Change-Id: I3969d7595494d5df5bdb072234f2facc6000ab30
Reduce environment logging

The log message for configuring the environment as eventlet was
at the info level. Operators don't find this detail interesting
so this should be logged at debug level.

Change-Id: Ic78c5af0c781f6e1e427dbf40da0a8bee9762ea2
Cleanup revocation query

The code in the revoke sql backend to calculate the query for the
list of events was creating a temporary and then discarding it,
and blaming not using it on sqlite.

Rather than discard the temporary, a reference is kept to it so
that it can be used.

Change-Id: Ifdb6a70900af85869b43d319eab8aa2a6b2bc162
Allows override of stdout/stderr/log capturing

During a test run stdout, stderr and log messages are being captured. If
the test fails all three will be printed out so that can be inspected.
Each stream has an environment variable that can be used to stop it from
being printed at the end of a test run by setting its value to 0. This
is in line with what many of the other project are already doing.

Environment variables:

 - OS_STDOUT_CAPTURE for stdout
 - OS_STDERR_CAPTURE for stderr
 - OS_LOG_CAPTURE for logging

Change-Id: I2fed99069950b839e060297026c8e06cbd45bb98
Use CMS to generate sample tokens

This is preparing for compressed tokens.  We don't want anything in the
keystone server tree that assumes it knows the formats of the token.
This uses the CMS code to preduce the sample data.

Change-Id: I6bf9c0f8df2e2e6d53fef4ecbcca87b9f9af4e6b
code hygiene; use six.text_type, escape regexp's, use key function

Some simple code clean up for code hygiene

Need to use unicode() rather than str() to properly handle non-ascii
characters, but to be PY2/PY3 compatible use six.text_type.

Regexp's were formed by string formatting using run-time substitutions
but the substitutions were not escaped. If the substituion contained
regexp metachars the regexp could fail.

The db key was formed by string substituion but this code was
duplicated in many places, introduce a method, key() to eliminate the
code duplication. At the same time introduce the dn() method to
transform the dn to an internal format. Currently the dn() method is a
place holder whose implementation will be added in a subsequent patch.

Change-Id: I1fbb8cf420606c77b1eed346376050f21790a8e1
Remove unnecessary test setUps

There is no reason to have a setUp case if all we do is chain to the
parent.

Change-Id: Id31281a9d50588f036e03b458ccfb71d1010f2d6
Open Juno development

Bump preversion to 2014.2 to formally open Juno development.
The Icehouse release branch (milestone-proposed) will be cut
from the last commit before this one.

Change-Id: I16d88d311795868b83cd13afc87dc8fbff01bfb6
Merge "Open Juno development"
Add placeholders for reserved migrations

This patchset should land immediately after the opening of the Juno
development cycle.

Implements: bp reserved-db-migrations-icehouse
Change-Id: Ic2f1e06043da34878b06bab5a10d173497fa1cb6
Make service catalog include service name

If a service name is available then it should be included as part of a
token's service catalog. This functionality was present in the V2 api
and is already relied upon by various clients. It will make it much
easier to transition these clients if we can keep this functionality.

Change-Id: I0d824d73c375ffbc5a6b44c10992967f59742b01
Closes-Bug: #1288098