Safe command handling for openssl

The openssl command line was passed to exec() as a string with
no attempt at escaping. This could lead to odd results if someone
configured their system with a space in the filename of a key.

The fix is to pass the command to exec() safely, as a list.

Change-Id: I4faa2b66f79bf6ffddabf4a0f0b407ce9afa72d2
Reference dogpile.cache.memcached backend properly

It is dogpile.cache.memcached, not dogpile.cache.memcache
see
http://dogpilecache.readthedocs.org/en/latest/api.html?highlight=memcache#module-dogpile.cache.backends.memcached

Change-Id: Ia2aded1be82453b87a7734441537a5976385616e
Tests remove useless config list cleanup code

With the change to correctly copy the config file list, tests
don't have to revert their changes to the list manually.

Change-Id: Ic9c3b945f6cb663367dd054a501180831fa47658
Tests use setUp rather than init

Test classes should put their initialization code into setUp rather
than __init__. It gets called when the test starts.

Change-Id: Ice0631c864334435b895bad145f3b5b14dc3bffc
Use passed filter dict param in core sql filtering

The existing code incorrectly ignored the passed in cumulative dict.
It functionaly got away with this error since the variable name
it used internally matched the one used in the scope of the caller
method.  Also, correct misspelling in the the same variable name.

Change-Id: Ib80df4dda2f1a8058a15d6407cae1532f4f988e4
Correct sample config default log levels

The documentation of the default_log_levels default value in the
sample keystone.conf file was out of date. The default value has
been updated to the current value in keystone.openstack.common.log.

Change-Id: I3edf2d5375413250de41f8cebb98a826dc5df8ce
Update the default_log_levels defaults

The default for default_log_levels didn't set the log levels
for some packages that Keystone uses (for example, dogpile). This
caused the server to output a lot of extra logs when debug=True
is used.

You can get the debug output for dogpile and routes by setting
default_log_levels explicitly in your keystone.conf file.

Change-Id: Ib797fa7b98f0e501047b72b094d07ad204385cc6
Related-bug: #1245629
Closes-Bug: #1269987
turn off eventlet.wsgi debug

eventlet's wsgi server has a debug mode. This triggers in 3 cases:

1) returning a stack trace to the user on 500 error
2) printing 'accepted'... on every wsgi request
3) printing timeout on time out scenarios

In a real OpenStack environment #2 is basically what we see, all
the time, on *every* request. This ends up adding a lot of log
spam at INFO level.

Future eventlet will use real python logging, which will let us
log the debug messages at DEBUG level, but until then we should
clean out the logs to be vaguely sane.

Change-Id: Ifb92d25949568612d4a34a996752f33bc728b58b
sync oslo-incubator log.py

bring log.py up to date, most importantly to bring over

I130b08b1b4b5a48ecfa6418e7576d2bae2884f9e

which removes the extra newlines that eventlet adds to all the
logs, due to the way it works with the common logger.

Change-Id: I286cd21a21198b6790fc7f7b0afd08ddc980d0af
Change assertTrue(isinstance()) by optimal assert

Some of tests use different method of assertTrue(isinstance(A, B)) or
assertEqual(type(A), B). The correct way is to use assertIsInstance(A,
B) provided by testtools.

Change-Id: I8426ee1f6387602660f2d768883d18ab2f04c6f0
Closes-bug: #1268480
Enhancing tests to check project deletion in Active Directory

It includes a delete tree extension for fakeldap.

Change-Id: I91f732e2944f27d28074c77bcad853c729e9d659
Related-Bug: #1247032
Use message when creating Unauthorized exception

The Unauthorized exception was being created with an underlying
exception as its message instead of that underlying exception's message,
such that it can be translated.

Change-Id: I57a7729d2416dda8098da2ea67e867cad31ff83b
Partial-Bug: #1274638
Remove legacy diablo and essex test cruft

Remove the legacy cruft that is no longer used from diablo and
essex.

Change-Id: I4c00b12ef6d31c8387cdf12e58aed7416ede9f2d
Remove unused variable assignment

This variable was assigned a value and then later assigned a new
value without ever being read in between, so the first assignment
had no affect.

Change-Id: I535776f5aa7b634375df23a4efae7e29d6e3d008
Cleanup sample config

The sample config file had some options that were set rather than
documenting the defaults.

Change-Id: I53abba01b3683f3ad9c81d824ccf0b63c016dc87
Removes xrange for Python3 compat

I'm using the builtin range instead of six.moves.range because we're
creating small lists of integers so there really isn't much or a
performance impact.

Change-Id: I9f4a5e9f21e0fd95ffe391eda3aa635938170504
Implements: bp keystone-py3kcompat
Uses six.iteritems for Python3 compat

Change-Id: I968c349919517bf02b331a8620b17e1789c30dc1
Implements: bp keystone-py3kcompat
Uses six.text_type instead of unicode

The unicode builtin doesn't exist in Python3.

Change-Id: Id13c8be7a016ec06d09cb45180dab64ade6f839c
Implements: bp keystone-py3kcompat
Fixes a Python3 syntax error using raise

In Python 3 you can no longer use the 'raise Class, *args' syntax when
raising exceptions.

Change-Id: I25781e8b57b06afa1ff6da0104a29d80c2a73ffb
Implements: bp keystone-py3kcompat
Do not call deprecated functions

When getting a token using v3 API, a deprecated warning was logged
because the process wound up calling identity_api.get_domain.

The server shouldn't be using deprecated APIs.

Change-Id: I5b6e1aad6db9677abee04ff88c739722f358e386