Add db2 communication error code when check the db connection

Closes-Bug: #1244092

The oslo patch set is 3acd57c2825a8bf6660c3124f12794414622eb26

Change-Id: Ic5244cab4e517f740b398138d4da877affe46ab3
Correct URL in v1 test_get_images_unauthorized

The test code in
unit/v1/test_api.py:TestGlanceAPI.test_get_images_unauthorized
requests for the wrong URL - instead of requesting for "/images" it
requests for "/images/detail" (making it identical to the
test_get_images_unauthorized test).

Change-Id: I308e73966bcbb27287012d7b5dcdcc9d2a9f2e18
Closes-Bug: #1264428
Merge "Add db2 communication error code when check the db connection"
Merge "Correct URL in v1 test_get_images_unauthorized"