Simplify v2 API functional tests

Remove overly-verbose and duplicated test coverage from
the v2 images functional tests.

Change-Id: Ie6b8057f1d73fd3f1d85e862d3072fc270aef5bd
Allow admin's to modify image members.

Updates the v1 Glance API and Registry controllers so that admins
can modify image membership regardless of image ownership.

The motivation for this change is to be able to test image membership
when noauth middleware (UnauthenticatedContextMiddleware or
FakeAuthMiddleware) is being used and includes the following changes:

 * Added is_admin option to FakeAuthMiddleware.

 * Refactors the access checks into a common function called
   _check_can_access_image_members.

 * API unit tests which require is_admin=False for noauth were also
   refactored to use an improved FakeAuthMiddleware which supports
   is_admin = False.

 * Update RegistryClient to use get_status_code int for 204 status code
   comparisons. Fixes issue where incorrect status code was returned.

 * Updated members unit tests to support these changes.

Fixes LP Bug #1021740.

Change-Id: I9d0e4679f9c0cb37f6df7c6f90460c22c37f3fbd
Add function tests for image members.

Updates the bin/glance test suite with support for testing image
members.

Change-Id: I3e9ba6c59ebc5969b1cee8773c2b6610c1968872
Expose owner on v2 image entities

Expand v2 image serialization to accept and return the 'owner'
attribute. All image entities have an owner attribute, while only
admins can provide it in a request. Related to bp api-2.

Change-Id: I8746574528c8be1f17cf570c91ba6bd7ef27b032
Merge "Simplify v2 API functional tests"
Report size of image file in v2 API

Size will be None until image data is uploaded. The size attribute
will be updated to reflect the actual size. Related to bp api-2.

Change-Id: I577d8005b9ce60bf1470cda43413f0cdc034dbe1
Keystone dep is not actually needed.

An end user might need to install keystone to use the default config,
but glance testing uses stubbed out fakes.

Fixes bug 1021798

Change-Id: I99da75d29ba483125518760126d6145310ae1479
Ignore openstack-common in pep8 check

Change-Id: Ic48b12918f8e3ca439917a614927b41cd099c63a
Merge "Ignore openstack-common in pep8 check"
Add openstack.common.log

Change-Id: I3827a319db649a2264aa260cd964e0a093fef524
Merge "Allow admin's to modify image members."
Reorganize context module

* Move RequestContext class to glance.context
* Move context middlewares to glance.api.middleware
* Update tests to reflect move
* Update paste configs

Related to bp glance-request-tracking

Change-Id: I289b546ec28c973a3022be779ce378ae2febb340
Generate request id and return in header to client

* Generate a uuid in RequestContext.request_id on init
* Present request_id in an 'x-openstack-request-id' header using
  process_response in the ContextMiddlewares
* Related to bp glance-request-tracking

Change-Id: Idd9b86661322250b6167a1ee23e5baae91066ff6
Initial implementation of glance replication.

* Add the glance-replicator binary
* Initial implementation of bp image-replication

Change-Id: I7dabbd6671ec75a0052db58312054f611707bdcf
Merge "Add function tests for image members."
Merge "Initial implementation of glance replication."
Add bin/glance-replicator to scripts in setup.py.

Fixes LP Bug #1023182.

Change-Id: I7c5627b4b3390b500e159edace02bdd0417fc59e
Port the swift healthcheck middleware to Glance

Can be used as a first port of call to determine if a Glance API /
Registry server is running properly.

The main part of this code is taken directly from Swift.

Notes / additions:

* Added the healthcheck to each of the default pipelines in
  glance-api-paste.ini / glance-registry-paste.ini.

* Updated tests.unit.test_config to account for the updated default
  configuration.

* Updated references to the default pipeline in the documentation to refer to
  the new default.

* Added a section to doc/source/glanceapi.rst to describe the new
  functionality.

* Added a new module glance.common.middleware to house the healthcheck,
  as this middleware is common to both the Glance API and Registry.

* Added a new functional test for the healthcheck not currently present
  in Swift, which tests the middleware in the pipeline through a running
  Glance API and Registry server.

Change-Id: I406b5820c4a09658b012d9681d2faa938d81baac