Replace nova.utils.cpu_count() with processutils.get_worker_count()

cpu_count() was moved from nova to oslo-incubator via commit
85f178489a128a04a7ee3ed44018403caa109ef0 so it can be used in other
projects.

This change removes the duplicate code from nova and uses the renamed
method from oslo.

Change-Id: I03da77adf64e0495880343b7086f5907a2c5f75d
Use ebtables to isolate dhcp traffic

Iptables doesn't properly block the broadcast traffic crossing
the bridge, so use ebtables instead. Removes test which is no
longer valid since we are not using iptables anymore.

Change-Id: I43e5f1fe9512dd3ec9595c7203bc46837cef3cad
Closes-Bug: #1318104
vmware: Refactor: fold volume_util.py into volumeops.py

volume_util.py seems to have originally been intended to be a general
repository of operations on volumes. In fact, it was an arbitrary
collection of iscsi functions which were exclusively called by
VMwareVolumeOps with VMwareVolumeOps private data as arguments.

This change moves all functions from volume_util.py into
VMwareVolumeOps in volumeops.py. This makes it simpler to read and
understand the code, as there is now only a single place to look for
iscsi functions. It also moves StorageError into volumeops.py, as that
is the only place it is used. Arguments have been updated to use
private data directly rather than having them passed in. In addition,
function names have been updated to accurately reflect their actual
purpose.

There are no functional changes. All code change is purely mechanical.

Change-Id: I17f4b71c0314e555d9f7dc1a935865865dd06c51
vmware: Reuse existing StorageError class

Change-Id: If3061b8ebc5ca50a03428b67a0b941f07a314d04
vmware: Use exc_info when logging exceptions

There were several instances where we were logging exceptions as a
string, but from the context a full stack trace was intended. This
change updates these to use exc_info, which logs the exception with a
full stack trace.

Change-Id: I93ac0208c3643ac90ffb36e50ad59f49c66ad88b
Merge "Use _set_instance_obj_error_state in compute manager set_admin_password"
Use default rpc_response_timeout in unit tests

During running of tox the system can timeout on slower systems.
We have seen this occur in our internal tests and have seen
better results when we increased the api timeout from 15 to 60
seconds.  This can be used until faster hardware is availale
or a better fix is proposed.  Andrew Laski first proposed
this fix.

Closes-Bug: 1311778

Change-Id: I33da328e7bea8fbdde3f01ee0147b4c5a3a278d2
Merge "Use ebtables to isolate dhcp traffic"
Add missing image to instance booted from volume

When booting an instance from a volume, the image_ref for
the instance will be None. And the API do not get the image
information for the instance also. So when we calling the
related API, we get "" for instance.image.

Change-Id: I3c35ab1d7c8bcec551fb5d67d0b44418266b32a4
Closes-bug: 1317880
Merge "VMware: spawn refactor - DatastorePath class"
Merge "VMware: remove dsutil.split_datastore_path"
Merge "VMware: spawn refactor - Datastore class"
Merge "libvirt: add '_' prefix to some get_host_* methods"
Fix exception raised when a requested console type is disabled

The get_{vnc/rdp/spice}_console calls should raise
ConsoleTypeUnavailable not ConsoleTypeInvalid when the
corresponding console is disabled (rather than supplying an
invalid subtype).

Also removes exception handling of ConsoleTypeInvalid from the
os-remote-consoles V3 API plugin as the schema validation ensures
the input passed to nova internals is valid.

Change-Id: Ia444775ff6ec1d869d810bc689914efb8cd233a4
Merge "Add API schema for v2.1/v3 remote_consoles API"
effectively disable libvirt live snapshotting

As being seen in the gate, libvirt 1.2.2 doesn't appear to actually
handle live snapshotting under any appreciable load (possibly
related to parallel operations). It isn't a 100% failure, but it's
currently being hit in a large number of runs.

Effectively turn this off by increasing the
MIN_LIBVIRT_LIVESNAPSHOT_VERSION to something that doesn't yet
exist. This can get us back to a working state, then we can decide
if live snapshotting is something that can be made to actually work
under load.

DocImpact

Related-Bug: #1334398

Change-Id: I9908b743df2093c8dd2723af89be51630eafc99f
VMware: create utility function for reconfiguring a VM

A utility method has been created that simplifies the process of
reconfiguring a VM.

Change-Id: I184e2483726e29819164175493cfd1559592358b
Make Evacuate API use Instance objects.

Replace current instance dicts and conversions to Instance Objects.
Add services arg to create_fake_instance_obj.

Change-Id: I7ddf11ce17df254a8253461e17b5c6519cb7d6fe
Related to blueprint compute-manager-objects-juno
Merge "effectively disable libvirt live snapshotting"
libvirt: test setting of CPU tuning data

The setting of the libvirt guest <cputune> data from the
flavor extra_specs quota parameter was never tested. In
fixing this omission, it was noticed that the data was
incorrectly passed around as a string instead of an int.

Change-Id: Ie8b31feddf6c546eb05ca00ead5c56bcd535dd84