Remove old legacy network info model in libvirt driver

Update libvirt driver, virt firewall and hypervisor unit tests to
use nova.network.model instead of legacy "network,mapping" tuple.

Partly implement blueprint nova-network-legacy

Co-author: Amir Sadoughi<amir.sadoughi@gmail.com>
Change-Id: I4d38bb81a4f64efdb78f5da52fbbb382981e0b96
Improve performance of driver's get_available_nodes

get_available_nodes() is called every time an instance is updated.  That
ends up calling get_host_stats(refresh=True), resulting in a
libvirt/XenAPI/etc call.  On a build of a new instance when the instance
record is updated often (task_state and progress), this results in a lot
of unnecessary driver calls.

This changes get_available_nodes() to take a refresh kwarg to pass
through to get_host_stats(), defaulting to False so that it uses
the cache.  Places that used get_available_nodes() and are sensitive to
stale data are changed to add refresh=True.  Also adds a helper driver
method for 'is_node_available'.  And make sure that even if drivers'
get_host_stats() methods get refresh=False that they refresh when they
have no stats.

Fixes bug 1210264

Change-Id: I22c8d70e3e70f2d2421915da66c2618688e0db2b
Clean up unimplemented methods in the powervm driver

There were several methods overridden from the base virt driver class in
the powervm driver but all they did was pass which can cause problems
with tempest, e.g. the tempest test for pausing an instance will timeout
waiting for the instance state to change. This change raises
NotImplementedError rather than passes so that tempest will fail out
quickly when testing something that the powervm driver does not
implement.

Also removes the overridden manage_image_cache method since it didn't do
anything, which is exactly what the base class does.

Added unit tests to make sure that methods which should simply pass do
and that tests which should raise NotImplementedError do that also.

Fixes bug 1205066

Change-Id: Ieaf256a5c0f54804686318d6cbd5877a5003c9eb
Add supported_instances to get_available_resource to all virt drivers

Add 'supported_instances' to the function get_available_resource for all
virt drivers (except libvirt which is done separately). This will help
make image_props_filter work without the RPC broadcast capabilities.

Part of bp no-compute-fanout-to-scheduler

Change-Id: If9eee203b3cbb12963dc55e4215d206cb5d81264
db: Add host_ip and supported_instances to compute_nodes

In order to remove compute capabilities being broadcast via RPC to the
schedulers, host_ip and supported_instances, the two pieces of data the
scheduler uses that aren't in the database today, need to be added.
In the scope of this blueprint, only the way the filters are getting
their data is changed, not how the data is generated or anything else.

host_ip is used by the affinity_filter and supported_instances is used
by image_props_filter.

Part of bp no-compute-fanout-to-scheduler

Change-Id: I72371260159c9fdffcdb57209095fc103b6dd79e
Make affinity_filters use host_ip from DB not RPC

Instead of using host_ip from capabilities, which are being removed, get the
host_ip from the same place the rest of scheduling information comes
from, the database.

Part of bp no-compute-fanout-to-scheduler

Change-Id: I56a1cbb1903c20b347469d0ee5a8c6d89a21c44e
Make compute_capabilities_filter use information from DB not RPC

Make compute_capabilities_filter directly use the data in host_state and
not the data capabilities data that is currently broadcast from the
schedulers over RPC, as this will be removed since it doesn't scale.

The filter name, compute_capabilities_filter, is kept the same to keep
backwards compatibility.

Once all the capabilities usage in scheduler filters is removed, the
capabilities RPC broadcast can be removed.

Part of bp no-compute-fanout-to-scheduler.

Change-Id: I846259b363a794803e230eaf25c69c52970b6c4f
Fix typo in exception message

fixes bug 1212438

Change-Id: Ib563fc10743600284a385fcbda1967c85182f542
Sync gettextutils from oslo-incubator

Partially implements bp user-locale-api

Change-Id: I1a053d9d0ad65ca90cac86196da68900b8fe112d
Merge "Add supported_instances to get_available_resource to all virt drivers"
Enforce compute:update policy in API

Now that compute/api.py:update() is no longer being called for instance
updates the policy check is no longer enforced.  This adds policy
checking back in at the API level so that the compute:update policy will
continue to function as it did before.

Bug 1212807

Change-Id: I365ad8ac2845d914deefb841c314a50f4869dba0
Merge "db: Add host_ip and supported_instances to compute_nodes"
Merge "Make affinity_filters use host_ip from DB not RPC"
Merge "Make compute_capabilities_filter use information from DB not RPC"
Merge "Fix typo in exception message"
Merge "Remove old legacy network info model in libvirt driver"
Merge "Clean up unimplemented methods in the powervm driver"
Fix cells manager RPC version

A previous patchset forgot to bump the version to 1.19.

Change-Id: Iecadcdcc4d75b9e9295f216b3375bfbf852a77e3
Refactor integrated tests to support V2 and V3 API testing

Refactors the integrated test classes so they can be used
for both V2 and V3 API testing. No actual V3 testing is
added in this changeset.

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: Ic7d7b513c3bc19ac1962c0a8489b55e9685fb7c0
Remove deprecated CONF.fixed_range

This was deprecated in Grizzly, and the TODO said remove for Havana.
fixed_range was deprecated in I4ec111079f7a1d253190e6a6008048f992a53f68

DocImpact: Remove deprecated config option

Change-Id: I1f429de7a7091adbd3a178d287b3a90e02664450