aboutsummaryrefslogtreecommitdiffstats
path: root/functest
diff options
context:
space:
mode:
Diffstat (limited to 'functest')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py3
-rw-r--r--functest/tests/unit/utils/test_functest_utils.py8
-rw-r--r--functest/utils/functest_utils.py5
3 files changed, 14 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 95447c08d..5487e21aa 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -32,6 +32,7 @@ import yaml
from functest.core import singlevm
from functest.utils import config
from functest.utils import env
+from functest.utils import functest_utils
LOGGER = logging.getLogger(__name__)
@@ -521,7 +522,7 @@ class RallyBase(singlevm.VmReady2):
self.network_extensions = self.cloud.get_network_extensions()
self.flavor_alt = self.create_flavor_alt()
self.services = [service.name for service in
- self.cloud.list_services()]
+ functest_utils.list_services(self.cloud)]
LOGGER.debug("flavor: %s", self.flavor_alt)
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py
index f6a80e264..4f3f16f23 100644
--- a/functest/tests/unit/utils/test_functest_utils.py
+++ b/functest/tests/unit/utils/test_functest_utils.py
@@ -309,6 +309,14 @@ class FunctestUtilsTesting(unittest.TestCase):
args[0].assert_called_once_with(cloud)
@mock.patch('functest.utils.functest_utils.get_nova_version',
+ return_value=(2, 78))
+ def test_openstack_version12(self, *args):
+ cloud = mock.Mock()
+ self.assertEqual(functest_utils.get_openstack_version(
+ cloud), "Train")
+ 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 ef5dac72a..a1434adc2 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -110,11 +110,14 @@ def get_openstack_version(cloud):
- OpenStack release
- Unknown on operation error
"""
+ # pylint: disable=too-many-branches
version = get_nova_version(cloud)
try:
assert version
- if version > (2, 72):
+ if version > (2, 79):
osversion = "Master"
+ elif version > (2, 72):
+ osversion = "Train"
elif version > (2, 65):
osversion = "Stein"
elif version > (2, 60):