libvirt: Remove MIN_{LIBVIRT,QEMU}_NATIVE_TLS_VERSION

I8e349849db0b1a540d295c903f1470917b82fd97 has bumped
MIN_{LIBVIRT,QEMU}_VERSION past this so remove the constant and
associated logic.

Change-Id: I83f9198c6ddfd8c9ac007dafdc085ce862ed0ec2
This commit is contained in:
Lee Yarwood 2020-08-19 15:48:57 +01:00
parent 4acc112a30
commit 6c8e287156
2 changed files with 2 additions and 11 deletions

View File

@ -1814,8 +1814,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
libvirt_driver.libvirt.VIR_MIGRATE_NON_SHARED_INC |
libvirt_driver.libvirt.VIR_MIGRATE_TUNNELLED))
@mock.patch.object(host.Host, 'has_min_version', return_value=True)
def test_live_migration_with_native_tls(self, host):
def test_live_migration_with_native_tls(self):
self.flags(live_migration_with_native_tls=True, group='libvirt')
self._do_test_parse_migration_flags(
lm_expected=(libvirt_driver.libvirt.VIR_MIGRATE_LIVE |

View File

@ -250,9 +250,6 @@ VGPU_RESOURCE_SEMAPHORE = 'vgpu_resources'
LIBVIRT_PERF_EVENT_PREFIX = 'VIR_PERF_PARAM_'
MIN_LIBVIRT_NATIVE_TLS_VERSION = (4, 4, 0)
MIN_QEMU_NATIVE_TLS_VERSION = (2, 11, 0)
# If the host has this libvirt version, then we skip the retry loop of
# instance destroy() call, as libvirt itself increased the wait time
# before the SIGKILL signal takes effect.
@ -1016,13 +1013,8 @@ class LibvirtDriver(driver.ComputeDriver):
migration_flags |= libvirt.VIR_MIGRATE_TUNNELLED
return migration_flags
def _is_native_tls_available(self):
return self._host.has_min_version(MIN_LIBVIRT_NATIVE_TLS_VERSION,
MIN_QEMU_NATIVE_TLS_VERSION)
def _handle_native_tls(self, migration_flags):
if (CONF.libvirt.live_migration_with_native_tls and
self._is_native_tls_available()):
if (CONF.libvirt.live_migration_with_native_tls):
migration_flags |= libvirt.VIR_MIGRATE_TLS
return migration_flags