diff options
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r-- | functest/opnfv_tests/openstack/patrole/patrole.py | 5 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/conf_utils.py | 10 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 3 |
3 files changed, 11 insertions, 7 deletions
diff --git a/functest/opnfv_tests/openstack/patrole/patrole.py b/functest/opnfv_tests/openstack/patrole/patrole.py index 0c5eedf48..c4ed80837 100644 --- a/functest/opnfv_tests/openstack/patrole/patrole.py +++ b/functest/opnfv_tests/openstack/patrole/patrole.py @@ -12,7 +12,8 @@ import logging import os -from functest.opnfv_tests.openstack.tempest import conf_utils +from six.moves import configparser + from functest.opnfv_tests.openstack.tempest import tempest from functest.utils import config @@ -34,7 +35,7 @@ class Patrole(tempest.TempestCommon): def configure(self, **kwargs): super(Patrole, self).configure(**kwargs) - rconfig = conf_utils.ConfigParser.RawConfigParser() + rconfig = configparser.RawConfigParser() rconfig.read(self.conf_file) rconfig.add_section('rbac') rconfig.set('rbac', 'enable_rbac', True) diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index 062d75ef1..d62f3daa0 100644 --- a/functest/opnfv_tests/openstack/tempest/conf_utils.py +++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py @@ -10,13 +10,15 @@ """Tempest configuration utilities.""" -import ConfigParser +from __future__ import print_function + import logging import fileinput import os import subprocess import pkg_resources +from six.moves import configparser import yaml from functest.utils import config @@ -54,9 +56,9 @@ def create_rally_deployment(): rally_patch_conf = pfile.read() for line in fileinput.input(RALLY_CONF_PATH, inplace=1): - print line, + print(line, end=' ') if "cirros|testvm" in line: - print rally_patch_conf + print(rally_patch_conf) LOGGER.info("Creating Rally environment...") @@ -189,7 +191,7 @@ def configure_tempest_update_params( Add/update needed parameters into tempest.conf file """ LOGGER.debug("Updating selected tempest.conf parameters...") - rconfig = ConfigParser.RawConfigParser() + rconfig = configparser.RawConfigParser() rconfig.read(tempest_conf_file) rconfig.set('compute', 'fixed_network_name', network_name) rconfig.set('compute', 'volume_device_name', env.get('VOLUME_DEVICE_NAME')) diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 7f1baeb79..7fb24f239 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -21,6 +21,7 @@ import time import uuid import os_client_config +from six.moves import configparser from xtesting.core import testcase import yaml @@ -313,7 +314,7 @@ class TempestNeutronTrunk(TempestCommon): def configure(self, **kwargs): super(TempestNeutronTrunk, self).configure(**kwargs) - rconfig = conf_utils.ConfigParser.RawConfigParser() + rconfig = configparser.RawConfigParser() rconfig.read(self.conf_file) rconfig.set('network-feature-enabled', 'api_extensions', 'all') with open(self.conf_file, 'wb') as config_file: |