Don't change the default attach-method

Don't change the default attach-method.  The one configured by the
libguestfs packager is supposed to be correct for all libguestfs
users, and making ad hoc changes to it is not advisable.

For more information, see:
https://bugzilla.redhat.com/show_bug.cgi?id=984409#c8

Fixes bug: 1220102
Change-Id: Ie7726c37dd579e2c95b6156a9ddfdff9e855af83
Utilizes assertNotIn

Using assertTrue and the 'not in' operator to test
if an element is in a sequence is too python2.4.
Our unit testing framework supports assertNotIn,
which was created for these types of tests.

This patch is a mere sed replace of one-liner assertTrue and assertFalses

grep -lR "assert.* in " nova/tests/* | \
xargs sed -ri 's/(\W+self.assert)True(.+) not in (.+)(\)$)/\1NotIn\2, \3\4/'

grep -lR "assert.* in " nova/tests/* | \
xargs sed -ri 's/(\W+self.assert)False(.+) in (.+)(\)$)/\1NotIn\2, \3\4/'

Change-Id: I99471c81b0cbcd46bb48aca8570f3234f2924f60
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
Fix "resource" length in project_user_quotas table

"nova quota-update --injected-file-content-bytes 1024 --user <user> <tenant>"
is executed, the result is like the following:

$ nova quota-update --injected-file-content-bytes 1024 --user [..]
ERROR: The resource could not be found. (HTTP 404)
$

This is due to invalid length of resource in project_user_quotas table.
Current length is 25 and "injected_file_content_bytes" is shortened to
"injected_file_content_byt":

mysql> select resource from project_user_quotas;
+---------------------------+
| resource                  |
+---------------------------+
| injected_file_content_byt |
+---------------------------+

The resource of project_user_quotas table has been changed to invalid
length(25) since I56ad98d3702f53fe8cfa94093fea89074f7a5e90. The change
does not seem intention, that would be just a bug.
This patch fixes the problem.

Closes-Bug: 1227434

Change-Id: I3e080c30698dde62625eb477a85e1816191ff1e5
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
Merge "Fix "resource" length in project_user_quotas table"
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