Modify the v2 image tags to use domain model

A small patch to extend the work of porting v2 controllers to the new
domain model.

Part of implementing bp:glance-domain-logic-layer

Change-Id: I4fa4105f3862822a4bec869b3b72c5751160f9d3
Update common openstack code from oslo-incubator

* Update to oslo-incubator commit b17b268a269c4989d76267db5c2d49d4c20bd51d.
* Update usage of 'deferred_version_string' to 'cached_version_string'
* Add context values 'user' and 'tenant' for context-logging
* Remove prefixes that resolve to '%prog' in --version CLI output

Change-Id: I24d9a24ad1a6e9379008ea719c9cbd22899111f9
Merge "Modify the v2 image tags to use domain model"
Set content-length despite webob

Webob has a tendency to wipe out the content-length we set on responses.
This causes eventlet to use chunked transfer encoding. By changing the
order of operations, however, we can trigger eventlet to use the simpler
and more informative Content-Length header.

Change-Id: I0ed27c9e668a538bc0fc29cb6e9127dfb7fd8c78
Merge "Update common openstack code from oslo-incubator"
Relax version constraint on Webob-1.0.8

And set it to WebOb 1.2 or later instead. This is consistend with requirements
in other projects.

Change-Id: I3f6c2a632d933b31baa781e367eaf615cb7b8ee9
Update v1/images DELETE so it returns empty body.

Fixes an issue in the v1/images controller where a delete
response would contain a 'null' string instead of an empty
request body.

Fixes LP Bug #1098651.

Change-Id: I1a6610fe92e3a7f1221ca6f3e5f9e2c5e6130fbe
Add import for filesystem_store_datadir config.

Adds a missing CONF import for the filesystem_store_datadir.
This is required in order to make the policy tests (test_policy.py)
run as a stand alone suite.

Fixes: NoSuchOptError: no such option: filesystem_store_datadir

Fixes LP Bug #1098670.

Change-Id: If8f9db3962b070e7841e4e3ef531dda4645624b7
Remove unused declaration in images.py

Change-Id: Ief73484594f7fe0d80ffeb64b494f1691716418b
Stub out find_file... fix policy.json test issue.

Updates test_policy.py so that we stub out find_file
which is used to find the *default* policy file. This
fixes an issue in the test_policy_file_default_not_found
test where it *may* fail when executed on a machine with
Glance package(s) installed (thus created a file in /etc/glance/
that isn't readable by the test user).

Fixes LP Bug #1098687.

Change-Id: If2912d40608ffb07f457454fdc6ebc56c62f6eaf
Merge "Add import for filesystem_store_datadir config."
Use testtools for unittest base class.

While doing this, remove some of the nose-isms, which don't play nicely.

Part of blueprint grizzly-testtools

Change-Id: I9ea398b25195ad5f9c5db876c3dbb49ef4a5ee99
Update version code from oslo.

Change-Id: Ibe96c6783203dc01d231c5ba990159a089ee27ba
Merge "Update v1/images DELETE so it returns empty body."
Merge "Use testtools for unittest base class."
Merge "Stub out find_file... fix policy.json test issue."
Merge "Relax version constraint on Webob-1.0.8"
Merge "Update version code from oslo."
Replace custom tearDown with fixtures and cleanup.

testtools.addCleanup is a more resilient way to perform cleanup activities,
as it will continue to clean things up even if there are unforseen problems.

Specifically, replace custom management of tempdirs with fixtures.TempDir
and replace tearDown methods that can be easily replaced with calls to
addCleanup in the setUp method. There are at least two temp dir creations that
did not have a corresponding cleanup in this patch, which is another reason
for using useFixture(fixtures.TempDir) instead of calls to mkdtemp.

Part of blueprint grizzly-testtools.

Change-Id: I4eb548010612bd5a8d30e8e2304fa66d3d5ffb7c
Make v2 image tags test not load system policy

Since commit 74a8601, I'm seeing this test attempting to load
/etc/glance/policy.conf.

Switch to using IsolatedUnitTest which copies the policy into a
temp dir.

Change-Id: Ibd84ed753de5abf91ee597918ba56130ddd0550e