Add debug log for availability zone filter

Sometimes operator need information why the host doesn't pass
the check of scheduler, this patch adds information for available
zone filter if the host doesn't belong to required available zone
and modify the logic a little to make it less nested.

Change-Id: Icb45182fa58d69e7c5e3a77ea31eddc492ac46ec
Partial-Bug: #1301830
Revert "libvirt: add version cap tied to gate CI testing"

This seems like it was really a policy change that should have had
more community discussion.  I think it's appropriate to revert this
now and have this as a full community discussion about options here.

This reverts commit 3bfc25a74e9dfbeb664eecf89d959428713eb178.

Change-Id: Ie19b39e99b223862ca86b9a54c5372b56e1f5d74
Log cleanups for nova.network.neutron.api

This patch adds hints for log error and warning levels.

TrivialFix

Change-Id: Ibd516b41cc40afafe2dc37cdc5657d494c33c2cf
libvirt: make guestfs methods always return list of tuples

guestfs.GuestFS supports parameter python_return_dict with default
False in 1.22 (backported in 1.20). This indicates that your program
wants to receive Python dicts for methods in the API that return list
of tuples. See http://libguestfs.org/guestfs-release-notes.1.html
In a future version of libguestfs, its default value will be True,
then that will break the code, to avoid this, we'd better force
python_return_dict as False. See http://libguestfs.org/guestfs-python.3.html

This commit makes method inspect_get_mountpoints always return list
of tuples.

Change-Id: I8211cb31a7a890f86cdd818767b3d5e8cfd5bbed
VMware: implement get_host_ip_addr

This patch fixes a regression caused by commit
1deb31f85a8f5d1e261b2cf1eddc537a5da7f60b. The function get_host_ip_addr
is used by the resource_tracker and if it is not implemented all resize
operations fail.

Also put back the check for missing host, user, password config options
in the driver constructor.

Closes-bug: #1356449

Change-Id: I4ba6a0f9c3b9c2ce0e1750f8414625235d01d422
Return 404 instead of 501 for unsupported actions

Change unsupported actions return code to 404 from 501 to ensure
consistency with other unsupported actions in the REST API.

Change-Id: Ibf40ef9108f209b70ffbab6e2387d2d469f7373e
Fix live-migration failure in FC multipath case

Currently, /dev/dm-<NUM> instead of /dev/mapper/<multipath_id> is
used to access multipath FC volumes by Compute Node and
multipath_id in connection_info is not maintained properly and
may be lost during connection refreshing.

This implementation will make source Compute Node and destination
Compute Node fail to disconnect/connect to volumes properly and
result in live-migration failure.

To fix it, /dev/mapper<multipath_id> will be used instead of
/dev/dm-<NUM> to access multipath devices, just like iSCSI multipath
implementation, and logic to preserve the unique (across Compute
Nodes) multipath_id is also added.

Change-Id: I17f15852c098af88afd270084c62eb87693c60d4
Closes-Bug: #1327497
Backport v3 api unittest into v2 api for attach_interface extension

On most APIs, the unit test coverage of v3 is better than the one of v2.
This patch ports v3 attach_interface API tests to v2 tests for improving
v2 attach_interface API tests

Change-Id: Ie93175602dbced361d76abbe35a7767a96d9e68e
Merge unit tests of "create a flavor" API

In test_flavor_manage, there are success/bad_request tests of
"create a flavor". Most parts of them are duplicated.
This patch merges them for the readability and clarifying their
purposes.

Change-Id: Ic7fa319674594f4470b6eafd3e07e7c467b99477
Use common get_instance function in v2 attach_interface

This patch use common get_instance function in v2 attach_interface.
That can make the instance behavior consistent with v2.1 api. Then
v2.1 and v2 can share same unittest.

Change-Id: Id531377d5d34d76a4ffafaa02ecab585cbcb369b
Resize block device after swap to larger volume

After swap to larger volume, instance's block device should be
resized. Otherwise, the guest can't utilize the extra space.

This patch make the libvirt driver resize block device after mirror
the volume. And add new parameter 'resize_to' to virt driver, that
is used to indicate the new size.

Change-Id: Ib4d65e8812c7d3c28100155124218c75a94e16e7
Closes-Bug: #1341459
Add new db api get functions for ec2_snapshot

This patch adds two new getters for EC2 snapshot mappings to the db
API.  The existing getters don't return the full db model.  Instead,
they only return an ID or UUID.  The full db model is needed when this
gets converted over to a nova object.

Related to blueprint convert-ec2-api-to-use-nova-objects

Change-Id: I8e2ed5086a7768f373d35c2f34386f2d30d11e07
VMware: revert deletion of cleanup_host

Commit 1deb31f85a8f5d1e261b2cf1eddc537a5da7f60b removes cleanup_host
by mistake. This adds the missing method back.

Related-Bug: #1355875

Change-Id: If695bf00613fe389af91f453dbc8191698d95a94
Merge "Revert "libvirt: add version cap tied to gate CI testing""
Merge "VMware: revert deletion of cleanup_host"
Merge "Fix live-migration failure in FC multipath case"
Merge "Add new db api get functions for ec2_snapshot"
Merge "Merge unit tests of "create a flavor" API"
Merge "Log cleanups for nova.network.neutron.api"
Merge "Add debug log for availability zone filter"