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
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
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
Add caching to openstack.common.cfg

Speedup of 'nova list' benchmark by up to 40%, eliminates 3 lines in
top-10 cProfile methods.

Change-Id: I2d4636f94d88b4a7e38d1565fdd4d1b8a89e560e
Some refactoring of the cfg cache

A fairly misc bunch of changes:

 - init cache before registering config-file and just let
   register_cli_opt() clear the empty cache

 - use @__clear_cache on set_default() and set_override() since
   these are just used by the unit tests and doing so allows us
   to kill _remove_from_cache()

 - use @__clear_cache on reset() too

 - remove recursion from _get() and the substitute param

 - just use (group_name, opt_name) as the cache key

Change-Id: I66934e748eca9ec03e44d7f80a7e10d96a77d8eb
Provide file extension when when looking for files

* Allow an extension to be passed to find_config files, defaulting to '.conf'

Change-Id: I022a3b28d9067158e9ed0da741a5e72cb73af167
Fix ordering in HACKING.rst

Already fixed in nova.

Switched:
from nova.endpoint import cloud
import nova.flags

Change-Id: I5d4f64d0710c8bb12031c3960401f6d6d2a67843
Update exception from importutils.import_class().

Update the message included in the exception from
importutils.import_class() to include what the inner exception was.
This is quite helpful as the real error may not have been that the class
was not found.  It may have failed to import the module that contains
that class, and it's nice to know that and why that happened.

Change-Id: I085864d230b46adce8921e362f058f9421a5a674
Support for directory source of config files

Implements bp cfg-config-dir

Allow multiple config files to be pulled in from a config directory,
as opposed to individual config files being explicitly enumerated.

This logic is enabled using the --config-dir=/path/to/config CLI option,
causing config to be retrived from all matching /path/to/config/*.conf
files.

Sections may be re-opened across config files, and all config items
must reside in an explicitly specified section (i.e. it does not default
to [DEFAULT]). This behavior is unchanged.

Change-Id: Ia29dffe82dfb4742dcf3e8d36b376d906a2492cf
Handle authors existed before VCS was around.

Bug: 976267

The list of such authors are stored in AUTHORS.in file. When
auto generating AUTHORS file, include them as well.

* openstack/common/setup.py
  __doc__: For all methods, remove space and include period.
  generate_authors(): If AUTHORS.in file exist, append the
  content to AUTHORS file.

Change-Id: I05da1e561383cc151e7ef34e75a4600e3afdda6e
Merge "Update exception from importutils.import_class()."