aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-05-17 16:02:52 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-05-17 16:03:32 +0200
commitbf61d78d13df0927f2098b6f7ebeb16959a86ff2 (patch)
tree92ee156887328329d367b46a83107334efbcbd7c
parente0af292db068072a1b08879e32fd871237009fcf (diff)
Detect OpenStack ussuri
Change-Id: I645913aba06fc87a89fbb5a1a7c090777ca1be7f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 924674dca42f832ee33128ac51b3d9c5a0ed92c0)
-rw-r--r--functest/tests/unit/utils/test_functest_utils.py16
-rw-r--r--functest/utils/functest_utils.py4
2 files changed, 19 insertions, 1 deletions
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py
index 4f3f16f23..b22670f76 100644
--- a/functest/tests/unit/utils/test_functest_utils.py
+++ b/functest/tests/unit/utils/test_functest_utils.py
@@ -317,6 +317,22 @@ class FunctestUtilsTesting(unittest.TestCase):
args[0].assert_called_once_with(cloud)
@mock.patch('functest.utils.functest_utils.get_nova_version',
+ return_value=(2, 87))
+ def test_openstack_version13(self, *args):
+ cloud = mock.Mock()
+ self.assertEqual(functest_utils.get_openstack_version(
+ cloud), "Ussuri")
+ args[0].assert_called_once_with(cloud)
+
+ @mock.patch('functest.utils.functest_utils.get_nova_version',
+ return_value=(2, 88))
+ def test_openstack_version14(self, *args):
+ cloud = mock.Mock()
+ self.assertEqual(functest_utils.get_openstack_version(
+ cloud), "Wallaby")
+ args[0].assert_called_once_with(cloud)
+
+ @mock.patch('functest.utils.functest_utils.get_nova_version',
return_value=None)
def test_openstack_version_exc(self, *args):
cloud = mock.Mock()
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index c48acd3b9..9a5cd410e 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -114,8 +114,10 @@ def get_openstack_version(cloud):
version = get_nova_version(cloud)
try:
assert version
- if version > (2, 87):
+ if version > (2, 88):
osversion = "Master"
+ elif version > (2, 87):
+ osversion = "Wallaby"
elif version > (2, 79):
osversion = "Ussuri"
elif version > (2, 72):