Fix str to str comparison in live migration test
The str to str comparison in the
test_server_connectivity_live_migration_compute uses a "<"
operation that does not work as intended. Let's fix that by using
the tempest module created for comparing string microversions.
Change-Id: Id6d18c93e8637d797404a62a23d3fcc61208fd4c
diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
index 3a93f74..911ff42 100644
--- a/tempest/scenario/test_network_advanced_server_ops.py
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -20,6 +20,7 @@
from tempest.common.utils import net_downtime
from tempest.common import waiters
from tempest import config
+from tempest.lib.common import api_version_request
from tempest.lib import decorators
from tempest.scenario import manager
@@ -193,8 +194,11 @@
# check if microversion is less than 2.25 because of
# disk_over_commit is depracted since compute api version 2.25
# if min_microversion is None, it runs on version < 2.25
+ min_v = api_version_request.APIVersionRequest(
+ CONF.compute.min_microversion)
+ api_v = api_version_request.APIVersionRequest('2.25')
if not migration and (CONF.compute.min_microversion is None or
- CONF.compute.min_microversion < '2.25'):
+ min_v < api_v):
migration_kwargs['disk_over_commit'] = False
if dest_host: