Add greenthread local storage model from nova

Thread local storage is obviously a very useful facility to have
available.

Nova has a very simple API for this which uses eventlet's corolocal
module and weakrefs. This looks to be generally useful and complete,
so let's pull it into openstack-common.

Change-Id: I52a08124297c9cb79def447436859bd8d2c0b622
Add auth_str_equal() to common utils.

This function provides a constant-time string comparison.  Its primary
use case is for authentication to avoid timing vulnerabilities.  Similar
functions currently exist in keystone, nova, and swift.  The three
diverged in slight ways immediately after going in.  This version comes
from keystone, which I consider the "best" version to promote to
openstack-common.

Change-Id: I39537a21be8a402e34e526466f6b90188344a35d
Avoid leaking secrets into config logging.

Implements bp cfg-password-options

Allow options to be declared secret so that their value is
obfuscated before logging.

Change-Id: Ie2168d218b029d9c12fa5b48342cd5b17b2cc77a
Finish implementing MultiStrOpt

Fixes bug 955308

Previously only multiple string options from the CLI were supported.
This change adds support for config files too and merges the results
from both CLI and config files.

Change-Id: I642408c03ed295fac050105fd4380940e876f228
Merge "Avoid leaking secrets into config logging."
Merge "Finish implementing MultiStrOpt"
Added a universal style-guide for all OS projects.

Pursuant to a recent mailing list discussion, this file contains
the union of all style recommendations from varions openstack
projects.  The file will be removed from individual projects.

Change-Id: I79c118ff749d7c89d7d88302279ec8cb1530868d
Make 'yes' also a true boolean

Adds yes, Yes, and all other capitalizations as a true boolean.
Updated unit tests to test for these.

Change-Id: I97915f870dd6bba612f74f0ceb78f2399fd81a93
Add generic PasteDeploy app and filter factories

These generic factories allow us to dump copied and pasted
app_factory and filter_factory methods.

The main difference is the paste configuration changes from:

  [app:myapp]
  paste.app_factory = myapp:app_factory
  ...
  [filter:myfilter]
  paste.filter_factory = myapp:filter_factory

to this:

  [app:myapp]
  paste.app_factory = openstack.common.pastedeploy:app_factory
  openstack.app_factory = myapp:App
  ...
  [filter:myfilter]
  paste.filter_factory = openstack.common.pastedeploy:filter_factory
  openstack.filter_factory = myapp:Filter

Apart from reducing code duplication, this will also allow us to have
the generic factories inject other data into the apps and filters.

This could implemented as a new feature in PasteDeploy itself - e.g.
allow the loadapp() caller supply a python object which is passed on
to the factories.

In the meantime, Glance has code like this to pass a ConfigOpts instance
to factories. Keystone is moving a similar way, as will other projects
as they move away from a global config object.

Change-Id: I928d1f6da154f0f41edd624e25b8918a0e12cb28
Use absolute import for iniparser.

Fixes bug 967400

Change-Id: I0c028f6b5285cd641dedbcea3132224e404b004e
Create openstack/common/__init__.py

Fixes bug 967808

Change-Id: Ic4c1fc5520cb96f40b6ed87bfff024906f983235
Typofix, OptionGroup should be OptGroup.

Change-Id: I67473bb847759ce719876e08f8a894e000f11bb3
Merge "Make 'yes' also a true boolean"
Merge "Add greenthread local storage model from nova"
Create openstack.common.timeutils.

Split time related utility functions out of openstack.common.utils into
a new module, timeutils.

Change-Id: Ic09952cd48e0b4548e410926cc456cbd515a4e56
Merge "Add generic PasteDeploy app and filter factories"
Merge "Create openstack.common.timeutils."
Move auth_str_equal() to a new authutils module.

This patch moves auth_str_utils() to a new module, authutils, for
helper functions related to authentication.

Change-Id: I83f174486269701deed3500f890832a71ff3e315
Change behavior in utils.import_object().

Fix bug 972859.

Prior to this patch, utils.import_object(foo) and
utils.import_class(foo) would return the same thing if foo was the path
to a class.  This patch changes utils.import_object() to return an
instance of the class, instead, also allowing you to pass in arguments
to the constructor.

This patch also removes the odd behavior of import_object() to be able
to also import a module.  Instead, a new function import_module() has
been added.

Finally, the three import helpers have been moved to a new module,
importutils.

Change-Id: Ia2ea64c965692f8c3a29adec332dd93a83980070
Add AUTHORS generation function.

Change-Id: I0adbf0755a0191c7b68af9ca2f6e50c787ee7043