Deprecate compute_api_class option in the config

Add a function "get_compute_api_class_name" within nova.compute
that returns nova.compute.cells_api.ComputeCellsAPI if cell is
enabled and this cell is an API cell, and returns compute.api.API
otherwise.
Add an option "cell_type" to the config in group "cells".
Use the default value of "cell_type" (None) for legacy configuration.

Change-Id: I32f5ccf789c657b563c165bfa8244e819b1a79a6
Fixes: bug #1049249
Fix EC2 RegisterImage ImageLocation starts with /

* Allows image location that begins with '/' during EC2 image register
* Adds relevant unit test

Fixes LP bug #1074908

Change-Id: I488b126c2079de4370823b347e80c7ec1ecc2c9f
Handle instance directories correctly for migrates.

In Grizzly we changed how we name instance directories. Unfortunately
the decision as to what directory name to use is based on whether
there is a pre-existing directory on the compute node with the old
name.

In the case of live migration, that doesn't work because we have
libvirt copy the directory across for us. So, we need to pass
around the directory name in the migration request. This is better
anyway, as it means that ops types don't need to handle an instance
directory magically renaming itself at some point.

Resolves bug 1175286.

Change-Id: Ib102e644a8742726fa2049303354d466b8109e0b
Clean up vmwareapi.network_util.get_network_with_the_name

Removes an unnecessary method call and cleans up some logging.

Fixes bug 1185072

Change-Id: I1a57e2c2d8506796626d6852d25c5b699d031117
Add x-compute-request-id header when no response body

The x-compute-request-id header was only being added for requests which
generated a response body, like an index or show.  This adds it to
requests which generate no response body, like create/update/delete, or
actions on servers like resize.

Bug 1183712

Change-Id: Ia0e9d75e4b84280caab060fae58036ed818e00c3
More detailed log in failing aggregate extra filter.

For easier debuging. Report more detailed log when
aggregate_instance_extra_specs failed.

Change-Id: I9e285fc55ca4dfa75688bb0645b8d1b71a0b55bd
Update rpc/impl_qpid.py from oslo

The current qpid driver cannot serialize objects containing strings
longer than 65535 characters.  This just became a breaking issue when
the message to scheduler_run_instance went over that limit.  The fix has
been commited to oslo, so this just syncs it over to Nova.

Bug 1175808
Bug 1187595

Change-Id: If95c11a7e03c81d89133f6cad0dcbb6d8acb8148
API to get the Cell Capacity

The total RAM and the available RAM are stored in memory of CellStateManager.
This API gets the available slots per flavor for a given cell.

Implements: blueprint get-cell-free-ram
Change-Id: I2a6dbb8835cad04f3ee058c3012490782d7c8e67
Make the datetime utility function coerce to UTC

Getting datetime objects from existing sources (i.e. sqlalchemy)
is problematic because they're "timezone naive". Make the utility
function coerce these to UTC for easier conversion.

Related to blueprint unified-object-model

Change-Id: I61bc6b13f9bd9441d64cc6930e43e921af72a342
Merge "Update rpc/impl_qpid.py from oslo"
Allocate networks in the background

Setting up networks and allocating IP addresses has the potential to
take an undesirable amount of time, blocking the build of a new
instance.  We can parallelize some work by querying for this information
*while* a new instance is being provisioned in the virt driver.

This adds a wrapper around the NetworkInfo model which allows one to
query for network information in a greenthread.  When a code path is hit
that actually needs the network information, it waits for the
greenthread to finish, if it hasn't already.

Network allocation will only be async for virt drivers that accept this
NetworkInfo model.  Other drivers that expect the legacy format end up
waiting for the operation to complete before driver.spawn is called.

Implements blueprint async-network-alloc

Change-Id: I389f939b9a36bc20b3b66e98d006d694622bd963
Moving `test_misc` tests to better locations

We now have more specific places to put the tests contained within
`test_misc`.

Change-Id: Ifa29bdfcea5053d991ece6397d9c70d62157fc10
Merge "Clean up vmwareapi.network_util.get_network_with_the_name"
Merge "Fix EC2 RegisterImage ImageLocation starts with /"
Import osapi_v3/enabled option in nova/test

Since `nova/api/openstack` may not have been imported by the time we use this
option in `nova/test`, we need to explicitly import it at the top of the file.

Fixes bug 1187847

Change-Id: Ibc9f3466d3baaf47d44bda2fc22247a494809909
Merge "Make the datetime utility function coerce to UTC"
Merge "API to get the Cell Capacity"
Merge "Moving `test_misc` tests to better locations"
Merge "More detailed log in failing aggregate extra filter."
Merge "Deprecate compute_api_class option in the config"