aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest/conf_utils.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-06-14 20:51:41 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-06-14 20:51:41 +0200
commit09d6e6feef33fa47bca440a096894b851b1ebca5 (patch)
treee3a528dc0c5509cd1ca4071b165399ca3f344817 /functest/opnfv_tests/openstack/tempest/conf_utils.py
parent1ef7fd44523182a8b8ddcc97433fff55ba17fce8 (diff)
Add py3 support in tempest and rally
Change-Id: I009d38a0db409ab4ec641cba9173ab2386d0ce2a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/conf_utils.py')
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py10
1 files changed, 6 insertions, 4 deletions
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'))