Add qpid-python to test-requires

The qpid notification tests are not run if the qpid-python package
is not installed.  This change adds it to the test-requires list
and removes the check for it since it should always be present.

Fixes bug 1173380

Change-Id: I2763e320e6018fde196c903f515920ad33f28aa6
Make passing user token to registry configurable

This patch adds CONF.use_user_token as a config option. When true, glance will
continue to use the user token when communicating with glance registry. When
false, glance will read admin credentials from the config and use those to
communicate with glance registry. Using admin credentials allow for
reauthentication when tokens expire and prevents requests from silently failing.

DocImpact
Fixes bug 1182536

Change-Id: Ia6b563677eb67d4069571c82b9dad3f025b6e9fb
Fix undefined variable in cache

A function to verify metadata in the cache middleware was falling over
for GETs on images with a missing size.

Fixes bug 1183049

Change-Id: I2da75e5e5aca12d20a10cace2a3779e4041161b2
Sync oslo imports to the latest version.

Change-Id: I36193d00930e5c82c46841b64650863c811b95a4
Import strutils from oslo, and convert to it.

The only change of behaviour here (according to the former glance
unit tests) is that 'T' now means True not False. I suspect that's
ok.

Change-Id: Icf98f913a3f78a1fe2f38a82a25a071c2da03739
Add documentation on reserving a Glance image

This lets us refer to the fact that some optional headers are in fact
required unless reserving an image.

Fixes bug 1124224

Change-Id: I5646d4dc130efecf991573b363eb1a665012b7df
Fix pydevd module import error

Introduces a try-except block in 'setup_remote_pydev_debug' that will
handle the pydevd module import error gracefully.

Implements: blueprint pydevd-module-import
Change-Id: Ia25b8ef21266ab52dc11c11e9db0bbfa8542f1b9
Merge "Make passing user token to registry configurable"
Encode headers and params

BaseClient currently fails when non-ascii characters are passed in
paramas and headers. This patch ensures those params are correctly
encoded before the request is made.

The patch adds strutils from oslo and updates gettextutils.

Fixes bug: #1182824

Change-Id: I813d745d76700c77f1871b151a76ff8b72ea92d4
Prevent E500 when listing with null values

An image may have NULL values for 'name', 'disk_format' and
'container_format'.

Various image list operations which used a marker could return
an E500 because:

* sqlalchemy db: an illegal statement would be formed
* simple db: the sort function would error when it hit a null

To prevent this we change the behaviour so that when a NULL
is encountered we treat it as an emptry string ('') for the
purposes of sorting. This is consistent with the behaviour
for listing the db contents using 'sql order by'.

It is safe to provide the default empty string in all cases
since only string based 'sort_key' values can be NULL in the
database, eg 'size' (not a string) cannot be NULL.

Fixes bug 1183860.

Change-Id: I2187c41a3fab8b5813ba3a5e0f3249ee5dd981ed
Merge "Sync oslo imports to the latest version."
Merge "Import strutils from oslo, and convert to it."
Merge "Fix undefined variable in cache"
Add a policy layer for membership APIs

Added a policy layer for the membership APIs of the domain
model.

Added following policies for membership APIs:

v1: 'get_members', 'delete_member' and 'modify_member'.

v2: 'add_member', 'get_member', 'modify_member',
'get_members' and 'delete_member'.

Implements blueprint membership-policy

Change-Id: I0d5782d1d9b7b8a563a689fcb192958ab3fea0f4
Merge "Fix pydevd module import error"
Don't make functional tests inherit from IsolatedUnitTest

There were some functional tests inheriting from IsolatedUnitTest which
doesn't make sense and was causing some issues in newer developments
since IsolatedUnitTest stubs some classes (like Registry's client).

Fixes bug: #1186291

Change-Id: Icafac9edf8b0cec6a96532c609923de2c4d8d6bb
Merge "Encode headers and params"
Merge "Add qpid-python to test-requires"
python3: Introduce py33 to tox.ini

Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: Iddb14c65c0bf44612bdf8e301e31ab71ea432f29
Signed-off-by: Chuck Short <chuck.short@canonical.com>
updated content_type in the exception where it is missing.

Fixes bug 1184279

Added missing content_type in HTTPConflict, while attempting to upload a duplicate image.

Change-Id: I4dbef69b6f9e83d4b5090cc0bbfcb01611c05a37