Add a get_root_bdm utility function

Getting the root block device out of a list of block devices is a common
idiom and we use it in several places in our code base. This patch
factors it out in a handy utilty method and adds tests for it.

Change-Id: I4a2cb3c689fed9fbc0bc51ddba095e1269cacb2d
blueprint: clean-up-legacy-block-device-mapping
Move is_volume_backed_instance to new style BDM

Compute API is_volume_backed_instance used to rely on matching the
device name to the root_device_name field of the instance which had
several problems and edge cases.

Now that we have moved to the new BDM format that has the boot_index
and destination_type field for each block device - it is pretty
staightforward to implement.

Change-Id: Ia2c235f8bce577ed4ac6a480a4a051d159a5fad7
blueprint: clean-up-legacy-block-device-mapping
cleanup after boto 2.14 fix

we had a fix that worked fine in the gate, but this was a good
suggestion of a cleaner version. Fixing now while everyone is still
fresh on this.

Change-Id: Id88f3532fe8096c4f7322c683faeaf20bfb431bc
Make aggregate methods use new-world objects

This makes the add_aggregate_host() and remove_aggregate_host()
methods on compute manager use new-world objects. It introduces
a new compatibility decorator since object_compat() is specifically
tailored to instance methods, which makes sharing it really
complex and ugly.

Note that we still convert the aggregates back to primitive form
before passing to the drivers, which will be removed once we teach
the drivers to use/take aggregate objects directly (coming next).

Related to blueprint compute-manager-objects

Change-Id: I241876b6b2ebdb2313e472c043fcc73c6ddd0e1a
Merge "Add a get_root_bdm utility function"
Merge "Move is_volume_backed_instance to new style BDM"
Merge "cleanup after boto 2.14 fix"
Merge "Make aggregate methods use new-world objects"