Making docs pretty!

  * Before: http://stsh.me/2Qt
  * After: http://stsh.me/2Qu

Change-Id: Idca673ee6157e62afc1aef76413f2d54ae8e5c9f
Use openstack.common.log to log request id

* Log request id from the request context for glance-api
  and glance-registry
* Further integrate with the common log module by storing RequestContext
  objects in thread-local storage so loggers can acces their attributes
* Move request id formatting into the request module so it appears with
  the preferred prefix (req-) in logs
* Implement bp glance-request-tracking

Change-Id: I2095ad16fef6b4bc8e49229c9f0326da8c743ff7
Updates run_tests.sh to exclude openstack-common.

We exclude openstack-common in tox.ini already. This change updates
run_tests.sh to match that behaviour.

Change-Id: I1bf5784193e63156bc5fe140ad6e403669c7909d
Merge "Making docs pretty!"
Prevent client from overriding important headers.

The glance client offered the opportunity to override
important headers via the features parameter during image
creation or update.

Created a blacklist of unsupported features like:
content-length
content-type
x-image-meta-size

These headers should not be overriden by the client.

Fixes LP Bug #1023892

Change-Id: I14aac59e00a2672fd98f6dab221096ab5de86855
Support zero-size image creation via the v1 API

Addresses LP 1025353 for the v1 API.

Transition image status to active immediately on creation
(as opposed to leaving it queued forever) if the size is set
to zero from the get-go.

The v2 implementation is left unchanged for now, as the image
status does not appear to ever transition from queued to active
in that case.

This change allows an image to be created that simply acts as
a properties bucket, but requires no image data. For example,
an image created from a booted-from-volume instance where only
the kernel, ramdisk ID, and block device mappings are required.

Change-Id: I61e96f3fe5f5245fec791170b4a8b4c72135c3de
Merge "Prevent client from overriding important headers."
Merge "Updates run_tests.sh to exclude openstack-common."
Move checked_iter from v1 API glance.api.common

The checked_iter image streaming wrapper should be in a common
place so the v2 API code can use it as well. This moves it to
glance/api/common.py and gives it a slightly more descriptive
name 'size_checked_iter'.

Change-Id: I9fbf2c76666bfc0b9227a6a6c4d824367526e56a
Fix registry error message and exception contents

The variable image_id should have been used instead of the global
identifier id

Fixes LP Bug #1026072

Change-Id: I2e73810e3165dd8b7032359b5fb8a874e592736f
Replace example.com with localhost for some tests

Fix for LP Bug #1025756.

When running the unit tests on a system without a
direct internet connection some tests run slowly.
Replacing example.com with localhost:0 speeds up
the relevant tests.

Change-Id: Iac6fc506b1d36b18ab21bb956ec2d8acc004bba8
Merge "Use openstack.common.log to log request id"
Match path_info in image cache middleware

The url matching code in the image cache middleware should only look at
the unconsumed path, not the full path. Webob denotes this by using
'path_info' instead of 'path.'

This also adds some tests for the version negotiation middleware to ensure
it is returning a sane path for the image cache middleware to match.

Fixes bug 1026222

Change-Id: I522e2210e2b7272f9bb47602510a2910fa193415
Merge "Fix registry error message and exception contents"
Merge "Replace example.com with localhost for some tests"
Increase wait time for test_unsupported_default_store

Fix for LP Bug #1026047.

Allow unit test 'test_unsupported_default_store' to
successfully run on a slow machine.

Change-Id: I4d49c821aeb3027b7f33babf6c4bafe00644f0c9
Merge "Move checked_iter from v1 API glance.api.common"
Provide stores access to the request context.

Adds context to the constructor for the Store class. This can be used
to provide Store's access to the RequestContext.

Includes the following changes:

* Updates common store helper methods to create new instance of
  Store objects for each request.

* Updates Glance scrubber to create a real context from credentials.

The motivation for this change is that we will need access to the
service catalog and token for the Swift multi-tenant backend.

Partially implements blueprint: swift-tenant-specific-storage

Change-Id: I3def2b7c4085a36dd6c0961e762783ebaf7ffa74
Adds multi tenant support for swift backend.

Updates the swift store to support multiple tenants:

 * Added configuration option for swift_store_multi_tenant.

 * Updated the swift connection creation logic so that in multi-tenant
   mode the token and storage URL from the service catalog are used
   to create swift connection.

 * When in multi-tenant mode locations URL's (stored in the DB) do
   not contain hard coded swift credentials.

Includes unit tests to verify multi-tenant swift storage URLs.

Partially implements blueprint: swift-tenant-specific-storage.

Change-Id: I45fc97027e6f211ac353513c2d9d6da51ccf4489
Make functional tests listen on 127.0.0.1.

Fixes bug 987399.

Change-Id: I2a393d9b01c8ae17f289941530a1d4319b174f87