Merge "vif: Remove dead minimum libvirt checks"

This commit is contained in:
Zuul
2019-07-17 20:00:26 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 31 deletions
+2 -19
View File
@@ -737,7 +737,7 @@ class LibvirtVifTestCase(test.NoDBTestCase):
@mock.patch.object(host.Host, "has_min_version", return_value=False)
def test_virtio_vhost_queue_sizes_nover(self, has_min_version):
_, _, conf = self._test_virtio_config_queue_sizes()
self.assertIsNone(conf.vhost_rx_queue_size)
self.assertEqual(512, conf.vhost_rx_queue_size)
self.assertIsNone(conf.vhost_tx_queue_size)
@mock.patch.object(host.Host, "has_min_version", return_value=True)
@@ -753,7 +753,7 @@ class LibvirtVifTestCase(test.NoDBTestCase):
hostimpl, v, conf = self._test_virtio_config_queue_sizes()
v._set_config_VIFVHostUser(self.instance, self.os_vif_vhostuser,
conf, hostimpl)
self.assertIsNone(conf.vhost_rx_queue_size)
self.assertEqual(512, conf.vhost_rx_queue_size)
self.assertIsNone(conf.vhost_tx_queue_size)
def test_multiple_nics(self):
@@ -1178,23 +1178,6 @@ class LibvirtVifTestCase(test.NoDBTestCase):
vlan_want = self.vif_hw_veb["details"]["vlan"]
self.assertEqual(int(vlan), vlan_want)
@mock.patch.object(pci_utils, 'get_ifname_by_pci_address',
return_value='eth1')
@mock.patch.object(host.Host, "has_min_version", return_value=False)
def test_hw_veb_driver_macvtap_pre_vlan_support(self, ver_mock,
mock_get_ifname):
d = vif.LibvirtGenericVIFDriver()
xml = self._get_instance_xml(
d, self.vif_hw_veb_macvtap,
has_min_libvirt_version=ver_mock.return_value)
node = self._get_node(xml)
self.assertEqual(node.get("type"), "direct")
self._assertTypeEquals(node, "direct", "source",
"dev", "eth1")
self._assertTypeEquals(node, "direct", "source",
"mode", "passthrough")
self._assertMacEquals(node, self.vif_hw_veb_macvtap)
def test_driver_macvtap_vlan(self):
d = vif.LibvirtGenericVIFDriver()
xml = self._get_instance_xml(d, self.vif_macvtap_vlan)
-12
View File
@@ -55,9 +55,6 @@ CONF = nova.conf.CONF
MIN_LIBVIRT_INTERFACE_MTU = (3, 3, 0)
MIN_QEMU_INTERFACE_MTU = (2, 9, 0)
# virtio-net.rx_queue_size support
MIN_LIBVIRT_RX_QUEUE_SIZE = (2, 3, 0)
MIN_QEMU_RX_QUEUE_SIZE = (2, 7, 0)
# virtio-net.tx_queue_size support
MIN_LIBVIRT_TX_QUEUE_SIZE = (3, 7, 0)
MIN_QEMU_TX_QUEUE_SIZE = (2, 10, 0)
@@ -447,15 +444,6 @@ class LibvirtGenericVIFDriver(object):
# configure vhostuser interface meaning that the logs can be
# duplicated. In future we want to rewrite get_base_config.
rx, tx = CONF.libvirt.rx_queue_size, CONF.libvirt.tx_queue_size
if rx and not host.has_min_version(
MIN_LIBVIRT_RX_QUEUE_SIZE, MIN_QEMU_RX_QUEUE_SIZE):
LOG.warning('Setting RX queue size requires libvirt %s and QEMU '
'%s version or greater.',
libvirt_utils.version_to_string(
MIN_LIBVIRT_RX_QUEUE_SIZE),
libvirt_utils.version_to_string(
MIN_QEMU_RX_QUEUE_SIZE))
rx = None
if tx and not host.has_min_version(
MIN_LIBVIRT_TX_QUEUE_SIZE, MIN_QEMU_TX_QUEUE_SIZE):
LOG.warning('Setting TX queue size requires libvirt %s and QEMU '