Add subnet routes to network_info when Neutron is used

This change adds subnet routes to the network_info.

Extensions and future code will now have access to subnet routes.

Change-Id: I0827494dd5c95eb596e526204a2d94fcda2bb0dc
Closes-bug: #1315207
Forcibly set libvirt uri in baremetal virtual power driver

To ensure the baremetal virtual power driver is able to control
all the available libvirt domains when connecting to the remote
libvirtd host, we enforce virsh to use the 'qemu:///system' uri.

Enforcing it to 'qemu:///system' should not break existing
deployments while also fixing issues appearing when it is not
set, see tripleo bug 1226310.

Finally, while the uri is an actual config parameter for the Ironic ssh
driver, Nova baremetal is in soft freeze so it seemed more appropriate to
just avoid polluting the config file with deprecated, obscure settings.

Change-Id: I1c956bb9fa6fd365ebeea42d374c800455293e2b
Related-Bug: #1226310
vmwareapi: remove unused fake vim logout method

Unused since I50acb4f1e85650f4c6dffe1a1d25842601be96bf removed the
__del__ implementation from the session.

Change-Id: Id3bc92d0c029eb86a43a67de7b9f2311d3a8e20c
Pass instance to _reschedule rather than instance_uuid

This is needed so that we can refactor _instance_update and pass the
instance object through to _instance_update and avoid out-of-band trips
to conductor to update an instance object and then have to refresh the
object elsewhere to get database updates.

Part of blueprint compute-manager-objects-juno

Change-Id: Ie9fcf16a7f7c32613e3f01dccd91da190c442ea7
VMware: optimize VM spawn by caching the vm_ref after creating VM

Commit cebcb28357131a2bf4761bbddebbedf2a7951a11 ensured that the
vm_ref was returned when the VM was created. We now cache this value
to save remote calls to the VC.

Change-Id: Ife2e64703f72a5b4f9b6f5b3cdfb63c2df5cadf7
Handle InstanceUserDataTooLarge at api layer

compute layer might raise InstanceUserDataTooLarge exception,
this patch catches the exception at API layer and handle it.

Closes-Bug: #1338473

Change-Id: I881e526eaa51ab28316f643430d904f620123d56
Change instance disappeared during destroy from Error to Warning

Currently Nova logs an error if a libvirt domain disappears during
while waiting for it to be destroyed, but the code actually treats
this (correctly) as a recoverable situation since the end result
is the required one. Hence this should be logged as a warning not
an error.

Change-Id: Ie72cd11e22c5f049d3263e58bec286914798147a
Closes-bug: #1336767
VMware: add in test utility to get correct VM backing

Tests were reading the fake backing's but getting the first fake
VM and not the specific fakes VM. This patch adds a method that
returns the running fake VM record.

This is part of blueprint vmware-hot-plug

Change-Id: Ibdc9834e7fdf52019cea9b543dedadf93cdeb224
hyperv: make method signatures match parent class

Fix any inconsistencies in method signatures between the
hyperv driver impl and the ComputeDriver parent class.
Add a test case to prevent future regressions

Partial-bug: #1333219
Change-Id: Ie94042b0ea1ec4f752736e245b7af24400d117db
Merge "VMware: add in test utility to get correct VM backing"
Require posix_ipc for lockutils

Nova commit 01b208a06c6841b7e03e2a8657941cad1947b453 brought
oslo-incubator commit edce46cf5efd6d738d379205f9bf526a498845e3 over to
nova but didn't update nova's requirements.txt to require posix_ipc,
which is required for that code in lockutils.

Closes-Bug: #1338644

Change-Id: Ic6bb599b31436732cfa71a17272777bace8dfc88
VMware: consolidate common constants into one file

These constants will be used in patches that are related to the
blueprint vmware-hot-plug and the blueprint vmware-spawn-refactor.

Change-Id: I5f9cf11f77f3365487e12b96318514114b90aeff
Merge "Change instance disappeared during destroy from Error to Warning"
Merge "hyperv: make method signatures match parent class"
Merge "vmwareapi: remove unused fake vim logout method"
Merge "Pass instance to _reschedule rather than instance_uuid"
Merge "Add subnet routes to network_info when Neutron is used"
virt: move get_cpuset_ids into nova.virt.hardware

The nova.virt.cpu module has a single helper method for
getting the instance vCPU pin list. The new module
nova.virt.hardware is intended to be a single place for
all helpers related to guest hardware configuration, so
it is a natural place for the get_cpuset_ids method.
Rename it to 'get_vcpu_pin_set' to slightly clarify its
purpose too.

Blueprint: virt-driver-numa-placement
Blueprint: virt-driver-cpu-pinning
Change-Id: Id106737dc40471e8d31fbc002256b70e0b6ad5f6
virt: split CPU spec parsing code out into helper method

The get_vcpu_pin_set method in nova.virt.hardware will
parse the value of the CONF.vcpu_pin_set parameter. The
code for parsing CPU specs is needed in a number of other
contexts, so split it into a separate parse_cpu_spec
method that accepts a string, instead of hardcoding the
CONF.vcpu_pin_set string.

Blueprint: virt-driver-numa-placement
Blueprint: virt-driver-cpu-pinning
Change-Id: Ia9df3a7bebd691efc2143e141b2c6eef2f1c326c
vmwareapi: make method signatures match parent class

Fix any inconsistencies in method signatures between the
vmwareapi driver impl and the ComputeDriver parent class.
Add a test case to prevent future regressions

Closes-bug: #1333219
Change-Id: Ic361a922a1aefa5b5a3470c0547e694d073d2d58