Switch to Oslo-Incubator's EnvFilter rootwrap

Nova-Network used to have its own class for DnsMasq rootwrap
filtering. This was generalized into a new EnvFilter rootwrap
filter that can specify both commands and environments to pass.

Update to openstack.common.rootwrap to git a117358 of
oslo-incubator's rootwrap. This includes the following commits
merged from oslo:

    3b16d31 Remove DnsmasqFilter and DeprecatedDnsmasqFilter
    f9d1a59 Handle empty arglists in Filters
    233baa2 Handle empty PATH environment variable
    3e74c00 Add IpFilter, IPNetnsExecFilter and EnvFilter
    8b95b1e Handle relative path arguments in Killfilter
    7119e29 Enable hacking H404 test.
    ea78eec Update KillFilter to stop at '\0' for readlink() function.

Related to: blueprint quantum-common-rootwrap

Change-Id: I125e5724259850dc4768fb236cbfa5df199008c0
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
Removed code for modular exponentiation, pow() already does this

Change-Id: If21cbcbeb60618769e1659a90381416dfc43ebc4
Cleanup exception handling on evacuate

Some cleanup around catchall exception handing
on evacuate v2 extension to bring it in line
with v3 exception handling. Tests included.

Fixes bug 1210570

Change-Id: I2f2f958acb80240c0fb25f3d538fa204611a33d1
Fix H501: Do not use locals() for string formatting

Change-Id: Ide587d3311c22f698a82eeee210c5bdbe24eb484
Remove clear_rabbit_queues script

The clear_rabbit_queues script has been around forever, but it doesn't
appear to be widely used - e.g. there is no user documentation for it
and I don't see any mentions of it on mailing lists or Q&A forums.

Also, RabbitMQ now includes a management plugin and CLI which allows
you do do e.g.

  $> rabbitmqadmin delete queue name=$topic
  $> rabbitmqadmin delete queue name=$topic.$host
  $> rabbitmqadmin delete exchange name=nova

oslo.messaging does not expose an API equivalent of this command since
even the existance of a queue is transport driver specific. We could
consider adding transport-specific admin CLIs, but probably not where
the transport already has suitable admin CLIs elsewhere.

For reference, this script was added by this merge:

  https://code.launchpad.net/~mdragon/nova/lp794635/+merge/71437

blueprint: oslo.messaging
Change-Id: If5e6354e8ace4c0b4425c96de558a5cbab4c98bd
Port "Accept is_public=None .." to v3 tree

The following commit(I2a9b1c24cd744c8819c1d41e0ad103d05398401c) have
not been merged to v3 tree now, because the commit was merged to the
existing api after porting flavors.py to v3 tree.

    commit 645c2d3a06bbf8b0854ebcc539ad33dd706866c5
    Author: Xavier Queralt <xqueralt@redhat.com>
    Date:   Wed Jun 12 14:59:29 2013 +0200

        Accept is_public=None when listing all flavors

This patch ports the commit to v3 tree.

Partially implements blueprint nova-v3-api

Change-Id: Id1ff1366c16f0caac50e279b2add5ec9d9b9bf5f
Moves compute.rpcapi.prep_resize call to conductor

This patch moves the prep_resize logic out of scheduler.manager
and creates it on conductor.manager.ComputeTaskManager.

Partially implements bp cold-migrations-to-conductor

Change-Id: I8458071fb13505f55f8d2155c9ec5ee938b1005f
Merge "Fix H501: Do not use locals() for string formatting"
Merge "Cleanup exception handling on evacuate"
Merge "Port "Accept is_public=None .." to v3 tree"
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
Merge "Remove clear_rabbit_queues script"
Merge "Removed code for modular exponentiation, pow() already does this"
Merge "Moves compute.rpcapi.prep_resize call to conductor"
libvirt: sync get_available_resources and get_host_stats

get_available_resources is actually used by the scheduler while
get_host_stats was previously used, and is still used for host
capabilities.  This patch makes get_available_resources and
get_host_stats use the same logic to clean up the code. As part of
making them use the same logic, some of the unused data returned from
get_host_stats is changed to be what get_available_resources expects.
This is also in preparation for removing the periodic RPC fanout from
compute nodes to the scheduler.

This patch cleans up libvirt and fake drivers only.  This is not needed
for other virt backends as this is a cleanup only.  Further cleanup of
libvirt and other drivers will happen after get_host_stats isn't used
for the compute fanout to schedulers.

Because this makes a change to the fake driver, several api samples
needed to be changed as well. The fake driver is changed so the
test_virt_driver tests can continue to be used

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

Change-Id: I1eec5c117a1cb0490e9f9c09e731909bc31698a9
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