summaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r--functest/opnfv_tests/openstack/patrole/patrole.py5
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py10
2 files changed, 9 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/patrole/patrole.py b/functest/opnfv_tests/openstack/patrole/patrole.py
index e2ea3514d..efc513cdb 100644
--- a/functest/opnfv_tests/openstack/patrole/patrole.py
+++ b/functest/opnfv_tests/openstack/patrole/patrole.py
@@ -11,7 +11,8 @@
import logging
-from functest.opnfv_tests.openstack.tempest import conf_utils
+from six.moves import configparser
+
from functest.opnfv_tests.openstack.tempest import tempest
@@ -21,7 +22,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 327333e0d..88ad3b2d9 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'))