Trivial: Make vertical white space after license header consistent

Vertical white space between license header and the actual code is not consistent
across files. It looks like majority of the files leaves a single blank line
after license header. So make it consistent except for those exceptional cases
where the actual code starts with a function or class definition.

Change-Id: If6679ab19dc2d7a9df93e076db3019abc1e5b86b
Fix spelling errors in comments

Change-Id: I5ba98f37359ac0b1eaa71de6bf2283508790abf4
Cleanup unused log related code

Not all modules need log function,but there are abused imports
codes for log. Let us clean up them.

Closes-Bug: #1265962
Change-Id: Icd4dc6f9d60cd829e5cd352f00144adb82cf8306
Linked Request IDs

As discussed at the Icehouse Summit, provide a means to
link request IDs across service calls. The linkages
should be marked via logging and notifications.

Implements: blueprint cross-service-request-id
Change-Id: Id085c4444fee2bb68b80738bfe77ccb0ba1908ec
Add error type to unhandled exception log message

Whenever an unhandled exception is thrown, only the exception value is printed
as part of the log message. Printing just the value is sometimes not very
helpful to identify the problem. eg., in case of KeyError, only the 'key_name'
would be printed as part of the log message.
This commit includes the exception type along with value while logging an
unhandled exception.

Change-Id: Ibf00173a07510b2ec0c81a29624004f17810a4e4
Closes-Bug: #1265561
Add common methods to cliutils

Find_resource, service_type, get_service_type, pretty_choice_list,
import_class, import_versioned_module and exit methods used in several
openstack clients, so to prevent code duplication we need port it to
common code.

* Method find_resource used in ceilometerclient, cinderclient, glanceclient,
ironicclient, keystoneclient, novaclient, troveclient and tuskarclient;
* Methods service_type and get_service_type used in cinderclient, novaclient
and troveclient;
* Method pretty_choice_list used in ceilometerclient, cinderclient,
glanceclient, ironicclient, keystoneclient and novaclient;
* Method import_class used in cinderclient, neutronclient and novaclient;
* Method import_versioned_module used in ceilometerclient, glanceclient,
heatclient, ironicclient, marconiclient and tuskarclient;
* Method exit used in ceilometerclient, glanceclient, heatclient,
ironicclient and tuskarclient.

Related to blueprint common-client-library-2

Change-Id: Id9b2f432a73c5cbb9a8a1b26fec3b3a9e6fff94f
Make the log capture in tests more configurable

Use OS_LOG_CAPTURE to turn off log capturing entirely
and OS_DEBUG to control the log level being used.

Change-Id: If8254170087d4f9c312877026ff19a86ac557e53
Add method quote_plus in module py3kcompat.urlutils

Method quote_plus is used in some projects. We need add this method
to work with Python 3. This is an example:
https://github.com/stackforge/stackalytics/blob/master/dashboard/helpers.py#L174

Change-Id: I15ed496d947cf2b56eb6645b6b85c0745ab4f682
safe_log Sanitize Passwords in List of Dicts

sanitizes password fields found in lists of dicts for messages
before logging.

Change-Id: Ic3c3f7d43570fe99411a3f6bf9ef70de44104c53
Closes-Bug: #1268459
Remove "vim: tabstop=4 shiftwidth=4 softtabstop=4" from headers

This was removed from the the following files:
 - openstack/common/db/sqlalchemy/provision.py
 - openstack/common/notifier/proxy.py

Change-Id: If5a73cb6a5039d04c79a343851f77f76335ec3a5
Run tests/unit/test_funcutils.py in PY3 enviroment

Fixed `func_closure` usage in openstack.common.funcutils module
and `func_code` usage in tests/unit/test_funcutils.py file.

Related to blueprint make-python3-compatible

Change-Id: I68d206c5fdb4143c7618449b83d102145e6ba54e
Implement cache abstraction layer

This patch implements a cache abstraction library that can be extended
and supports multiple back-ends.

The patch being submitted defines the library's API and implements a
first in-memory back-end, which is the default one and can be used for
development purposes.

Configuration variables
=======================

The library introduces 1 optional configuration variable:

    * cache_url: The cache url. For example:
        memory://?default_ttl=2

`cache.register_oslo_config` needs to be called explicitly with a
ConfigOpts instance in order to register this parameter. The library can
be used without oslo.config.

Installing back-ends
====================

Back-ends are loaded using stevedore, which means, they most be
installed as entry_points under the `openstack.common.cache.backends`
namespace. See `setup.cfg`.

NOTE: Some of the ideas where taken from Django's cache library and others
from Oslo's memcached module.

Implements blueprint cache-backend-abstraction

Change-Id: Ic2a84ecef949fb28a7d05fe1b2c54ca91da3983c
Remove unused variables

Refactor codes, remove unused variables. This patch is the first step.
F841 check in tox.ini will be enabled to make sure that there are no
userd variables in project anymore.

Change-Id: I3edd5bb5e3c203d1d3d92261ed74a201878d6f5a
Partial-Bug: #1268234
strutils bool_from_string, allow specified default

In certain cases, we may want to return true by default, e.g see
the discussion in https://review.openstack.org/#/c/65725/, so provide
a "default" argument which can be used to override the existing default
False response.

Change-Id: I6c86b03125f263cf4843b4cf1addf9e9812f53a8
Merge "strutils bool_from_string, allow specified default"
Merge "Remove unused variables"
Merge "safe_log Sanitize Passwords in List of Dicts"
Merge "Add method quote_plus in module py3kcompat.urlutils"
Merge "Run tests/unit/test_funcutils.py in PY3 enviroment"
Replace rpc/impl_zmq maintainer

Eric Windisch is no longer maintaining the impl_zmq driver.
Paul Mathews and Mike Wilson have agreed to share
maintenance duties.

Change-Id: I66225e65d049326adeb4ac7cffd24e261c613b80