libvirt: Mark e1000e VIF as supported

This is supported by the QEMU/KVM backends in libvirt. There's no reason
not to support it in nova. This appears to have been an oversight.

Conflicts:
	nova/virt/libvirt/vif.py

NOTE(stephenfin): Conflicts are due to absence of change
I0bdf9ccf7bf3fb1f3136c1e4267b9c99732908d5 ("libvirt: Use domain
capabilities to get supported device models") which moved the list of
supported VIFs from a function attribute to a module attribute.

Change-Id: I12a5d28d75bc32a76a4f3765cb4db4cbc46c0c75
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1882919
(cherry picked from commit 644cb5cb8b)
(cherry picked from commit 840de3b892)
This commit is contained in:
Stephen Finucane 2020-06-10 10:56:38 +01:00 committed by Lee Yarwood
parent 5e36e91bb2
commit ddbc262494
3 changed files with 11 additions and 0 deletions

View File

@ -832,12 +832,14 @@ class LibvirtVifTestCase(test.NoDBTestCase):
network_model.VIF_MODEL_PCNET,
network_model.VIF_MODEL_RTL8139,
network_model.VIF_MODEL_E1000,
network_model.VIF_MODEL_E1000E,
network_model.VIF_MODEL_SPAPR_VLAN)
else:
supported = (network_model.VIF_MODEL_NE2K_PCI,
network_model.VIF_MODEL_PCNET,
network_model.VIF_MODEL_RTL8139,
network_model.VIF_MODEL_E1000,
network_model.VIF_MODEL_E1000E,
network_model.VIF_MODEL_SPAPR_VLAN)
for model in supported:
image_meta = objects.ImageMeta.from_dict(

View File

@ -67,6 +67,7 @@ def is_vif_model_valid_for_virt(virt_type, vif_model):
network_model.VIF_MODEL_PCNET,
network_model.VIF_MODEL_RTL8139,
network_model.VIF_MODEL_E1000,
network_model.VIF_MODEL_E1000E,
network_model.VIF_MODEL_LAN9118,
network_model.VIF_MODEL_SPAPR_VLAN],
'kvm': [network_model.VIF_MODEL_VIRTIO,
@ -74,6 +75,7 @@ def is_vif_model_valid_for_virt(virt_type, vif_model):
network_model.VIF_MODEL_PCNET,
network_model.VIF_MODEL_RTL8139,
network_model.VIF_MODEL_E1000,
network_model.VIF_MODEL_E1000E,
network_model.VIF_MODEL_SPAPR_VLAN],
'xen': [network_model.VIF_MODEL_NETFRONT,
network_model.VIF_MODEL_NE2K_PCI,

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Previously, attempting to configure an instance with the ``e1000e`` or
legacy ``VirtualE1000e`` VIF types on a host using the QEMU/KVM driver
would result in an incorrect ``UnsupportedHardware`` exception. These
interfaces are now correctly marked as supported.