List AZs fails if there are disabled services

Trying to list availability zones when there is a disabled
services fails with a 500 error

Fixes bug #1160841

Change-Id: Ibdb639f0d6a1a69a6a6331ee053c75449a16fc8f
(cherry picked from commit ea663f3627ff11eea90e457c3b53432d640c63b2)
Add a format_message method to the Exceptions

This patch adds a format_message method to the NovaException class that
will almost always do what a user wants, when they want to print out the
message of the exception.

Exceptions that are received through RPC are turned into an actual
exception classes by the deserialize_remote_exception function of the
nova.openstack.common.rpc.common module. This function then overrides
__str__ and __unicode__ methods of a new class to print the whole trace.
We still want to preserve this functionality (for logging) but do not
want to leak the trace back to the user in the HTTP response.

Based on the above, This patch attempts to establish a convention that
states: if you need to get the message of a NovaException subclass -
always use the format_message method. Only use str(e) or unicode(e) when
you suspect that they were overriden.

Initially this was attempted through adding a custom metaclass to the
NovaException class so that format_message cannot be overridden in
subclasses, however due to a bug in testtools - many tests were failing.
A patch was proposed to testtols to remedy this
(https://github.com/testing-cabal/testtools/pull/34) however until it is
merged, we cannot use metaclasses with our exception classes as they
cause tests to fail.

Change-Id: I0a399b9ab3227bad644b031c9b689fe0ce64586e
(cherry picked from commit b936df8c1ec47300540403ebb6833f0fbf5f195f)
Use format_message on exceptions instead of str()

This patch changes all usages of unicode() and str() in the API layer
(and most other reasonable places) into a new format_message method.
This is done in order to avoid leaking the stack trace back to the
user through the Remote excepitons.

This patch deliberately avoids the EC2 api as the way how the EC2 API
handles responses is being worked on as part of another blueprint.

Fixes bug 1159755

Change-Id: I04a74682c4fac9a66ba25b52fd5c7af5e10e81e8
Merge "Add a format_message method to the Exceptions" into milestone-proposed
Merge "Use format_message on exceptions instead of str()" into milestone-proposed