libvirt: Get driver type from base image type.

If we are using the raw backend (no cow), we should set the driver
type based on the type of the source image instead of always
using raw.

Calls to to_xml were moved after _create_image so that the image
type could be determined when creating the xml for libvirt.

Fixes bug 1163009

Change-Id: Ic8d5f0ab83d868a42f834d39c0afb64818d7e027
Import eventlet in __init__.py

All of this is because if dnspython is present in your environment then
eventlet monkeypatches socket.getaddrinfo() with an implementation
which doesn't work for IPv6. To turn this off you need to set an
environment variable before you do the import.

Resolves bug 1164822.

Change-Id: I2382db7b3ac4a2d940e0c45dfe3d48f499de2f16
Fix a bad tearDown method in test_quantumv2.py.

Cleanup code runs in LIFO order, so this was calling the mox methods
in the wrong order. Secondly the whole point of addCleanup is to
register code to run as soon as it is known that it should run, vs
tearDown which only runs if setUp succeeds, and doesn't know what
other code completed.

Change-Id: Iff3b91e9d43cc58b667b32cacc4b97b6e0e1f298
Evacuated instance disk not deleted

Adds disk cleanup in case instance is not on shared storage.
Added new methods to compute.rpc and virt.driver interface to validate
that instance files located on shared storage on remote compute node.

Fixes bug 1156269

Change-Id: Ia4cc601d0d824ba04f595df96461cfa85ad3b90c
Catch NoValidHost exception during live-migration

To avoid leaving the instance state as MIGRATING if scheduling of
a target host fails, add this exception to the list of exceptions
for which the instance task state is reset to None.

Resolves bug 1166771.

Change-Id: I23343091725051624c0eb0b82e9f03a7f9d5f4f4
Security groups may be unavailable

Currently all missing security group situations are reported as errors
and exceptions. This is not the case - any user requesting a wrong id
or name can cause it and it's not an issue in Nova. A busy system can
generate a large number of those messages causing unnecessarily high
error count.

This change stops reporting this situation as exception in the logs.

Change-Id: Ide856cbbde2db025b0e2def79652cc6c9b00566b
Merge "libvirt: Get driver type from base image type."
Merge "Security groups may be unavailable"
Merge "Fix a bad tearDown method in test_quantumv2.py."
Merge "Evacuated instance disk not deleted"
Merge "Import eventlet in __init__.py"
Merge "Catch NoValidHost exception during live-migration"
Add tenant/ user id to volume usage notifications

Volume usage notifications are generated to enable traffic based billing
on volumes. Include tenant id and user id to make these notifications
more useful to billing systems.

Fixes bug # 1158292

Change-Id: Ic71c10f0fc5d9e8c5a0e2f538de072e7ccca20ee