Remove dependency of test_v1_api on other tests

test_v1_api would fail if run by itself. A config value was
apparently being set by another test so that this test would
pass if run as part of the whole suite but not alone.

Specifically, the missing value was 'backend' in group 'database'.

This patch imports the 'backend' option in base.py which is the
base of test_v1_api.

Change-Id: I37d72398050057def6a378e03c14a9a4eeb55a16
Closes-bug: #1283242
Add copyright text to glance/openstack/common/__init__.py

Synchronize the content of glance/openstack/common/__init__.py to the
one in oslo-incubator.

Change-Id: Idd059e3f4d00d91c9a14cf302fd780044929e3e5
Closes-bug: #1288877
Do not use __builtin__ in python3

__builtin__ does not exist in Python 3, use
six.moves.builtins instead.

Change-Id: If7d2838b0b90ac2d82c4d62c6dfb3c011f937a0b
closes-bug: #1290234
Detect MultiDict when generating json body

Detects webob.multidict Multidict at sanitizerand returns mixed()
out of them so they can be parsed as json.

Fixes image-list when using Image API v2 with registry.

Implements a test to verify that the /rpc endpoint exists as
intended.

Closes bug: #1246980

Change-Id: I3d28ca5d8f1af0ec7b9e7a8684e3160f674b8f4c
Pass Message object to webob exception

Provide the Message object within Glance exception to webob exception
instead of try to convert it to a string. Because Message objects could
not be converted by str() since they may contain non-ascii characters.

Closes-Bug: #1292782
Related-Id: I352cda57fe119022c59c6c813b5c8053765b2d3c
Change-Id: I22b9123d8b3fe58d7dbd8fcde5a8dd58000e2da4
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Make the VMware datastore backend more robust

This patch contains several fixes related to invalid configurations
and corner cases:
- better error handling for the store operations
- better logging when response is not successful
- better support for various store_image_dir formats

Change-Id: I6c0003e29d621c1f71490cb9fce163dc840a113f
Closes-Bug: #1291646
Provide explicit image create value for test_image_paginate case

Assign an explicit created_at datetime value to image db fixtures,
it be used to fixes race condition in DB driver test_image_paginate
case.

Closes-Bug: #1282400
Change-Id: I359633af4bb25cf1866b42d6dad3df658995b7bd
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Merge "Add copyright text to glance/openstack/common/__init__.py"
Removes use of timeutils.set_time_override

The set_time_override function in timeutils was written as a
helper function to mock utcnow for unittests before 'mock' was
generally used. Now that we have mock and fixture, we no longer
need to use it.

Change-Id: I203f7369943b948e0462becbddcba65b2d1576f0
Partial-Bug: #1266962
registry: log errors on failure

If an image fails to be updated/created/deleted/etc for whatever reason,
the registry server returns 500 – but there's no trace of the actual
error. Let's catch the exception log it, and then re-raise it so it
still return a 500 status code. But at least we can debug.

Change-Id: Id437f23011a10365e85914dc1934f610bfa3dd28
VMware store.add to return the image size uploaded

This patch fixes a tempest test failing for the VMware datastore.
When the size provided to add() is zero but the image size is actually
larger than zero, add() should return the size of the image uploaded
and not zero.

Tempest failure:
api.image.v1.test_images.CreateRegisterImagesTest.test_register_then_upload

Change-Id: I16524c0f25aa4124c24ca25ac014819267dd72c3
Closes-Bug: #1292764
Merge "Detect MultiDict when generating json body"
Enable H304 check

Enable H304: no relative imports

Fix import in tools/install_venv.py

Change-Id: I099ed65db9b42223eaa4b66a3a5c6113d1cc56fe
Remove openstack.common.fixture

This package is not used

Change-Id: I9240ee4b1aa5934c6fc833e79ea32c53c6bc7569
Merge "VMware store.add to return the image size uploaded"
Merge "registry: log errors on failure"
Merge "Pass Message object to webob exception"
Return 405 when attempting DELETE on /tasks

We currently return 404 NotFound when attempting to delete a task
by hitting the resource /v2/tasks/{task_id}. However, as this
resource exists and we do not allow DELETE on tasks, the correct
response is 405 MethodNotAllowed.

Implementing as per spec on
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Fixes bug 1287951

Change-Id: Ia4a969e595b520dbc5f4e9a463d967681465ae6f
Sync common db code from Oslo

This sync contains commit ``f7705f3 Make table utf-8 charset
checking be optional for DB migration`` which will be used to
support bug #1279000 fix.

Full list of changes:

9fed4ed Fix Keystone doc build errors with SQLAlchemy 0.9
f7705f3 Make table utf-8 charset checking be optional for DB migration
5b7e61c Dispose db connections pool on disconnect
d1988b9 Set sql_mode callback on connect instead of checkout
a1a8280 Fix excessive logging from db.sqlalchemy.session
dc2d829 Add lockutils fixture to OpportunisticTestCase
d10f871 Adapt DB provisioning code for CI requirements
5920bed Make db utils importable without migrate
9933bdd Get mysql_sql_mode parameter from config
96a2217 Prevent incorrect usage of _wrap_db_error()
6cab37c Python3: define a __next__() method for ModelBase
20a7510 Add from_config() method to EngineFacade

Change-Id: I115f5610101a8512af484111469f5060dce27919
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Imported Translations from Transifex

Change-Id: Id02da366e8f85442b75eb52e67d59e1ccec7a517