attach/detach_volume() take instance as a parameter

Previously the methods take instance['name'] as a parameter.
With this change, ComputeDriver can lookup informations about
the instance from hypervisor (in bare-metal driver, it is a local DB)
by any other attributes of the instance.

blueprint general-bare-metal-provisioning-framework

Change-Id: Ibd0567f34ed5053909ce1a408f9cbf87516ba597
Added sample tests to FlavorRxtx API.

Partially implements blueprint nova-api-samples
Fixes bug 1091743

Change-Id: I400e627cfc499b3e7bb1c88d6ce7d24b4d222b84
Enable Aggregate based availability zones

Instead of implementing availability zones in the service table,
availability zones are implemented using general aggregate metadata.

This patch does not remove availability zones from the service table, a
latter patch will do that.

* In theory supports a single compute node in multiple availability zones
* Drop availability_zone column from Aggregate table (is now a property)
* map aggregate metadata 'availability_zone' so API does not change

Implements blueprint aggregate-based-availability-zones

Change-Id: I2a2ac5bfaa526d639dff5efa392c051347dbd9bb
Remove availability_zones from service table

This is the final step in enabling availability_zones using aggregate
metadata. Previously all services had an availability_zone, but the
availability_zone is only used for nova-compute.  Services such as
nova-scheduler, nova-network, nova-conductor have always spanned all
availability_zones.

After this change only compute nodes (nova-compute), will have an
availability_zone. In order to preserve current APIs, when running:
* nova host-list (os-hosts)
* euca-describe-availability-zones verbose
* nova-manage service list
Internal services will appear in there own internal availability_zone
(CONF.internal_service_availability_zone)
Internal zone is hidden in euca-describe-availability_zones
(non-verbose)

CONF.node_availability_zone has been renamed to
CONF.default_availability_zone and is only used by the nova-api and
nova-scheduler. CONF.node_availability_zone still works but is
deprecated

DocImpact

Completes blueprint aggregate-based-availability-zones

Change-Id: Ib772df5f9ac2865f20df479f8ddce575a9ce3aff
Import latest timeutils from oslo-incubator

Fixes bug #1097464

Changes synced are:

 a08daf1 Use basestring instead of str for type check.
 615d769 Account for tasks duration in LoopingCall delay
 ce80aac Convenience wrapper for datetime.timedelta.total_seconds()

Change-Id: If4ab7ccd2f4e815e01c41f25fdd541ffcd7693d5
Merge "Added sample tests to FlavorRxtx API."
Merge "Enable Aggregate based availability zones"
Merge "Import latest timeutils from oslo-incubator"
Merge "Remove availability_zones from service table"
Merge "attach/detach_volume() take instance as a parameter"