Add version 2.0 of compute RPC API

RPC API versioning is helpful because (a) it gives useful error messages
if there is a version mismatch and (b) it allows you to update to a new
version of the API on the server side before updating the client side.

However, we still regularly encounter DB changes which force the client
and server side to be updated together. This will not be resolved until
no-db-compute is fully implemented.

It's safe to say that RPC API clients using version 1.0 will not work
with a version 1.44 compute manager (because of DB schema changes). The
issue, then, is that continuing to support 1.0 clients in the Folsom
release seems pointless and the alternative of removing legacy RPC API
support would mean a lot less cruft code in the release.

Before removing version 1.x of the compute RPC API, we add version 2.0
while still retaining 1.x support. This gives users the option of
upgrading all compute RPC API users to use version 2.0 before version
1.x support is removed from compute nodes.

Change-Id: I1c74b36a84d770b0af5ca33062e069a545537ee2
Remove compute RPC API version 1.x

Now that we have RPC API versions 1.x and 2.0, we could choose to
continue to support version 1.x in Folsom and only remove it in
Grizzly.

This, in theory, would allow smoother upgrades of older Folsom
versions to the final Folsom version. However, in reality, we
most likely made DB schema changes which affect the compute service
and would prevent such a smooth upgrade anyway.

Removing 1.x support now removes a lot of potentially buggy backwards
compat code from the release and will also make backporting fixes from
Grizzly to Folsom easier.

Change-Id: Ic18017a16c5bffee85a43db65ff17283599a27ba
Adds api sample testing for versions

This patch tests api samples for the versions resource in json and
xml. It makes a small modification to the integrated api client to
support making requests above /v2/tenant_id.

This also fixes an uncovered bug in the link handling in the versions
resource.

Fixes bug 1041426

Change-Id: Ie898ef3822fa250def2e0fa407a0968275262260
Stop using scheduler RPC API magic

If a scheduler RPC message isn't handled directly by a SchedulerManager
method, the __getattr__() fallback passes the message to a driver
method in the form of schedule_${method}() and, if that doesn't exist,
instead calls the schedule() method supplying the topic and method
args.

This is pretty bizarre stuff and we appear to only use it in two cases:

  1) live_migration - this is how the schedule_live_migration()
     method in the driver gets called, but the side-effect is that
     we require the client to pass a topic argument which is never
     used. This would be much more sanely handled with an explicit
     SchedulerManager.live_migration() method.

  2) create_volume - the volume API asks the scheduler to pick a
     target host for create_volume() using this method. This would
     be easily handled with an SchedulerManager.create_volume()
     method.

Change-Id: I1047489d85ac51d8d36fea1c4eb858df638ce349
Remove some remnants of VSA support

The VSA code removed by commit a3bab242 was the only user and
implementor of the 'create_volumes' RPC method.

Change-Id: Ic718d54d938059b034b78bc287668b0b9fa27f94
Add version 2.0 of the scheduler RPC API

Like we did for the compute RPC API, add version 2.0 of the scheduler
API while still retaining 1.x support. This allows all services to
be updated with 2.0 support before 1.x support is removed.

Change-Id: If438d5b6f521ea4c487d1490d4b8cf6547ba5c72
Remove scheduler RPC API version 1.x

Like with the compute RPC API, we're unlikely to still work well with
RPC client using older 1.x version because of DB schema changes.

In that case, we may as well remove 1.x support in Folsom and rip out
the potentially buggy backwards compat code. This should also make
backporting fixes from Grizzly easier.

Deployers following trunk can upgrade all their nodes to use the version
2.0 API before deploying this commit.

Change-Id: Iee099751bda9637da5e134357d28e89d5fba9895
Adds api sample testing for extensions endpoint

Includes minor updates to base class to handle multiline descriptions
and makes the extensions endpoint use a sorted list of extensions.

Change-Id: I3604e3969b892646d5bbe08af44d454ee40e6f9e
Clean up non-spec output in flavor extensions

Adds option to cache flavors in the request object like instances.
Modifies the flavorextradata extension to use the cache and optimizes
tests. Adds flavor_disabled extension to control the extra data and
includes tests. Fixes api samples to show the new extension.

Fixes bug 1043585

Change-Id: Ie89df24a2891e3869d3fb604e07c79e8c913f290
FLAG rename: bandwith_poll_*=>bandwidth_poll_*

Fix bug 1036407

bandwith_poll_interval is deprecated in Folsom and will be removed in
Grizzly

Change-Id: I32cbdffce21a0024bd0303d46d7b7632db6ec8cb
Fixed boot from snapshot failure.

Passed the snapshot_id to cinder client from create API. Previously it was
failing since snapshot was being passed instead of snapshot_id.

Fixes LP: #1029211

Change-Id: I4aa1aca9067b2a282b9b46d909ef8342bf933a46
Merge "FLAG rename: bandwith_poll_*=>bandwidth_poll_*"
Save the original base image ref for snapshots.

Save the base image ref in instance system metadata for tracking
purposes.

(This is modified code originally from Rick Harris.)

Change-Id: I574c597c7ff2e55675ebdaa7b3213b53e61a94b7
Merge "Add version 2.0 of compute RPC API"
Merge "Remove compute RPC API version 1.x"
Merge "Stop using scheduler RPC API magic"
Merge "Adds api sample testing for extensions endpoint"
Merge "Clean up non-spec output in flavor extensions"
Makes sample testing handle out of order output

Changes the output comparison to compare nested python objects. This
assumes assumes that lists in the expected output will always sort
in the same order as lists in the actual output.

Change-Id: I0fb02beb9a278f6f93d9b0eaf6d55fcd2a3c96b7
Merge "Fixed boot from snapshot failure."