Revert pause/unpause state when host restart

Give following scenario for instance task state
1) start to pause an active instance
2) the nova-compute died because of unexpected situation
3) when nova-compute start again , it's task state is pausing
it should be changed to None because host restarted

Also ,for the paused instance and its state is unpausing,
we need to unpase the instance.

Change-Id: If72a36dafd894ac47c0b255d701a3f9965ff2590
Closes-Bug: #1290639
Use admin only common test case in admin action unit test cases

This patch use nova.tests.unit.api.openstack.compute.plugins.v3
.admin_only_action_common as the base class of AdminActionsTest
which can be shared by v2 and v21

Partially implements blueprint v2-on-v3-api
Change-Id: I16b59e8db59242b8e7b626cc77d0fff6bfc062e4
Share lock_server unit test between V2 & V2.1

This patch moves lock_server unit test from v3 directory to contrib
and makes it shared by V2 and V21.

PS. lock_server unit test cases was removed from admin actions unit
test case.

Partially implements blueprint v2-on-v3-api

Change-Id: I9cee1ae5075d6e7a7cd7aa05b105e487c239d24a
Share pause_server unit test between V2 & V2.1

This patch moves pause_server unit test from v3 directory to contrib
and makes it shared by V2 and V21.

PS. pause_server unit test cases was removed from admin actions unit
test case.

Partially implements blueprint v2-on-v3-api

Change-Id: Ideb30ec8501b4e98cb2ddaa4194bdf19002999ab
Share suspend_server unit test between V2 & V2.1

This patch moves suspend_server unit test from v3 directory to contrib
and makes it shared by V2 and V21.

PS. suspend_server unit test cases was removed from admin actions unit
test case.

Partially implements blueprint v2-on-v3-api
Change-Id: I44d9bf8d70f8a9c6916a18c354285e950c2fa550
Share CreateBackup unit test between V2 & V2.1

This patch moves CreateBackup unit test from v3 directory to contrib
and makes it shared by V2 and V21.

PS. create_backup unit test cases was removed from admin actions unit
test case.

Partially implements blueprint v2-on-v3-api
Change-Id: I607acc7406f8538a644749f9fb218d160e3e306d
Add API validation schema for volume_attachments

This patch adds API validation schema for volume_attachments.

Update volume required only Volume Id in request body but sample
files used to pass 'device' also.
This patch also correct those API sample files-
doc/v3/api_samples/os-volumes/update-volume-req.json
nova/tests/functional/v3/api_samples/os-volumes/update-volume-req.json.tpl

DocImpact

Partially implements blueprint v2-on-v3-api

Change-Id: I489272528fe4f4c43ab781d6a1a46742b1702c76
Merge "Use admin only common test case in admin action unit test cases"
Merge "Share lock_server unit test between V2 & V2.1"
Merge "Share pause_server unit test between V2 & V2.1"
Merge "Share suspend_server unit test between V2 & V2.1"
Merge "Share CreateBackup unit test between V2 & V2.1"
Merge "Revert pause/unpause state when host restart"
Merge "Add API validation schema for volume_attachments"