diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-05-17 16:02:52 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-05-17 16:02:52 +0200 |
commit | 924674dca42f832ee33128ac51b3d9c5a0ed92c0 (patch) | |
tree | 654f8f94c57c2164f3337733c34326e6c4f39ec7 | |
parent | 6b4082abef9b8c47fc5c8ef6fa75156d633f6370 (diff) |
Detect OpenStack ussuri
Change-Id: I645913aba06fc87a89fbb5a1a7c090777ca1be7f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/tests/unit/utils/test_functest_utils.py | 16 | ||||
-rw-r--r-- | functest/utils/functest_utils.py | 4 |
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): |