Merge LibvirtHybridOVSBridgeDriver into LibvirtGenericVIFDriver

The LibvirtHybridOVSBridgeDriver VIF driver and the
LibvirtOpenVswitchDriver VIF driver both support OpenVswitch
based guest configs. The difference is that the hybrid driver
does not connect the VM directly to the OVS bridge. Instead it
connects the guest to a private Linux bridge, connected to the
OVS bridge via a veth pair. This allows iptables firewall rules
to be applied to the guest VIF. The hybrid driver should always
be used unless the admin has disabled Nova firewalls using the
NoopFirewallDriver impl. Rather than require the admin to figure
this out themselves, pick the right impl automatically based
on the configured firewall driver.

When Quantum gains support for firewalling, it will need to be
able to inform Nova whether it has got a filtering applied to
the VIFs, and thus let Nova intelligently skip its own attempt
at filtering.

The LibvirtGenericVIFDriver class can use the 'vif_type' mapping
field to determine whether an OVS network configuration is
required. In combination with a check against the firewall
driver, a dedicated driver for OVS hybrid setup is no longer
required.

The LibvirtHybridOVSBridgeDriver class functionality is
merged into LibvirtGenericVIFDriver. For backwards compatibility
with the Folsom release, the existing LibvirtHybridOVSBridgeDriver
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 LibvirtHybridOVSBridgeDriver stub
will be deleted after the Havana release.

Bug: 1050433
Blueprint: libvirt-vif-driver
Change-Id: I93294409a75aaa15d297471ab3e600c3c124bcde
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Introduce support for 802.1qbg and 802.1qbh to Nova VIF model

Define the nova network VIF model properties for supporting
802.1qbg / 802.1qbh networking in hypervisor drivers. Also
wire up support to the libvirt driver for these new modes

Blueprint: libvirt-vif-driver
Change-Id: I91039790900170bfd698ea484d5f8a22445806ae
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
fix VM power state to be NOSTATE when instance not found

* nova/compute/manager.py (_sync_power_states): Revert what looks
like an inadvertent change that was part of commit 95e77703.
Also log the condition.

Fixes bug: 1085771
Change-Id: Ic6eeb9207323f05b93f0b613bd1bddd681ad8ce5
Simplify libvirt snapshot code path

The "cold" snapshot code path was unnecessarily complex. We were
traversing 3 layers of abstraction to reach 3 lines of code. I've
completely eliminated snapshot.py by moving all "cold" snapshot
functions into imagebackend.py and adjusting the libvirt driver
accordingly. This is the first pass of several I intend to make
against imagebackend.py, as it is far too difficult to read given
how basic the basic level of functionality it is intended to
provide.

Change-Id: Idfacffb7210ae61193ee4f2360d4b38f330a177c
Merge "Simplify libvirt snapshot code path"
Merge "fix VM power state to be NOSTATE when instance not found"
Merge "Merge LibvirtHybridOVSBridgeDriver into LibvirtGenericVIFDriver"
Merge "Introduce support for 802.1qbg and 802.1qbh to Nova VIF model"