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
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
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
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
Removed unsued import, HTTPError in v1/images.py.

Fixes bug 1235762

Change-Id: Ice5574f1f61d5064d73f0dd41a1f183b951e145f
Correct documentation related to protected properties

Fixes bug 1233303

Specified conditions under which glance api will not start
successfully.

DocImpact

Change-Id: I8498e9e51f5c7e0d411379c0574c0b8e300f77c2
Use Unix style LF instead of DOS style CRLF

This was causing pyflakes to fail with syntax errors on some systems:
<stdin>:22: invalid syntax

Change-Id: I57669392a5ee2a786d2a6e18a9dfd0abb054b71b
Remove whitespace from cfg options

This extra whitespace will cause warnings in the openstack-manuals,
hus remove it.

Change-Id: If0c7c2a06b9c6a01c87ee7e03ee5b17a18c746e9
The V2 Api should delete a non existent image

Glance V2 api initiates the deletion of an image that
got deleted during upload. This ensures that there
are no orphaned chunks of the image left behind

Fixes bug #1226013

Change-Id: I4cf5c49d2a6d2157a38467d9f7bcb20c4562b642
Merge "Use Unix style LF instead of DOS style CRLF"
Merge "Enclose command args in with_venv.sh"
Merge "Remove whitespace from cfg options"
Remove unused import

Module exception from glance.common in
glance.tests.unit.v2.test registry api module seems to
be unused, so it's import can be safely removed.

Change-Id: Ifc201c6fb1226e556d4217898844e04069d81932
Merge "The V2 Api should delete a non existent image"