Add Middleware for correlation_id

The middleware generates the 'correlation_id' if it is not already present
in the request header. This 'correlation_id' can be used to enable more
effective debugging of requests that span multiple services.

Implements: blueprint create-a-unified-correlation-id

Change-Id: Ibc06a5b05b628e0b640e9299c79127ecbf9c684e
Add support for requirements.txt.

In prep for moving the projects to requirements.txt and
test-requirements.txt, we need to have our legacy install_venv
codebase support finding requirements in the right place.

Change-Id: I0f300c6bb1792c81e2133a41a5631f2dd4c021ba
Fix tox coverange env

We're not setting the VIRTUAL_ENV environment variable, so 'tox -ecover'
is failing because patch_tox_venv uses the variable.

Change-Id: I3898d0dd1f8a9bf4216253bb2c7d8491e1e8ce56
Merge "Add Middleware for correlation_id"
Use stubout in test_correlation_id

Best to use stubout for stubbing out methods like this. That way they
get properly unstubbed on failure.

Change-Id: I61dc96d01e331e8d811b8f24137e8f738cf09215
Allow RPC_API_NAMESPACE on RpcProxy objects

This allows one to subclass RpcProxy for use with a particular
namespace without having to repeatedly pass the namespace into the
make_namespaced_msg() method.  This new RPC_API_NAMESPACE attribute will
be used for the make_msg() call.  It is defaulted to None to match previous
behavior.

Change-Id: Ied62df839cda0be6f9f9b060bbfc22e086f61be8
Specify database group instead of DEFAULT

At the request of Quantum folks, Let us switch from DEFAULT to
database for the database related options. This will help with
migration etc.

DocImpact

Fixes LP# 1171837

Change-Id: If602a6a7cc0f2a202632dd14574fea60dce4b589
Enable hacking H703: Multiple positional placeholders

Fix and enable test for multiple positional placeholders in
localizations

Change-Id: Ie3b5e3113cd0f3340b7b0f5774001893b1e6857c
Enable hacking H702 localization test

Fix and enable test for 'formatting operation should be outside of
localization method call'

Change-Id: I0e707f9d4aacf75f9a9239b323a57d7d39f30c84
Add generic serialization support

This adds a generic serialization model that the RpcProxy and
RpcDispatcher will use to serialize and deserialize arguments
and return values. The base definition is provided, as well
as a default NoOpSerializer which performs no special
action (retaining the existing behavior).

Related to blueprint rpc-object-serialization

Change-Id: I0a33baddee3e28dfc47100eb3216b679558b0bdd
Merge "Enable hacking H703: Multiple positional placeholders"
Merge "Enable hacking H702 localization test"
Merge "Specify database group instead of DEFAULT"
Ignore backup files in .gitignore

Change-Id: I71af28ec8e75f321961826e2653fee9b99a87c1c
Remove rootwrap from IPC directory creation

Removes processutils/rootwrap dependency.
Fixes bug 1160420 and partially fixes 1180631.

The attempt will still be made to create
/var/run/openstack, but will give a reasonable
error when it happens.

If the directory exists, but permissions are denied,
we should also give a reasonable error.

A patch will be submitted to devstack
that will set and create the IPC directory as necessary.
Packagers should do this as well.

Change-Id: I7814320adbfd0b2fe54cc2e523452c18ab2e7687
Merge "Add support for requirements.txt."
Changed processing unique constraint name.

Function `_raise_if_duplicate_entry_error()` modified respectively to
new unique constraint name convention.

We found that current constraint name convention allows us create
constraints with duplicate names. It happens if we will add constraints
in different tables with same column names (for example, `name`,
`deleted`). In this case we can not create new constraint due to mysql
limitation (it requires unique constraint name for database)
To solve this issue unique constraint name convention was changed
from "uniq_c1_x_c2_x_c3" to "uniq_t$c1$c2$c3" where `t` it is table name
and columns `c1`, `c2`, `c3` are in UniqueConstraint.

Function `_raise_if_duplicate_entry_error()` parse error from
database and provides us correct column names in error message.
So now we receive correct error message from function.

Change-Id: I4a507deba97c499fcd9738d980e36ca0f9454b71
Fixes: bug 1182054
Import oslo.config configuration file generator

This is stolen from Nova with a fix stolen from
https://review.openstack.org/#/c/30251/

Obviously the final goal is to stop copying this file into each project and
start improving it, to move it finally in oslo.config.

Change-Id: Ie81a5c3db1dc6092bcc6179ab0ab9499239f0bbc
Signed-off-by: Julien Danjou <julien@danjou.info>
Merge "Changed processing unique constraint name."
Merge "Import oslo.config configuration file generator"