Unit test remaining glance-replicator methods.

Command line methods are not yet tested, but this covers pretty much
everything else.

Change-Id: I236dd8ba022ab0f9548bfe823458e99d221b2ab9
Ensure authorization before deleting from store

This fixes bug 1076506.

Change-Id: I3794c14fe523a9a27e943d73dd0248489d2b91f6
Merge "Unit test remaining glance-replicator methods."
Pep8 fixes to bin/glance* scripts.

Change-Id: I92a4f39cfbf961e1cc507748178d67813dc06399
Make tox.ini run pep8 checks on bin.

This updates the pep8 checks in our tox.ini file so that we are
also scanning the bin directory.

Change-Id: I2c0520c1239fcbda6b5b70f2d20709b96b94a4c5
Make run_tests.sh run pep8 checks on bin.

This updates the pep8 checks in our run_tests.sh script
so that we are scanning the bin directory.

Change-Id: I0ad51b7747edbcb0dbcfb72f92a43dd8f2efc768
Prevent infinite respawn of child processes

Rather than looking for an exit code of 2 to prevent child processes
from respawning, we look for any non-zero status.

Fixes bug 1074132.
Fixes bug 1065197.

Change-Id: I74ac13737d8a9b8710a8268eb1d67fbe5e75d491
Lowering certain log lines from error to info

Several log statements were logging as ERROR that do not necessarily
represent an ERROR having occurred. The offending statements have
been lowered to INFO.

Change-Id: I511ef7230c610b59d6e9121a557bbc266fbf658c
Code cleanup: remove ImageAddResult class.

Remove the unused ImageAddResult class and fix the misleading comments
implying that it was used.

I did rewrite the code to use ImageAddResult, but I don't think it was
an improvement.  I think tuples are perfect for simply grouping things
to return them together.

Change-Id: Iabf0022b1a95e25a8111dbc38f7be4be3f5e6f59
Update uuidutils from openstack common

Change-Id: I9f4928ca818859bf2f25543b2fb3819ab5211482
Use generate_uuid from openstack common.

Change-Id: Ie1b55df2301b5ca276571117386a0625e039adc2
Merge "Prevent infinite respawn of child processes"
Merge "Update uuidutils from openstack common"
Ensure strings passed to librbd are not unicode

librbd rejects unicode by throwing an exception. If the location uri
was unicode, this would result in deletes failing. Convert all rbd
StoreLocation properties to ascii strings to avoid this problem.

Fixes bug #1075580
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>

Change-Id: I445902bb1b72b8c814585f1481e6bf9e758b4e07
Merge "Lowering certain log lines from error to info"
Fixes is_image_visible to not use deleted key

The 'is_image_visible' method is looking for deleted members while
they are already being filtered in the query. Registry while validating
all the members gets a KeyError as the key deleted does not exist.

Fixes Bug: 1077106

Change-Id: Ia53b6be3b2f740357df86e6c7a6a257a990c3aab
Return 403 on images you can see but can't modify

Visible images return 404 (Not Found) when you try to modify them and
are not allowed. This patch changes this return to 403 Forbidden which
more accurately reflects the situation, in light of the fact that we are
not trying to hide the existence of the image in this case.

Fixes bug 1078520

Change-Id: I70e6e273aeaef51dad40cf001308d3a817bdced5
Merge "Use generate_uuid from openstack common."
Merge "Code cleanup: remove ImageAddResult class."
Fix simple db image_get to look like sqlalchemy

image_get in simple db was repeating logic that exists in helper
is_image_visible method. Also, sqlalchemy implements the same way, so
now this method behaves in both dbs.

Fixes bug 1077256

Change-Id: I5285027a24157750d7c322990aa4074e2b1087c7