Include all tests in generated tarballs

Make sure all glance/tests is actually shipped in generated
tarballs. Rather than adding yet another specific entry, recursively
include all glance/tests and globally exclude all .pyc.

Change-Id: I7875c58dece452b5356cf7e268f504780ec30bff
Fixes: bug 1018830
Adds /v2/schemas/images

Fixes bug 1019401

Change-Id: I4fcb9286e5aec0984b61285bfff794126f64d00a
Reorder imports by full import path

Fixes bug #1019463

Change-Id: I3fb44cbacb09457ea34571222e0a8e8d4b8d7c87
Add retry to server launch in respawn test.

Avoid test failures caused by EADDRINUSE.

Change-Id: I8cf044b55da30a56c7e2d1435085d23bd198c275
Merge "Include all tests in generated tarballs"
Combine same-time tests with main db test case

Rather than re-run all of the base test methods to test with
image fixtures with identical created_at timestamps, we should
just run methods that matter. This patch removes the subclass
that sets identical timestamps in favor of adding a third fixture
to the main test case.

Related to bp refactor-db-layer

Change-Id: I69d0b21d1ef825333881e021dfa9610f1bbad334
Refactor pagination db functional tests

The pagination-related functional tests are overly complex and aren't
adding a lot of value. This rewrites them in a more straightforward way
by incorporating them into the main test class.

Related to bp refactor-db-layer

Change-Id: Ic08914cfa8135d73a4aae6724a6561bc337b91fb
Use PyPI for swiftclient.

Change-Id: I3cbef069459c82ab175998a8f58091cd8214cb3c
Store properties dict as list in simple db driver

Rather than store image properties as a dict, use a list of
dictionaries with name and value keys. Fix bug 1020388.

Change-Id: Ia41e48cb4e869d01c93466103dea8fb1b0ec07a2
Report image checksum in v2 API

* Report checksum with image entities
* Set checksum when image data is uploaded
* Related to bp api-2

Change-Id: I6b4f859184cff37cea247bfa56c9c6bebd256969
Fix IndexError when adding/updating image members.

This patch updates the v1 registry API to work with the latest
DB API image_member_find function which no longer throws
NoResultFound when it doesn't find any records.

The latest version of the DB API image_member_find function simply
returns an empty query result.

This fixes both member-add and members-replace functionality.

Fixes LP Bug #1020380.

Change-Id: I8818c90e09bd9a17f208d0e20106007db04e77f1
Merge "Reorder imports by full import path"
Merge "Fix IndexError when adding/updating image members."
Improve eventlet concurrency when uploading/downloading.

When uploading/downloading multiple images using the
same glance-api worker process some of its eventlet
threads can become starved. Inserting statements to
trigger cooperative yields, ie sleep(0), allows fairer
scheduling of the other eventlet threads.

Fixes LP Bug #1021002.

Change-Id: I5a8f255e9507d18813d07d418e6acefa10d9f6bb
Allow admins to share images regardless of owner.

Updates the Glance DB's is_image_sharable function so that
an admin can share an image regardless of the context ownership.

This fixes issues when trying to write Glance functional tests
which use the noauth middleware (UnauthenticatedContextMiddleware).

The motivation behind this change is I'd like to write some
functional tests for image-members that work with noauth.

Fix bug 1021054

Change-Id: I6d939876a4c4bf5f191463f5ca434fc524a6ac59
Merge "Improve eventlet concurrency when uploading/downloading."
Merge "Add retry to server launch in respawn test."
Merge "Use PyPI for swiftclient."
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