Add support for PartialTask list

- partial-task: Task that includes all the values except the 'Text'
columns(input, result & message).
- This patch is to have the database to return a partial-task list on users
invoking 'GET /v2/tasks'.
- Returning list of partial tasks will help in reducing the response time when the
user queries for the list of tasks.
- This patch also includes changes for making implementation and return values of
display task detail (GET /v2/tasks/{task_id}) and list tasks (GET /v2/tasks)
more explicit.

partially implements bp async-glance-workers

Change-Id: I4fbadc9a97e3147128c7c733384c7bb50918806f
Keep py3.X compatibility for urllib

Use six.moves.urllib.parse instead of urllib

Partial-Bug: #1280105

Change-Id: Id08fd5b4dad35c888f302a69be56252fe8276bcb
Replacement mox by mock

Replace mox testing library by mock one in the file
glance/tests/unit/test_quota.py

Implements: blueprint replace-mox-with-mock

Change-Id: I4577c4debe92846ba3dd0ecf3c6bef96b4ca352c
Modify assert statement when comparing with None

Replace assertEqual(None, *) with assertIsNone in glance's
tests to have more clear messages in case of failure.

Also, replace assertTrue(* is not None) with assertIsNotNone
for the same reason.

Change-Id: If41a71bd750057c7136b03bef94c04517092134c
Closes-Bug: #1280522
Glance all: Replace basestring by six for python3 compatability

The builtin basestring abstract type was removed in python3,
use str instead, we need to using six.string_types to replace
the basestring for py3 compatibility.

Change-Id: Icf709b3499ff7f1ea935045153eb9a5ecb4618ee
Merge "Glance all: Replace basestring by six for python3 compatability"
Merge "Modify assert statement when comparing with None"
Use 0-based indices for location entries

Glance server currently uses 1-based indices for indexing location
entries. This violates the JSON-pointer RFC (RFC 6901) which states that
indicies should be 0-based. Furthermore, since this deviation is not
mentioned in the docs any application directly calling the REST APIs
would trip over it.

This commit makes Glance use zero-based indexing for location entries.

Note that the "show_multiple_locations" config option should be set to
True to expose location related REST operations.

DocImpact: Since this change modifies user-visible Glance behaviour it
should be explicitly documented because the previous behaviour (1-based
indexing), though not explicitly documented, was exposed through the
REST APIs.

Change-Id: I6326455874c381fcb0d8babf9cc4fa8311e219d2
Closes-bug: #1282437
Added undescore function to some strings

Strings were not ready for translation w/o underscore function.

Change-Id: Ie6a95c4e6d6f096deddd485e3ce91bde0e9eda15
Fix logging context to include user_identity

The user_identity generated created from user, tenant, domain
user_domain and project_domain.
The new domain related values are default to None

Closes-Bug: #1283080

Change-Id: I5e43142afba3492ecf05b65ba24ee70f158f88de
Merge "Added undescore function to some strings"
Merge "Add support for PartialTask list"
Merge "Replacement mox by mock"
Updated from global requirements

Change-Id: Iebef337a6a6c56047f94abefc822ae9d90a1bdb1
Replaced "...\'%s\'..." with "...'%s'..."

We can use "'" without "\" if we use it inside of double quote pair.

Change-Id: Ia8be708611fb0f7053960773a7e32ad8f3121fd3
Merge "Updated from global requirements"
Merge "Use 0-based indices for location entries"
Merge "Keep py3.X compatibility for urllib"