Add full test environment.

Add a tox environment that will install all of the optional
packages and which will run with system site packages enabled
so that we pick up those tests as well. This should allow us
to run expansive tests on jenkins that aren't normally required
locally, but which are possible.

Change-Id: Iabd61874061e24950d4d2082a2fba158b4601624
Adds default fall-through to the multi scheduler.
Fixes bug 1009681

This offers a default scheduler driver that will be used by the
multischeduler for requests that are not destined for the
compute or volume topic. This is useful for openstack extensions
that want to use the nova-scheduler to schedule requests to
compute nodes but provide their own manager and topic.

Change-Id: I753e87fc8979fd0b62529974f00cf11fa55b3d63
Add hypervisor information extension.

Adds a new extension to get information about hypervisors (as opposed
to compute hosts), including a list of hypervisors matching a regular
expression (database regular expression, i.e., %'s) and a list of
hypervisors with the list of instances living on those hypervisors.

Change-Id: I2e44e82e123e5e727b49622fe5e966131658f9f6
Rename the instance_id column in instance_info_caches.

The name was confusing, because it was a uuid in a column named
instance_id.

Change-Id: I0df0fe84b4891da9529639cf8c07c3e4d86a9958
Remove tpool stub in xenapi tests

XenAPI stopped using tpool in commit a3a5f23487e9ca4257551fd3d430d8ebcfca131a
so remove the stubs that are unnecessary now

Change-Id: I709a1b557576471d3b69c2a28f00d25602ed090f
Switch libvirt get_cpu_info method over to use config APIs

The get_cpu_info method in the libvirt driver currently uses
XPath queries to extract information from the capabilities
XML document. Switch this over to use the new config class
LibvirtConfigCaps. Also provide a test case to validate
the data being returned

Fixes: bug #1003373
Implements: blueprint libvirt-xml-cpu-model
Change-Id: I4946a16d27f712ae2adf8441ce78e6c0bb0bb657
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Refactor Dom0 Glance plugin.

Moves shareable code out to a new utils file where future Dom0 plugins
can make use of it.

Change-Id: I57eb20b4ca308fdda424599d36d94f120d99ec0d
Allow specification of the libvirt guest CPU model per host

Currently Nova does not configure any CPU model for libvirt
guests. This is sub-optimal because the default KVM CPU
model has changed a number of times, and more importantly
VMs are not able to take advantage of many performance
features in newer CPUs. To get a consistent CPU model exposed
to the guest and maximize performance of VMs in the cloud,
explicit specification of CPU models per host is desirable.

This change adds a new Nova config flag:

  libvirt_cpu_mode = host-model|host-passthrough|custom

Where

  * host-model == configure a model that matches the features
                  available in the host CPU

  * host-passthrough == passthrough the host CPU precisely
                        with no change at all

  * custom == configure a specific named CPU model

If the 'custom' mode is used, then the additional flag
is available to choose the model:

  libvirt_cpu_model = <one of the names from /usr/share/libvirt/cpu_model.xml>

eg

  libvirt_cpu_model = core2duo

If specifying a custom CPU model, it is wise to choose one that is
capable of running on all the various different Nova hosts in the
cloud. That said, libvirt will enforce compatibility at time of
starting or migrating guests & refuse the operation if required.

If using either the host-model or host-passthrough modes, and use
of live migration is desired, admins should ensure that all hosts
have a homogeneous CPU model. If hosts have a hetergeneous CPU
models, then a custom named CPU model is a better choice

This configuration only works for libvirt >= 0.9.10, due to the
use of the 'mode' attribute on the <cpu> element for configuring
host models.

Fixes: bug #1003373
Implements: blueprint libvirt-xml-cpu-model
Change-Id: I90ce78d7e29bd0d563e3bc547b7cc5d64dd9496e
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge "Add full test environment."
Merge "Rename the instance_id column in instance_info_caches."
Merge "Switch libvirt get_cpu_info method over to use config APIs"
Merge "Remove tpool stub in xenapi tests"
Merge "Refactor Dom0 Glance plugin."
Merge "Add hypervisor information extension."
Merge "Adds default fall-through to the multi scheduler. Fixes bug 1009681"
Merge "Allow specification of the libvirt guest CPU model per host"
Add multi-process support for API services

Implements blueprint multi-process-api-service

This is based on Huang Zhiteng's patch.

This patch adds support for running services as multiple processes. This
is primarily intended to be used with the API service as a way to provide
more concurrency than eventlet can sometimes provide.

A SIGTERM or SIGINT signal will cause the parent process to gracefully
terminate the child processes, allowing them to finish processing the
requests currently being processed. The parent will wait for the
children to finish before exiting.

Change-Id: Ie6d6802626eb42d5e64c4167be363fbf6cea2a1b
Implement blueprint ec2-id-compatibilty.

Instance ids are used by the ec2 layer to create ec2-ids. This
currently uses the id column in the instances table. This patch
creates a new mapping table for ec2-ids. This decouples the ec2
layer from needing direct access to the instances table so that
it can eventually be pulled out if necessary. It also matches the
way that the ec2 layer maps image, volume, and snaphsot ids.
Finally, it allows us to eventually remove the id column from
the instances table and only have one canonical id (uuid) to
refer to instances.

Change-Id: I02ad9fad37e6a04675543398f686351634bc1bb9
Merge "Add multi-process support for API services"