Make exception message more friendly

Exceptions that get returned via REST api
should have more user friendly message,
users shouldn't have to know backend concept.
more detail,see bug.

Change-Id: Idc20680e46c36fa3441838177ce61b6f5e1d2979
Closes-Bug: #1263204
Serialize the notification payload in json

When a notification payload is passed to the oslo.messaging the
payload must be correctly serialized.

This change encode the payload into json as the old rpc did.

Closes bug: #1279881

Change-Id: I99fc2a4b0e0146c9faa6abeddbd15cb24169e024
libvirt: adding a random number generator device to instances

In order for the virtio-rng device to be added to KVM instance,
hw_rng=virtio property should be set in Glance image metadata:

glance image-update \
       --property hw_rng_model=virtio \
       [image]

The cloud administrator will have the option to limit
or disable the use of this device by setting the following flavour
extra_specs:

hw_rng:allowed=True - Allow virtio-rng to be added to instances.
hw_rng:rate_bytes - The allowed amount of bytes for the the guest
                    to read from the host’s entropy per period.
hw_rng:rate_period - Sets the duration of a read period in seconds.

DocImpact
Partially implements blueprint libvirt-rng-device

Change-Id: I022e322a7c414e9d618e60c2879aee903732581d
Use instance object for delete

I was just checking to see where db.instance_destroy() was used and it appears
that this is the last case of using the db api directly for an instance destroy.
Convert it over to use the instance object method.

This patch also includes a unit test fix.  A stub had to be updated to account
for this change.  It turns out that the test wasn't actually verifying that the
stub was being called, though.

Part of blueprint icehouse-objects

Change-Id: Iaea4e8b46c90f3762b5f458acee024e14bfa974e
VMware: fix the VNC port allocation

There is small chance for VNC port collisions with the current
implementation which choose the port number based on the MoRef id
of the VM.
This patch fixes this by running a query for all allocated ports
and then selects one which is not taken.

Change-Id: If7c3b14dd49ed05c5fde819c5a36d5608650cbbc
Closes-Bug: #1255609
compute: invalid gettext message format

The message passed to gettext has an invalid format.

Change-Id: Id87659499ef7e73f3d60b458959ba06d4838273d
VMware: ensure that datastore name exists prior to deleting disk

Treats cases when there is no datastore defined on the VM. This
can result from a exception in the spawn method prior to setting
the datastore for the VM.

Closes-bug: #1276644

Change-Id: I808e1cdaace344da021853d0ef224cadee5a8e05
VMware: add a test for driver capabilities

Check the values of the driver capability flags.

Change-Id: If1b18c0a48efd90d6b3c113f73457c1d0f552bb1
Merge "VMware: ensure that datastore name exists prior to deleting disk"
Merge "compute: invalid gettext message format"
Merge "Use instance object for delete"
Merge "libvirt: adding a random number generator device to instances"
Merge "VMware: fix the VNC port allocation"
Merge "Make exception message more friendly"
Merge "Serialize the notification payload in json"
Merge "VMware: add a test for driver capabilities"