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
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
hyperv: Initialize target_iqn in attach_volume

The target_iqn is referenced before it is declared in the
case that an exception is encountered in _login_storage_target
or _get_mounted_disk_from_lun.  This causes the exception path
to cause an additional, misleading, traceback to be printed
after an exception is encountered.

This commit initializes target_iqn at the beginning of
attach_volume to avoid the traceback.

Change-Id: I1cdfb9dfa054ee4f4f6918d7bc49081ccaebab9d
Close-Bug: 1233837
Fix divergence in attach_interfaces extensions

I pointed out in revision 7 of Ibe4cbd025700aa0d73a6d4d19fbf8f0005509428
that it we shouldn't use a different variable name in the identical code
shared between the v3 and v2 extensions, but that was never fixed before
merging.

Change-Id: I7c2853db2cbad30a37efd98947ebe687b37bfbe8
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
VMware: remove deprecated configuration variable

Removes support for vnc_password configuration variable.

Closes-bug: #1235118

Change-Id: I70fd7d3ee06040d6ce49d93a4becd9cbfdd71f78
Plug Vif into Midonet using Neutron port binding

Currently Midokura uses its own script (mm-ctl) to bind ports. However, support
for using this script is left out of the nova and neutron projects. This causes
confusion and makes deployments unnecessarily complicated for customers using
Havana. This fix is to change nova to properly use mm-ctl. Corresponding
changes will be submitted to devstack and neutron.

Change-Id: I7c9edded5ab6fe19b63e54cd6905d9242e4a90cc
Closes-Bug: 1235132
VMware: fix bug with booting from volumes

When booting from a volume without an image reference would cause
an exception.

Change-Id: Ib0302197b8d4f5e054a8c4426cb0dde7cb82842e
Closes-bug: #1235022
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
Fix root disk not be detached after deleting lxc container

Add teardown_container action when cleanup lxc instance to make
sure root disk be detached and no resource leak.

Fixes: bug #1208387
       bug #1203927

Change-Id: I063fd3a9856bba089bcde5cdefd2576e2eb2b0e9
Fix status code of server's action confirm_resize for v3

The status code of confirm_resize should be 202, but it
returns 204 now. That because it returns HTTPNoContent
that overwrites the status code of decorator 'wsgi.response(202)'

And adds API samples for confirm_resize that used to test
the status code of confirm_resize.

Partially implements blueprint v3-api-unittests
Closes-bug: #1233561

Change-Id: I50a3046866af0a1efdb5c41ded40f973b02843e8
catch exception in start and stop server api

this catches exception.InstanceIsLocked in start and stop
server api.

Closes-Bug: #1233026

Change-Id: Ibb882178ab0770837702d503ef88c6510072e33f
baremetal: Use network API to get fixed IPs

Previously baremetal volume driver used DB API to get fixed ips and
DBNotAllowed was raised.

Change-Id: Ie2281311af1b60f55b5b719a2e2df6316bbaa9f6
Partial-Bug: #1208707
Use print function rather than print statement

This is for Python 3 compatibility, since Python 3 does not support
the print statement, only the print function.  (Python 2.6 and 2.7
support both, depending on whether a __future__ import is used.)

Paths containing "xen" were left alone, because of comments in a
couple of the files indicating that the XenServer code needed to be
compatible with Python 2.4.

Fixes bug 1226943

Change-Id: I23b804a4d99500b4acf81dd19645ab06dfcc9f1c
Fix typos in nova/api code

blueprint fix-nova-typos

Change-Id: Idd9c5458c5fc0facd9f3c55f907acb7acc4c1b0f