Remove microseconds before time format conversion.

Updates Glance scrubber so that it chops microseconds off of the
date format before parsing a time format string. This fixes
an exceptions that can occur when using scrubber with databases
like PostgreSQL which include microseconds in date strings.

Fixes LP Bug #1022369.

Change-Id: I2e9eb66052d8ce34438a4c1ba7a5174cc2385bcf
Removing 'Indices and tables' heading from docs.

  * Bug 955475

Change-Id: Ibcd2d2ed535a548d76c8afad54673135c20c8232
Making docs pretty!

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

Change-Id: Idca673ee6157e62afc1aef76413f2d54ae8e5c9f
Add openstack-common's local and notifier modules

Change-Id: I90e063934d64598b440676b63b4be55262f923f1
Adds service_catalog to the context.

Updates the ContextMiddleware so that it stores the service_catalog
which from set via Keystone's auth_token middleware.

The motivation for this change is that we'll need access to the
'object-store' endpoint in order to implement swift tenant specific
storage.

Partially implements blueprint: swift-tenant-specific-storage

Change-Id: I0389e135f6683a353ae915b543d70f6ac1246b2c
Make get_endpoint a generic reusable function.

This patch refactors the get_endpoint function to make it more generic
and top level so that it can be more easily accessed and tested.

Adds service_type, endpoint_region, and endpoint_type options to
the get_endpoint function as well.

Added a new test suite specifically for get_endpoint.

The motivation for this change is that we'll need to be able to
parse the 'object-store' endpoint for each tenant in order to
enable multi-tenant storage in the swift storage backend.

Partially implements blueprint: swift-tenant-specific-storage

Change-Id: Icf773a1eb057fc9d65cf54890afa4638f2aee0b4
Merge "Removing 'Indices and tables' heading from docs."
Update 'logging' imports to openstack-common

Change-Id: Ia1a7b5062e7f882971f2061274f6a4a44cfc8ced
Merge "Remove microseconds before time format conversion."
Merge "Update 'logging' imports to openstack-common"
Merge "Make get_endpoint a generic reusable function."
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