Use _lookup_by_name instead of _conn.lookupByName

use the helper function instead of the libvirt call directly
to allow NovaExceptions instead of libvirt exceptions to be thrown.

Change-Id: Ieac171e1a2bce1f5542ae73f3d8f6b7a5ccfa8f7
Partially implements blueprint xenapi-live-migration

This is dependent on refactoring of libvirt live migration.

Enables live migration using xenapi:
* works when both hosts are part of the same aggregate
* assumes shared storage is configured as the default SR

Limitations in this version:
* only works for images that don't have an external
  ramdisk/kernel

Change-Id: I74fc6aae9a615be7cefb1cf07755764df1af957a
Support EC2 CreateImage API for boot-from-volume

Fixes bug lp 988335

For fidelity with AWS, where the EC2 CreateImage API is only
supported for EBS-backed instances, we now support this API
for booted-from-volume nova servers.

We create a "place-holder" image in glance with the image data
being effectively empty, and the following properties set:

  * the imaged instance's kernel and ramdisk IDs
  * block device mapping containing the appropriate snapshot ID(s)

so that we can boot from this image without providing additional
context (such as via the nova boot --block-device-mapping option)

Change-Id: I0b3d18d7922f2ad1bc687fa88e2f5d4cf5aa068b
Display key_name only if keypairs extension is used

GET /servers/xxx will display the key_name only if the keypairs extension is
being used.

Fixes bug 1024986

Change-Id: Ie37880f63b7595ae3dd2f3b23c6c3097dac2f57c
Fixes XenAPI driver import in vm_vdi_cleaner

xenapi/connection.py was renamed xenapi/driver.py, it appears, but
vm_vdi_cleaner was not updated.

Also removed unused optparse import.

Fixes bug 1025912

Change-Id: Ia1a93400dc24455fe91fdf4283eb32bcca4037cf
Remove unused get_version_from_href()

This is unused since edf3e39c remove the v1.0 API.

Change-Id: I1f7c6203ffbe0248c7ef9e95a231c05a0113a347
Remove obsolete line in host_manager

Change-Id: Ic0b04953f27467dfa479dc94582a4c2d3480f53d
Merge "Fixes XenAPI driver import in vm_vdi_cleaner"
Info log to see which compute driver has loaded

Adding this log will help keep track if the
intended compute driver has loaded or it has been
misconfigured.

fixes bug 1021417

Change-Id: I6fd9e3b45aad36056882e8cef12b90bb8d7aea7b
Show all absolute quota limits in /limits.

This change adds currently missing absolute limits to the /limits response.

Fixes bug 1025294

Change-Id: I6a758dd683f70a0d006d5aa2840fcc2cb3243297
Merge "Support EC2 CreateImage API for boot-from-volume"
Merge "Remove unused get_version_from_href()"
Merge "Show all absolute quota limits in /limits."
Merge "Display key_name only if keypairs extension is used"
Update FilterSchedulerTestCase docstring

Change-Id: I91ea24747eba9f0f0090f923c5728ba2b85eb141
Fix the mis-use of NotImplemented

An exception object NotImplementedError() should be raised instead
of NotImplemented.

Change-Id: I0a3f0d99529b18d613f8fdb5fafa2d0307a66d86
Raise NotImplementedError, not NotImplemented singleton

NotImplementedError is for exceptions, NotImplemented is an error
singleton

Change-Id: I2bc42783c5bb92a32d7c3b0f5efab32a2e2f8fb6
Merge "Rename get_lock() to _get_lock()."
Merge "Partially implements blueprint xenapi-live-migration"
Merge "Raise NotImplementedError, not NotImplemented singleton"