Added unit tests for api/middleware/cache_manage.py

blueprint glance-cache+unittests
Change-Id: I4382bb37795d42f43e3ddf9f95f13bb76400e1bb
Sync with oslo-incubator (git 6827012)

This syncs the common/ modules with oslo-incubator, which
brings a few hacking fixes and py3k compat fixes.

Change-Id: I948aafebd25ae0b3aad119c41d0a121c8b9c5ae8
Oslo sync to recover from db2 server disconnects

A checkout listener can be added to sqlalchemy to be able to
handle database disconnect pessimistically and avoid an error in
the event of a DB restart or simply a temp connection issue due
to network glitches. At the moment only mysql is enabled with
this feature. This patch enables db2 as well.

Oslo version in change I5563360b43c4b648f5b035099b0e1d2e71d32503

Partial-Bug: #1231657
Change-Id: I218ef9836f2e0f135897007d2e53354eb1248422
Align glance-api.conf rbd option defaults with config

DocImpact: The example glance-api.conf set different defaults than
what was hardcoded in the code. Change code defaults to those
in the config.

Preparation for generating glance-api.conf with oslo.config generator.

Change-Id: I424e6c5984dbdf5082852c40d97ab1e1a04926ea
Merge "Sync with oslo-incubator (git 6827012)"
Merge "Added unit tests for api/middleware/cache_manage.py"
Merge "Oslo sync to recover from db2 server disconnects"
Merge "Align glance-api.conf rbd option defaults with config"