Send full migration data to finish_resize.

This patch updates the finish_resize method in the compute rpc api to
receive all of the migration data instead of just the migration id.
This avoids an unnecessary database read in finish_resize.

Part of blueprint no-db-compute.

Change-Id: I4791551a13a8b73e7a5c22ab9f49cdab7db8de1f
Rehydrate NetworkInfo in reboot_instance()

In the process of implementing no-db-compute, the compute manager's
reboot_instance() was stripped of its database accesses for getting
an instance's block and network device info. That information is
now passed in from the API layer over RPC.

In the offending changeset (), the network_info was getting coerced
to a list and thus calls to NetworkInfo.legacy() were failing in the
manager's _legacy_nw_info() method. This patch rehydrates the
NetworkInfo using the existing method for doing so, which fixes
bug 1071017. A test is also added to prevent future regressions.

Change-Id: I8fd1c2dde573bb7da3bfe1ee3193f9ba1167aaa7
Correct _extract_query_params in image.glance

Updates _params rather than params to ensure filters.

Fixes bug 1070138.

Change-Id: I4e71d19f120ea91d8dfca32785ccb0aa7b1c770b
Change hacking.py N306 to use logical_lines

Only logical lines (does not include comments) should be checked for
alphabetical import order.  This patch changes N306
(imports not in alphabetical order) to run on logical lines not physical lines.

Fixes bug 1071849

Change-Id: Ib2cb92f9eb82aeed1ff5879d3e38c8961b4f06cc
Fix rpcapi version for new methods.

Two methods were recently added to the network rpcapi in version 1.1.
Properly require that the manager side implement version 1.1 to accept
rpc messages for these methods.

Change-Id: I7257301a150889bc3d643197bf1e5e9a656b1d9c
Merge "Fix rpcapi version for new methods."
Merge "Send full migration data to finish_resize."
Imported Translations from Transifex

Change-Id: I8930843feb15ad76de53a133af1ee60e5dd7124a
Fix check for memory_mb

assert_compute_node_has_enough_memory should check memory_mb is None or not

_assert_dest_node_has_enough_disk should check available_mb as well

Fixes bug 884842

Change-Id: Ieaa33efd50bb84f1b475c437b26af1302fdfd19f
Fix use of elevated context for resize methods

elevated contexts were being passed over RPC to confirm_resize,
revert_resize, and finish_revert_resize methods.  If those methods need
to elevate context, they should do so themselves.

There was 1 case (when deleting an instance in RESIZED) when we'd send a
non-elevated context to confirm_resize().  This would fail because the
migration_get() call there requires admin context and confirm_resize()
on the manager side did not elevate the context itself.

This fixes bug 1071600 and removes sending elevated contexts for these
methods over RPC.

(Ultimately we need some work to make the migration* DB API calls verify
project_id vs requiring admin context..)

Change-Id: I907889502f19fba8059253e52dca084a123016e2
Merge "Imported Translations from Transifex"
Merge "Correct _extract_query_params in image.glance"
Merge "Fix use of elevated context for resize methods"
Merge "Change hacking.py N306 to use logical_lines"
Fix compute tests abusing admin context

Some compute tests are using admin context when not necessary, which
could cover up potential issues in the future.

Change-Id: Ia755c397454c4c8a8504bb76c0126ce61e7c014b
Make instance_get_all() not require admin context

Helps to clean up tests which use this method.

Change-Id: Ic707b1d1b679b983b4d2b7dcad5a5a33ed771d3c
Merge "Rehydrate NetworkInfo in reboot_instance()"
Merge "Make instance_get_all() not require admin context"