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
xenapi: refactor: move UpdateGlanceImage to common

During the review of https://review.openstack.org/41651 it was
recommended to move UpdateGlanceImage to a common library. A bug was
filed to deal with the refactors. This change fixes the first part.

Fixes bug 1220596

Change-Id: I95ae89525b7e6768c5a70364945d5a10cb906d88
xenapi: Resize operations could be faster

 * Improves the code by using only one time resize2fs during the resize.
 * Removes the not used method: "_get_min_sectors".
 * Uses a VDI clone instead of copy in resize_disk's method.
 * Review of some test cases to accept the new behavior
   without _get_min_sectors.

Closes-Bug: 1221332
Change-Id: I40a1d7d467353ba904689d128de7f89d785b4052
Fix incorrect exception raised during evacuate

This change creates a new exception 'ComputeServiceInUse'
to better represent the error when trying to evacuate
an instance with a running compute service. Also, it adds
a missing test for evacuate API v3.

Closes-Bug: #1230282

Change-Id: I1c4edb01e84cd2a89879bca9c99f5e38f47e16fb
Adds V3 API specific urlmap tests

Adds V3 API versions of the urlmap unittests. These test that
the V3 content is returned when expected in the format expected.

Adds the extension plugin as being discoverage in the fake policy
files for the unitests to provide some easily known data to check
for the urlmap tests.

Updates extension info api sample tests

Partially implements v3-api-unittests

Change-Id: I67f2a3516ffee02b6dbf258ee35e1fd084ba060c
Fixes inconsistency in flavors list with marker

Flavors list with marker is supposed to use flavorid as the marker since this is
the only id attribute the users can see, but it was using id (the confusion was
probably caused by the fact that flavorid attribute shows up to the user as id).

The change on db unit test shows makes the bug evident, and justify the changes
on the filter_by criteria.

Fixes bug 1226698

Change-Id: I3ffa636febb63be796fffc94be6486bf74e8239b
Sync three-part RPC versions support from Oslo

Change-Id: Ia93e7a6d978374e0dcf49c2be230c67e41a7bd14
Move `utils.hash_file` -> `imagecache._hash_file`

`hash_file` is only used by `imagecache` so it doesn't make sense (yet) for it
to be included in utils.

Change-Id: I2f4d1deb03e4afceb911ef4b6d6ae6760ddca225
Fixes typos in the files in the nova folder

blueprint fix-nova-typos

Change-Id: I0971b98999381183c0c77fff1d569180606e338b
Fixes typos in nova/db code

blueprint fix-nova-typos

Change-Id: Ie2e9447790468aee14c6baee679c53d183c69f62
Fixes typo in ListTargets CLI in hyperv driver

Closes-bug: 1237432
Change-Id: Ie7b4cd744e2a4869a84ab42ad1a434628e39a3e6
Remove duplicated method in test_compute_api.py

Remove duplicated method test_stop_a_stopped_inst in file
nova/tests/compute/test_compute_api.py

Change-Id: I7222a4ba169440ca9cdc7b78a73db6afe2835c0e
VMware tests: replace assertEquals with assertEqual

In Python 2.6, both assertEqual and assertEquals are
convenience aliases to failUnlessEqual.

In Python 3, failUnlessEqual is explicitly deprecated.

This is part of blueprint assertequal

Change-Id: I4121817277c11e82e0ed63ef8bd1c1e4c951a018
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
hyperv tests: replace assertEquals with assertEqual

In Python 2.6, both assertEqual and assertEquals are
convenience aliases to failUnlessEqual.

In Python 3, failUnlessEqual is explicitly deprecated.

This is part of blueprint assertequal

Change-Id: I9c61bb5b3b6bd40018371aa5f17a3a96cff41a55
Update log message for add_host_to_aggregate

When add host to aggregates with availability zone, if the host
is already in one availability zone, then the host cannot be added
to another availability zone.

When user do above operation, nova api will report error message,
but the error message does not include blank space between
<availability zone> and zone name, also the error message include
two periods.

The fix was adding blank space and removes one period for the message.

Change-Id: I7307288be194d3ce6de05b77433bbe2626ae46d9
Closes-bug: #1237303
Libvirt: add boot_index to block device info dicts

Block devices have a boot_index parameter, which is used to determine the
boot device.

This patch makes it part of the device_info internal libvirt driver
structure so that we can make use of it to do fine grained boot ordering
in subsequent patches.

Related-bug: 1229327

Change-Id: I23f2f7637a6ed023785a0ffde050fbd43402c655
Libvirt: make boot dev a list in GuestConfig

In order to make boot order more flexible based on the block device
mapping passed, we need to customize the domain xml presented to
libvirt, by specifying more than one boot element. For more info see
http://libvirt.org/formatdomain.html#elementsOSBIOS. Currently the boot
element is hard coded to "hd" by the libvirt driver.

This patch makes it possible to specify more than one boot element that
will give us more flexibility.

Related-bug: 1229327
Change-Id: I38abe9edaa8f93469d58ad81a466f68c2c0d24d6
Libvirt: allow more than one boot device

This patch makes use of the boot_index information of block devices to
allow libvirt to boot from devices other than disks, and have more than
one boot device.

It does so by calculating the boot devices based on block devices type
and boot index, and then assigning the correct list to the GuestConfig's
os_boot_dev (that was made into a list in
I38abe9edaa8f93469d58ad81a466f68c2c0d24d6).

Closes-bug: 1229327
Change-Id: Ic33894cb818ee7c44579e6d00f273b40f669aa9b
Merge "Fix incorrect exception raised during evacuate"