Improve test/utils.py

Introduce new class into utils.py to keep glance api tests DRYer

Partially implements blueprint glance-tests-code-duplication

Change-Id: Ic77961fcc83806fd451afa1a0d230f09926ebfd9
Refactor glance/tests/unit/v1/test_registry_client.py

Remove code duplication from module

Partially implements blueprint glance-tests-code-duplication

Change-Id: I85f5d7a45c65533ba49f2dfdefdfccfde221468b
Refactor glance/tests/unit/v2/test_registry_client.py

Remove code duplication from module

Partially implements blueprint glance-tests-code-duplication

Change-Id: Idf54d98d0982b7c64696056c87283eb92f1164b5
Code dedup in glance/tests/unit/v1/test_registry_api.py

Move duplicated fixture set-ups, requests and assertions to tests.utils.py

bp glance-tests-code-duplication

Change-Id: Ie0f13b5f5d5a242f24ac7cd6cc548ff09ebe6ba5
Avoid redefinition of test

test_add_member() is defined twice under the same
name, however checking for different things. Rename
the 2nd instance to _unauthorized to avoid overwriting
the first implementation.

The first check is actually duplicate to test_add_member_positive.
So merging the first check with test_add_member_positive.

Change-Id: Ifb029d8f34f9f4139557bb9b197492fb344a598e
Remove start index 0 in range()

Remove the useless arg ("start index" = 0) in files, since its default
value is 0, to make code cleaner.

Change-Id: I9d91ab8a8033b9a6c9b77608dea92c91a994c7fc
Changed header from LLC to Foundation based on trademark policies

Fixes: Bug 1214176

Change-Id: I4e394c33d810fe7d48066ff7cb6143f7eae25f13
Remove the unused mapper of image member create

For image members v1, we don't support "create" method,
but we're mapping it in router.py. So this fix will
remove the unused mapper.

Fixes bug 1223658

Change-Id: I20401656ea2930a026cf8b67825d9ec9f6623487
Fix misused assertTrue in unit tests

Refactored unit tests to use assertEqual instead of assertTrue
where needed.

Fixes bug #1226374

Change-Id: Iac5117c7a8dd3769aa6e303c6830aad291d5a0f7
Fix typo in config string

Add a single space to change "isthis" to "is this".

Change-Id: I95a001f5025ef4c41467b363cdd3adf8258e8f10
Enclose command args in with_venv.sh

Sync tools/with_venv.sh from oslo, it will support argument with
blanks.

Change-Id: Ibb802b21d609ea6b54fc168b17705f06ad1cb86a
Closes-Bug: #1220937
Log a message when image object not found in swift

We should log when a request for an image object in swift returns a 404.

Fix for bug 1227786.

Change-Id: I27a970840cf448196245ba1e58523b9e0b1495f5
Swift store add should not use wildcard raise

When there is an yield block in an except clause prior to wildcard raise,
if the thread is re-scheduled, the raise generates a TypeError.
Since the caught exception has NoneType, it causes a wrong exception(NoneType)
to be raised.

Fixes bug #1226258

Change-Id: I6ce56d1943535279f2ad40c7978b1539ed638d57
Use built-in print() instead of print statement

In python 3 print statement is not supported, so we should use
only print() functions.

Fixes bug 1226943

Change-Id: I0ae4cc7e5996ed30c69e153ba51438c56e56c09a
Convert Windows to Unix style line endings

This is more consistent with other files and fixes
Hacking warning H601.

Change-Id: I2ba5436df78dc82ca48bf53bc178106edd514f4c
Open Icehouse development

This should be accepted/merged once all the RC1 bugfixes are in.

This bumps the target version to 2014.1, effectively opening the master
branch to Icehouse development, ending the feature freeze.

The Havana release branch is cut from the previous commit in master.

Change-Id: Ib8aedc149750ce32558f1fbbf51263f2110be3ac
V2 RpcApi should register when db pool is enabled

The rpc api controller registers the public methods of db_api
But, use_tpool is True, the thread pool wrapper's methods are
used which would lead to failures.

Fixes Bug #1221037

Change-Id: Iaba10178c7da1548257e2180658c2dc8ba3e048b
Do not allow the same member to be added twice

This patch add an existence check before add new member for image.

Fixes bug 1231485

Change-Id: I10d37c6f169e070ea6699cca78b6360be9fb11dc
Merge "Open Icehouse development"
Glance GET /v2/images fails with 500 due to erroneous policy check

This patch will fix below two issues of V2 ResponseSerializer for
images-list, image-show, image-update and image-download.

1. A user should be able to list/show/update/download image without
needing permission on get_image_location.
2. A policy failure should result in a 403 return code. We're
getting a 500.

Fixes bug 1231255

Change-Id: Ie0ec2d574eea4433c4f610ec66a22cb16cae6dc6