Regenerate missing resized backing files

Fixes bug 1185588

The only way to reliably determine whether we are using a legacy
(pre-Grizzly) backing structure is to look at the backing file
reference for the instance/disk itself. Thus, if we determine the
backing file contains an underscore, we use the value following it
as our legacy_backing_size, which is then used to create the
necessary backing file.

Change-Id: I145f71068c972a604e5361ae79d6315286136786
Converts 'image' to json primitive on compute.rpcapi.prep_resize

The 'image' should be converted to primitive since it contains
complex structures. Today it works because it relies on
scheduler.rpcapi.prep_resize which does the conversion.

This is part of other changes that will move resize/cold migration
to conductor. scheduler.rpcapi.prep_resize will be moved and then
compute.rpcapi.prep_resize has to properly convert parameters.

Partially implements bp cold-migrations-to-conductor

Change-Id: Id89896bfb379ab9eb8bf13c3513b9290d88408fd
Fix Keypair exception messages

`InvalidKeyPair` exceptions weren't raising the
proper error message. The reason was that the
error message was passed in as an `explanation`
keyword which isn't understood by `NovaException`,
and so is thrown away.

This is part of a patch set to improve keypair
error message reporting in both the Openstack and
EC2 APIs.

References bug 1187952
Change-Id: Ide319cb126955927d623972dffd573cd4c4314df
Improve Keypair error messages in osapi

The KeypairAPI code provides useful error messages that weren't being
percolated back through the OpenStack API. This patch addresses this by using
the original `message` when crafting the HTTPException objects.

References bug 1187952

Change-Id: I786a225010d912d7bfea5c01838ddcf43fd90d53
More KeypairAPI cleanups

* DRY up quota checking for new keys

* DRY up formatting of get_key/get_all_keys results

* Add tests for get all keypairs

Change-Id: I14a97c0f3cb3aa9b827d14002c21076a41942023
Adds check that the core V3 API is loaded

Adds infrastructure to be able to check that the core V3 API
plugins are present and raise an exception and abort if any are missing. The
list is deliberately hard coded though it is not yet complete and
will be expanded as the core APIs are ported and it is decided
exactly what will be considered to be the core API.

Partially implements blueprint v3-api-extension-framework

Change-Id: Ic2c1d5cd6836ee18819106558880682cf4cda487
Speeding up scheduler tests

Database access is costly in tests and many tests
don't actually need it. This patch provides a
simple way we can speed up the Nova tests by
providing a new base class, `NoDBTestCase` which
allows us to white-list tests not needing database
access.

The following speedups were observed:

    With TestCase:     Ran 265 tests in 17.080s
    With NoDBTestCase: Ran 265 tests in  9.478s

Further optimizaton could be done by fixing
`test_host_filters` to not hit the database. This
will require some effort though in order to
maintain the quality of test coverage since part
of what's doing is testing the code in the DB
layer.

Change-Id: Ic34c4c39d7f680ac501efb459fdeaa51331ffe1c
Update analyze_opts to work with new nova.conf sample format

analyze_opts is a tool to help clean out a nova.conf file by checking
for unused and default values set in your nova.conf

Change-Id: I01fff134f8906bff929c55bea8c152653d3e9760
BDM class and transformation functions

This patch adds the utility functions that will help us switch
between versions of block device mapping data.

In order to accomplish this, and to have a more structured approach to
dealing with block device mapping data in the future, this patch
introduces a BlockDeviceDict class which is a thin wrapper around a
standard dict that makes it easier to reason about which fields are
present in the dictionary, and introduces said conversion routines.

blueprint: improve-block-device-handling

Change-Id: I9370333059b8c9aaf92010470b8475a913d329b2
Added verbose error message in tests helper mixin

blueprint db-api-tests

Change-Id: I2fcfc50824de8965fe8521cde5f20d24e88eb8ae
Merge "Update analyze_opts to work with new nova.conf sample format"
Merge "Fix Keypair exception messages"
Merge "Improve Keypair error messages in osapi"
Merge "More KeypairAPI cleanups"
Merge "Speeding up scheduler tests"
Merge "Added verbose error message in tests helper mixin"
Merge "Regenerate missing resized backing files"
Merge "Adds check that the core V3 API is loaded"
Merge "BDM class and transformation functions"
Merge "Converts 'image' to json primitive on compute.rpcapi.prep_resize"