Leave behind sqlite DB for red functional tests.

We leave behind the sqlite DB for failing tests to aid in diagnosis,
as the file size is relatively small and won't interfere with subsequent
tests, as it's in a per-test directory (which is blown-away if the test
is green).

Change-Id: I90be433fc6f02234b1118a547ea0b5524238161d
Remove unused imports in setup.py

Change-Id: Ifb08695a8a9a264a3032ae09524e8b37fa0dd761
Lock pep8 to version 0.6.1 in tox.ini

Change-Id: Ib88f57a08bb8ba8bd7970300716d84a2a2e2a411
Lock pep8 at v1.1

Update offending files to pass pep8 v1.1 and lock our deps on this
new version.

Change-Id: I5380f213f8e2f62d75f513c8b4496f78fc692dad
Fix integration of image properties in v2 API

The (de)serialization of images in the v2 API expected a db-like
properties list in some cases, while in others a flat dictionary. This
patch aligns the code by ensuring the properties dictionaries are
normalized before being passed in and out of the controller.

* Expands the images functional test case to cover this integration point
* Cast all images to dictionaries before returning from the controller
* Related to bp api-2

Change-Id: I8b09677f622151330630fc7b0267f0549bb1a458
Merge "Remove unused imports in setup.py"
Add allow_additional_image_properties

Implements bp:api-v2-user-properties

Change-Id: I26378e9f4e8d0f53898f4665bad89922c0b5792a
Merge "Leave behind sqlite DB for red functional tests."
Merge changes I26378e9f,I8b09677f

* changes:
  Add allow_additional_image_properties
  Fix integration of image properties in v2 API
Enable anonymous access through context middleware

Certain deployments need to allow anonymous access to its
images. This patch allows a user that has failed to authenticate with
Keystone to access the API in read-only context.

* Configure through 'allow_anonymous_access' option, defaults to False
* Implements bp api-v2-anonymous-access

Change-Id: Ia8f57e54bd141a2da1ca4600d1970558fb497f67
Sync with latest version of openstack.common.cfg

Changes since last sync:

 - make reset() clear defaults and overrides
 - automatically create option groups
 - allow options to be marked as required
 - use a list comprehension instead of map()

Change-Id: I20d8b2e7a1fa0080398eaa8e03b0b6d48e7c2a29
Expose timestamps on image entities in v2 API

* Add created_at and updated_at to image entities
* Ignore these timestamps on create & update
* Related to bp api-2

Change-Id: Iff0345de891e928367227f1a46f05e28b95de298
Merge "Lock pep8 at v1.1"
Merge "Expose timestamps on image entities in v2 API"
Merge "Sync with latest version of openstack.common.cfg"
Add additional info. to image.delete notification

Add additional information to the 'image.delete' notification payload
to simplify external usage tracking systems.

Please note that this is not a backwards-compatible change as the
old payload was simply a string consisting of the image id.  This
converts the payload to a dictionary.

Change-Id: I641b7de91fcc14dc3c81ec942aeb0acf5a63d128
Expose tags on image entities in v2 API

Enable users to set and view tags on image entities. Before, a user
had to navigate to the /tags subcollection to interact with image tags.
Additionally, this refactors the image_tag_* methods to return strings
rather than sqlalchemy objects.

* Related to bp api-v2-image-tags

Change-Id: Ifdebe9b660f78bee5fda798a1f83e384a8220049
Merge "Enable anonymous access through context middleware"
Add a base class for tests

This base class will allow us to DRY up the config setup and teardown.

Change-Id: I49fff259a38657110a4117134b1a8bd728404269
Add read-only enforcement to v2 API.

Provide a new @mutating decorator to provide a concise marker for
operations that should not be accessible to a read-only request.

Related to bp api-v2-anonymous-access

Change-Id: I52710083b4f112d2429afe4faa0660e2a6822929