Detect OpenStack Xena 88/73888/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 13 Mar 2023 09:59:26 +0000 (10:59 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 13 Mar 2023 09:59:26 +0000 (10:59 +0100)
Change-Id: I3b0c9e030f2d31a6151d9ba44f2a06a627b3d913
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/tests/unit/utils/test_functest_utils.py
functest/utils/functest_utils.py

index 07a57a4..5992d3f 100644 (file)
@@ -335,6 +335,14 @@ class FunctestUtilsTesting(unittest.TestCase):
             cloud), "Wallaby")
         args[0].assert_called_once_with(cloud)
 
+    @mock.patch('functest.utils.functest_utils.get_nova_version',
+                return_value=(2, 89))
+    def test_openstack_version14(self, *args):
+        cloud = mock.Mock()
+        self.assertEqual(functest_utils.get_openstack_version(
+            cloud), "Xena")
+        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):
index 4078fb1..dab128c 100644 (file)
@@ -112,8 +112,10 @@ def get_openstack_version(cloud):
     version = get_nova_version(cloud)
     try:
         assert version
-        if version > (2, 88):
+        if version > (2, 90):
             osversion = "Master"
+        elif version > (2, 88):
+            osversion = "Xena"
         elif version > (2, 87):
             osversion = "Wallaby"
         elif version > (2, 79):