xenapi: simplify PV vs HVM selection logic

The logic to inspect a disk to determine if an image is PV or HVM has
been removed. This change follows on from that simplification.

As before, if I user wants to use PV mode, or HVM mode, then can set
vm_mode=xen or vm_mode=hvm, respectively. This will override any other
way of selecting the mode.

For consistency, we now check the os_type to be either windows or linux,
which, without vm_mode, chooses HVM or XEN mode respectively.

For backwards compatibility, all VHD and DISK type images default to
vm_mode=xen.

In all other cases, we default to HVM, as this is the safest option
that works with most images.

Fixes bug 1206828
DocImpact
Change-Id: Iab2ffdc7ad396b853c7aed20d46bf12320b76c21
Remove whitespace from cfg options

This extra whitespace will cause warnings in the openstack-manuals,
thus remove it.

Change-Id: I8364ea0a52093f6dd3abeb6913790401e6ec112f
xeanpi: pass network_info to generate_configdrive

Currently network_info is being fetched when generating config drive.
This change ensures the network_info that is already available is
re-used when generating the config_drive.

In addition, it is more consistent to use the network_info that is
passed into this function, rather than potentially lazy loading the
whole info_cache of the instance from the DB, which may not yet be
populated when we are generating the metadata for ConfigDrive anyway.

Fixes bug 1224508
Change-Id: I3e6f5a987593ecd422be61ac50c0d74463ba25d5
Libvirt: disallow live-mig for volume-backed with local disk

This patch makes libvirt raise an error if a live migration was
requested without shared storage for a volume-backed instance, if that
instance has any local disks.

The reason is that without shared storage, local disks will be
re-created on the destination node which can result in loss of data.

Change-Id: Ic96dabf6020e957309280862b325792faf44b1f5
Closes-bug: 1236356
Migrate InstanceAction and InstanceActionEvent objects to Fields

Related to blueprint structured-object-fields

Change-Id: Iaa6ac059adae21dea58660ada22e9bdae22c9cc5
Migrate InstanceGroup object to Fields

Related to blueprint structured-object-fields

Change-Id: I40f81932213126cc90d818be9a64c16e57122592
Migrate Quotas object to Fields

Related to blueprint structured-object-fields

Change-Id: I6ae12b8eef93aa3015674c27e7f50f486d9e9c17
Migrate ComputeNode object to Fields

Related to blueprint structured-object-fields

Change-Id: Ice70ea1461efdba8b9e7cb0e47fd1335348eef8d
Migrate Service object to Fields

Related to blueprint structured-object-fields

Change-Id: Ibdc7231d1e6bcfb318643aab7c73dafad99ccb11
Migrate InstanceFault object to Fields

Related to blueprint structured-object-fields

Change-Id: I832f4af2e517ebbc28ace32a78730dbd3f87fb45
Migrate InstanceInfoCache object to Fields

Related to blueprint structured-object-fields

Change-Id: I202769261e28aba5682fd0db1762bfa3b5e0461a
Migrate PciDevice object to Fields

Related to blueprint structured-object-fields

Change-Id: I0cef2ccef728f9e220ab19f0a8717526b5bd1650
Fixes error on live-migration of volume-backed vm

Live-migrating a volume-backed vm (i.e. booted from volume)
is currently broken.

This patch fixes the case where a volume-backed vm is to be
live-migrated without shared storage on compute nodes or
ephemeral volumes attached to the instance. Specifically, it
stops create_images_and_backing() from blowing up when no disk
info is supplied.

Change-Id: Icec7a6e7225ebe029e24d3be303c9ab01818f30e
Fixes: bug 1235182
Make quota sets update type handling a bit safer

bug 1238949

Change-Id: I8d3ba10f55c272e0e45466d9b2db7a842e363da3
Merge "Migrate InstanceAction and InstanceActionEvent objects to Fields"
Add variable to expand for format string

Also, add a space to separate words.

Otherwise, you can get a warning message similar to this:

2013-10-03 19:45:48.086 12123 WARNING 186_new_bdm_format [-] Got an unexpected block device %sthat cannot be converted to v2 format

Change-Id: I7f32e9d93d524a0763918d636f43bd7d2638b5de
Merge "Migrate InstanceGroup object to Fields"
Merge "Migrate Quotas object to Fields"
Merge "Migrate ComputeNode object to Fields"
Merge "xenapi: simplify PV vs HVM selection logic"