Move wsgi.Service socket creation into the constructor.

This allows wsgi.Service to be used with service.ProcessLauncher

Fixes Bug #1156182

Change-Id: I71714d243c8a1b90c7bc1006ca2ad1e8c4b30e57
Import nova's looping call.

The looping call implementation had drifted in nova away from what
was in oslo. Update olso. I will move nova over to this code in a
later review.

Change-Id: I0e9214a150223dcd4fb1d695db36961bba794166
Finds dependencies of configured modules for update.py

Looks up import lines in the configures modules and finds dependencies.
Did not load modules since it seemed as an overkill

Fixes bug #963509

Change-Id: I690cdf6fb149bbe243add3a35b96f6045ebe10f4
Merge "Import nova's looping call."
Merge "Finds dependencies of configured modules for update.py"
Replaces standard logging with common logging

Common modules can now safely import other common modules
since update.py will automatically install dependencies.

Change-Id: I0ad12d7e6e623657c40659aca4148439cd03d3fa
Replaces the standard uuid with common in the context module

Common modules can now safely import other common modules
since update.py will automatically install dependencies.

Change-Id: I9fca5959581ae4f4ab3da20caabbe9c0d53247b6
Optimise to_primitive common cases

to_primitive included many checks that were executed before any usual
types have been checked. It's safe to reorder / duplicate the most
common ones. Especially built-in types can be checked before other
more complicated scenarios. This is important since to_primitive gets
called over a million times in usual test run and many more times in a
live environment.

This change strips around 4% of nova testing time on my machine and the
function itself is ~5x faster on average according to the profiler.

Change-Id: I71e0c06bbcc31793a1cdcebb36d4e3d8c5876f73
Incorrect logging setup - duplicating root handlers

Stop adding the log handlers from the root logger to the logger specified via
the default_log_levels configuration setting. If the handler should dispatch
a event then it will do it once for the specified logger and once for root
logger thus duplicating the event.

Change-Id: I1a7880322ff53cbdf8048e1d805511ca76929ee3
Support for lazily instantiated loggers

As part of code review for LP #1161031, there was a suggestion
to lazily instantiate the logger in oslo. The use case was when
creating LOG at a module level when we have not yet called
logging.setup, we needed a way to delay creating actual loggers

Added a handlers property in ContextAdapter so the existing testcase
can be used for lazy loggers as well

Change-Id: Iae2e379f8a0d2d38836645e7648294dee97deaaa
Fixes private functions private

Fixed functions below to private APIs.

raise_if_duplicate_entry_error()
raise_if_deadlock_error()
wrap_db_error()
synchronous_switch_listener()
add_regexp_listener()
greenthread_yield()
ping_listener()
is_db_connection_error()
patch_mysqldb_with_stacktrace_comments()

Fixes bug #1119709

Change-Id: I61f700cdbae0126a8b89f6895e4332d695191dd0
Removes created_at, updated_at from ModelBase

Created a 'TimestampMixin' class.
Next step is to update Nova which is the only project using oslo.db

Fixes bug #1119702

Change-Id: I1ffcc09a2971e6e6102da7ecb855a2837a159baf
Add rpc method namespace support.

RPC endpoints already had the ability to expose multiple APIs ... sort
of.  You could pass multiple callback objects to the dispatcher and it
would check all of them for a method call.

This patch adds the ability to set a namespace on a callback object.
This makes exposing multiple APIs a bit more like you would expect it to
work.  You can invoke a method on a specific callback object, as opposed
to having it check all of them for the method.

This will allow you to create, manage, and version APIs without any
potential conflicts with other APIs being exposed by the same endpoint.
An example of where I would like to use this is in Nova, where we have
some methods that we would like to expose on *all* rpc endpoints.

This includes no public API changes and is fully backwards compatible.

Implement blueprint rpc-multi-api.

Change-Id: Ief4433e2e1c32cfb05b4cd27b87fe32b40f4341d
Merge "Add rpc method namespace support."
Merge "Incorrect logging setup - duplicating root handlers"
Merge "Replaces the standard uuid with common in the context module"
Merge "Replaces standard logging with common logging"
Merge "Removes created_at, updated_at from ModelBase"
Removes metadata from ModelBase

Next step is adding metadata to nova.db.sqlalchemy.models.NovaBase

Fixes bug #1119699

Change-Id: I306a061e0b17660f612a111067ac618342f4ee99
Improve Python 3.x compatibility

Mechanical translation of deprecated constructs
to 3.x compatible variants.

Change-Id: I4988d0ac656903e0d0320aaa8361d4eeb774a0f9