enable hacking.py self tests

pep8 and hacking.py (by inheritance) have the ability to run self
tests via docstrings, if we format the comments correctly, and change
the docstring test regex. Include self testing in our normal pep8
tests.

fix the comments to actually be test case compliant

fix nova_import_alphabetical to pass on short import lists (only 2
lines, starting at the beginning of a file)

comment where it doesn't appear that hacking.py tests are working
(though there could be deeper black magic in some of them).

fix a doc string in pep8 self tests that breaks N301

fix the fact that pep8 error strings are supposed to start with
\w\d\d\d, we were just lucking out on some formatting because the
string NOVA happened to be only 4 chars long.

Add a couple of escapes so that we don't recursively fail on our
own fail self tests for comments. (boy that's fun)

Change-Id: I14d5e04cfc092b37ec4967cd7485e9975a5eb820
Move migration_get_..._by_host_and_node to conductor

This moves the remaining migration-related database call out of the
resource tracker to conductor:

  migration_get_in_progress_by_host_and_node()

Related to blueprint no-db-compute

Change-Id: I9bdf9fbbc3131964bf6078d19bf1cd9053a7e224
Reject user ports that have MACs the hypervisor cannot use.

If a hypervisor has requested specific MAC addresses, ports requested
by the user have to be in that set of MAC addresses, or they cannot be
used. Raising an error at network allocation time is cleaner than
waiting for the hypervisor to attempt to plug its vifs and error.

Change-Id: If556cc518a01df658044e3ba6b9d7584bfabe588
Override floating interface on callee side

We allow individual nodes to override the floating interface by setting
public_interface=XXX on the node. Unfortunately in multi_host an
associate or disassociate call can be forwarded from one host to
another. Currently the override happens on the caller side instead of
the callee side. This fixes the issue by moving the override.

Fixes bug 1096987

Change-Id: I37fbbf9e0ee0ffbe8c8754649301371b98da9f4f
Merge "Override floating interface on callee side"
Merge "Reject user ports that have MACs the hypervisor cannot use."
Add common config options for SPICE graphics

The VNC config options are shared across hypervisor drivers, and
while SPICE originally only supported KVM, it is now possible to
use it with Xen too. Thus, adding common SPICE config options
makes more sense than adding them to the libvirt driver only

DocImpact
Blueprint: libvirt-spice
Change-Id: I8e817530908c6fee0781b92dc9e27010951b4540
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add support for setting up <channel> elements in libvirt config

To enable use of guest agents, support for configuring the
<channel> elements in libvirt XML config is required

Blueprint: libvirt-spice
Change-Id: I3cea7b326bb2f746c5804d0aa3bbe369da6935e8
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add support for configuring SPICE graphics with libvirt

Add support to the libvirt driver to configure SPICE graphics
and the SPICE guest agent. It allows for enablement of both
VNC and SPICE at the same time, since some recent libvirt/KVM
versions support this concurrent mode.

The USB tablet will now only be enabled if VNC is requested,
or SPICE is requested without the agent

Blueprint: libvirt-spice
Change-Id: Ic7fbfd636455aba5bf881b6a1925fd4561edfd15
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Updates prerequisite packages for fedora

Adds gcc, libxslt-devel (has dependency on libxml2-devel) and mysql-devel to
the list of prerequisites

Change-Id: I9c27868b30ef17d73adf8ad2e72b3d0e76fe76d1
Merge "enable hacking.py self tests"
Merge "Add common config options for SPICE graphics"
Merge "Add support for setting up <channel> elements in libvirt config"
Merge "Updates prerequisite packages for fedora"
Merge "Add support for configuring SPICE graphics with libvirt"
Merge "Move migration_get_..._by_host_and_node to conductor"