Catch pruner exception when no images are cached

This handles a situation where the pruner would raise an exception when
the image_cache_max_size was set lower than the size of the last image.

Fixes bug 1039854

Change-Id: I4a6c164e9f821f1250314974f829f058fbd02863
Add test for nonexistent image in db layer

Related to bp glance-simple-db-parity.

Change-Id: I1fcfa80089937e9dec9d637f2227561febb43183
Expand image_create db test

Ensure the test that checks for default values when calling
image_create is expecting the right things. The simple db driver
needed some love to get it to pass the thicker test.

Related to bp glance-simple-db-parity

Change-Id: I80f0ee55ff5ec18e544b91bed218e8c6e3b06a84
Raise Duplicate on image_create with duplicate id

The simple db would allow a user to create new images using IDs
that belonged to existing images. This patch corrects that behavior
and adds a test.

Related to bp glance-simple-db-parity.

Change-Id: I42a036f81e61413e789d87100f58b45b8cc75d38
Limit simple db image_create to known image attrs

Ensure image_create requests are limited to a list of known
image attributes.

Related to bp glance-simple-db-parity.

Change-Id: I8314f31dcf87c87ee3bba89334be33dc4a1555b2
Clean up comments in paste files

* Reduce comments in paste files to just what is necessary
* Add a 'cachemanage' pipeline to complete our set of paste
  deploy flavors in glance-api-paste.ini
* Add a sample [paste_deploy] section to both glance-api and
  glance-registry configs

Related to bp glance-folsom-docs-cleanup.

Change-Id: I0208b12f6861b48e52260b25802c47ebf6316b9a
Document how to deploy cachemanage middleware

Related to bp glance-folsom-docs-cleanup

Change-Id: If72a82222ebf33b08bbceba2d780bddfe7b7aad0
Delete image from backend store on delete.

Two things have been done for this patch, schedule_delete_from_backend has
been split into two functions: safe_delete_from_backend and
schedule_delayed_delete_from_backend. If the API is not configured for
depalyed delete safe_delete_from_backend is called, which immidiately
deletes the image from the backend store and status set to deleted.
Likewise, if the API is configured for delayed delete,
schedule_delayed_delete_from_backend will be called which writes out a new
file in the scrubber_datadir named with the image id and containing the
backend uri and delete time. The image's status is then set to pending_delete
and the scrubber will then delete the image at the appropriate time.
The other main change is pulling the status updates out of the backend delete
functions. In this case they are done in the API after each respective type
of delete. All other changes were around testing and dependancy injection,
specifically the ability to inject a fake StoreAPI.

Fixes bug 1039897

Change-Id: I8a13b8c302b13ba219b1edcc128d02481ed7666e
Use PATCH instead of PUT for v2 image modification

With the previous partial put syntax in the v2 api, it was not possible
to delete image properties. This patch provides a more expressive syntax
in the form of the HTTP PATCH verb. This implementation depends on the
`application/openstack-images-v2.0-json-patch` content-type which is
intended to be a compatible subset of application/json-patch.

Addresses bug 1039821.

Change-Id: I510ab397f9b8b5bd1deec0fb25855e305e7ec86e
Drop glance client + keystone config docs

The blurb about configuring glance client doesn't belong in the
server project documentation. This removes it.

Related to bp glance-folsom-docs-cleanup

Change-Id: I3932e1af382813bf069f4920218dd60cd04790f5
Merge "Use PATCH instead of PUT for v2 image modification"
Merge "Delete image from backend store on delete."
Merge "Drop glance client + keystone config docs"
Merge "Document how to deploy cachemanage middleware"
Merge "Catch pruner exception when no images are cached"
Merge "Add test for nonexistent image in db layer"
Merge "Expand image_create db test"
Merge "Raise Duplicate on image_create with duplicate id"
Merge "Limit simple db image_create to known image attrs"