Parse JSON Schema Draft 10 in v2 Image update

* Add new content type to PATCH /v2/images/<id> to represent support of
  JSON Schema Draft 10: application/openstack-images-v2.1-json-patch
* Remain backwards-compatibile with existing content type
  that supports Draft 4: application/openstack-images-v2.0-json-patch
* Fixes bug 1102476

Change-Id: Iff4e8753a71457ad5a828553fcb0791b0f1c0445
Set status to 'active' after image is uploaded

Fixes bug 1034787

The recent change I made to image_data and the domain model caused this
bug to regress. This change adds assertions to the functional tests in
the hopes of preventing future regressions.

Change-Id: I02f9a5c51f54c0c778e032500079aa13ab073e3e
Add PostgreSQL support to test migrations.

This commit adds support for running the migrations tests
with a PostgreSQL backend.

Migration 012 was changed because PostgreSQL's constraint
drop uses a different name to identify the foreign key
to be removed. The migration now handles it properly for
both postgres and mysql.

Change-Id: Ie8850608fc5f4bccda57a0b12c3b4adc8d1f61d0
Add pre and check phases to test migration 004

Assure that the new column is included and with the right size and no data is
missed during the process.

Change-Id: I836e9ab5ec8219f2056d755585a9e58facd23901
Add pre and check phases to test migration 005

Migration 005 changes size collumn from integer to BigInteger. This checks if
everything goes fine in the migration.

Change-Id: Ia4f12e3d43d7fcc31dc999bc1ad5dcd0610df597
Added better schemas for image members, revised tests.

Related to bp glance-api-v2-image-sharing

Change-Id: I01c7fdb78177aaee97f6e7836dea3326b57be33c
Merge "Parse JSON Schema Draft 10 in v2 Image update"
Merge "Set status to 'active' after image is uploaded"
Merge "Add PostgreSQL support to test migrations."
Merge "Add pre and check phases to test migration 004"
Merge "Add pre and check phases to test migration 005"
Test date with UTC instead of local timezone.

iso_format test uses local timezone so it can fail at certain times
of the day depending on which timezone the tests are run in.

Fixes bug 1139131

Change-Id: I8fe423d96c438b46a9307fe1ecf648707183ff1c
Update db layer to expose multiple image locations

* The DB API now exposes a 'locations' image attribute rather than
  'location'. The new field is guaranteed to be a list of zero of
  more items
* The v1 and v2 APIs only look for the first item in the list of
  locations.
* Related to bp multiple-image-locations

Change-Id: I830b383d8a8e50a01e461658fb9abe384de1a353
Merge "Added better schemas for image members, revised tests."
Merge "Test date with UTC instead of local timezone."
v1 api image-list does not return shared images

The addition of the status column on image_members for the v2 api broke
backwards compatibility with the v1 api image members feature. This fix
forces that member_status='all' is passed to all v1 api calls to ensure
the v1 image members feature still works.

Note: Any images shared prior to migration 016 will be marked as 'pending'
yet will still be accessible via the v1 api since v1 has no notion of
image 'member_status'. Additionally, any new images shared via the v1 api
will follow the same behavior, being marked as 'pending'. In order for
shared images to be used with v2 they will need to have a 'member_status'
of 'accepted'.

Change-Id: I0ab9397e3663c6e2af8a18838f56803e64d84595
Fixes: bug #1132294
DocImpact