Merge QuantumLinuxBridgeVIFDriver into LibvirtGenericVIFDriver

The only difference between the Quantum bridge driver and the
new generic VIF driver bridge support is the name of the bridge.
This is now provided via the VIF mapping parameter, so there is
no need for the dedicated Quantum VIF driver for bridging. This
This has the advantage that libvirt firewall filter parameters
are correctly configured.

The QuantumLinuxBridgeVIFDriver class functionality is merged into
LibvirtGenericVIFDriver. For backwards compatibility with
the Folsom release, the existing QuantumLinuxBridgeVIFDriver class
is made to inherit from LibvirtGenericVIFDriver and directly
call the bridge specific setup APIs. This eases migration to
the new VIF impl during the Grizzly deployment lifecycle, with
an expectation that the QuantumLinuxBridgeVIFDriver stub will be
deleted after the Havana release.

Blueprint: libvirt-vif-driver
Change-Id: I19664f20e5137f495513999214f66279292bda58
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge LibvirtOpenVswitchDriver class into LibvirtGenericVIFDriver

The LibvirtGenericVIFDriver class can use the 'vif_type' mapping
field to determine whether an OVS network configuration is
required, thus a dedicated driver for OVS is no longer required.

The LibvirtOpenVswitchDriver class functionality is merged into
LibvirtGenericVIFDriver. For backwards compatibility with
the Folsom release, the existing LibvirtOpenVswitchDriver class
is made to inherit from LibvirtGenericVIFDriver and directly
call the bridge specific setup APIs. This eases migration to
the new VIF impl during the Grizzly deployment lifecycle, with
an expectation that the LibvirtOpenVswitchDriver stub will be
deleted after the Havana release.

Blueprint: libvirt-vif-driver
Change-Id: Iac79e0880b6fbcca0fd8cc26b59d23e579b947fa
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Record instance actions and events

Record when an action is initiated on an instance, and the underlying
events related to completing that action.

Actions will typically occur at the API level and should match what a
user intended to do with an instance.  Events will typically track what
happens behind the scenes and may include things that would be unclear
for a user if exposed, but should be beneficial to an admin/deployer.

Adds a new wrapper to the compute manager.  The wrapper will record when
an event begins and finishes from the point of view of the compute
manager.  It will also record errors if they occur.

Blueprint instance-actions

Change-Id: I801f3e796d091e146413f84c2ccfab95ad2e1af4
Allow for specifying nfs mount options

Fixes bug 1113042

Adds a new config option:
    nfs_mount_options=None (Default)

When not None, anything set here will be passed as -o <options> to
the mount command. The default behavior is to do exactly as we are
doing today and relying on the OS/kernel defaults.

Change-Id: I935ae6f4d96c20904b7132fe8c6dfd3cbe089e51
Flags: DocImpact
Adds evacuate method to compute.api

Added decorator to check whether the vm is suitable to be evacuated.
The decorator validates that vm host is down.
The new evacuate method calls rebuild with the recreate flag and
specified target host.

This implements blueprint rebuild-for-ha

DocImpact

Change-Id: I877b29928c922fa366fb85deb85ddfc72d97daf8
Co-authored-by: Oshrit Feder <oshritf@il.ibm.com>
VMware VC Compute Driver

blueprint vmware-compute-driver

Add VMwareVCDriver for VMware vCenter Server and Cluster support
DocImpact

Nova conf:
compute_driver=vmwareapi.VMwareVCDriver
vmwareapi_cluster_name=VMware cluster name

Change-Id: Ia8bd40a912971ceb20b0f8015a5fcc42e525828d
Fix incorrect device name being raised.

`device` was being used as an index variable in a for-loop, overwriting
the value that was passed in, causing the in-use exception to point to
the wrong device.

The solution is to use a different variable name, in this case
`device_path` as the index variable.

Other cleanups include:

* Update to test to ensure exception message points to correct device

* Simplify for-loop by using set to collect letters, instead of a list
  which is later turned into a set

* Added blank lines to improve readability in particularly dense
  sections

* Made `req_letters` and `_get_unused_letters` singular because they, in
  fact, are.

Change-Id: Iad33f7ff0c109c6cea5df84d54c11cee750bf19d
Fix up instance types in sys meta for resizes

This adds code to the resize paths to update the system_metadata
with new (or reverted) flavor information so that resized instances
are consistent with normal ones.

It also stashes the new and old instance_type information in system_metadata
during resize, which allows us to avoid database lookups for type
information at finish, confirm, and revert time.

Related to blueprint no-db-compute

Change-Id: I7f74ef8131be7a60e3a844fdf00fdeb3683f1317
Teach resource tracker about stashed instance types

This removes instance_type-related database queries from the
resource_tracker.

Related to blueprint no-db-compute

Change-Id: Ia5dd407181fa733cc81d3ce03edc1c06c2aae762
Make cells_api fetch stashed instance_type info

Related to blueprint no-db-compute

Change-Id: If87bdd6a29d511117ce5d58057e601a155c64959
Remove remaining instance_types query from compute/manager

Related to blueprint no-db-compute

Change-Id: Ib4bf1731e408821f727f70dcc77b9883504ba960
Merge "Merge QuantumLinuxBridgeVIFDriver into LibvirtGenericVIFDriver"
Merge "Merge LibvirtOpenVswitchDriver class into LibvirtGenericVIFDriver"
Merge "Adds evacuate method to compute.api"
Merge "Record instance actions and events"
Merge "VMware VC Compute Driver"
Merge "Fix incorrect device name being raised."
Merge "Fix up instance types in sys meta for resizes"
Merge "Teach resource tracker about stashed instance types"
Merge "Make cells_api fetch stashed instance_type info"