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
Extend IPv6 subnets to /64 if network_size is set smaller than /64

If cidr_v6 is set with network_size smaller than /64, this fix
extends the subnet to /64. Fixes bug #1011122.

Radvd (which is used by nova-network) also requires as /64 for
autoconf at the client(instance) side.

Change-Id: I0a6ac363e46dd9b8c9cfb750ce37720fdbc56a1f
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
Imported Translations from Transifex

Change-Id: I73f858609492e47d4a29e8a1424b5598b867c53d
Correct _extract_query_params in image.glance

Updates _params rather than params to ensure filters.

Fixes bug 1070138.

Change-Id: I4e71d19f120ea91d8dfca32785ccb0aa7b1c770b
Fix hardcoded topic strings with constants.

Replace hardcoded topic strings like 'volume' or 'compute'
with config constants like FLAGS.volume_topic, etc. See
bug #1057831 and bug #1061628.

Change-Id: I817ecc3cbe3245b51a0c047be58d17edfec8a838
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
Remove useless return.

self.cast() doesn't return anything, so remove a couple useless uses of
return in the network rpcapi.

Change-Id: I9981fa97870c90c98994e3201c85c125b5cea3e2
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
Fix nova-network MAC collision logic

The exception being caught and transformed in sqlalchemy/api.py
was incorrect, causing nova-network to miss it in the MAC
collision retry loop.

This patch corrects that and adds a test of the collision logic.

Fixes bug 1059366

Change-Id: I6bf16c2f59f06c7e84441604b057afd8dfe6d709
Merge "Fix hardcoded topic strings with constants."
Merge "Remove useless return."
Merge "Imported Translations from Transifex"
Merge "Extend IPv6 subnets to /64 if network_size is set smaller than /64"
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"