Change arguments to volume_detach()

Most compute API calls accept an instance object.  To be compatible with
cells, volume_detach() should as well.  Also change it to accept the
volume object, instead of just a volume ID.  This lets us proxy the
volume object to child cells a bit more easily.

This removes 2 skipTests that we have related to volumes and cells.

Fixes bug 1157408

There was also a check that if instance_get_by_uuid() returned no
instance, it VolumeUnattached should be raised.  However, this check
would never work as InstanceNotFound would have been raised.  This
patch also corrects that.

Change-Id: Ide35ad5d8e147f6bd21b5840b901363dab0eae38
Fixes passing arbitrary conductor_api argument

Fixes bug #1158679

Change-Id: Iabe1f58b6139f5619e328a986143e8591b3a02cc
Initialize compute manager before loading driver.

The compute virt API uses the conductor API instance on the compute
manager.  Make sure the compute manager has been fully initialized
before loading the driver and passing it the virtapi instance.  This
prevents the possibility of the driver calling back into the compute
manager and using something not initialized yet, such as the conductor
API in the case of this bug.

This patch also moves initialization of a member variable up above
super(), where the rest of the initialization is.  There doesn't appear
to be a reason for needing to have it at the end.

Fix bug 1156490.

Change-Id: I19684f24d590201d135336107425c2be2f74c83e
translate cinder BadRequest exception

if we attempt to create a volume with values that are invalid (like
a non numeric value for size) we properly get a BadRequest returned
from cinder. However we inproperly pass that cinderclient exception
all the way to the top of the request process, causing a stack trace
to appear in the logs because this is an exception type Nova doesn't
understand.

This situation is triggered by Tempest on every run, and while the
return is successful, the stack trace might spook people.

Fix this by increasing the scope of the existing
_reraise_translated_volume_exception() method. Longer term it would
make sense to have a decorator that handles all possible exceptions
we'd expect from cinder client and turn them into Nova exceptions.

This reduces the number of stack traces in nova-api by 6 on a
successful Tempest run.

Fixes bug #1158505

Step towards blueprint no-stacktraces-in-logs

Change-Id: Ifcfbd5eb11fe9f038f648ca5291499290b7126b1
Merge "Change arguments to volume_detach()"
Merge "Fixes passing arbitrary conductor_api argument"
Merge "translate cinder BadRequest exception"
Merge "Initialize compute manager before loading driver."
py2.6 doesn't support TextTestRunner resultclass

Updates tools/colorizer to account for the fact that Python
2.6 doesn't support resultclass.

This fixes issue in trying to use run_tests.sh on distributions
which use python 2.6.

Fixes LP Bug #1158940

Change-Id: I763cd9c7a4b5ec5baaad3a3d9ee96e6e3cd13b3e