From a321d59c36f368a3a1aeefaa09c9e66b1e8c13c0 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 14 Jun 2018 20:51:41 +0200 Subject: Add py3 support in tempest and rally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I009d38a0db409ab4ec641cba9173ab2386d0ce2a Signed-off-by: Cédric Ollivier (cherry picked from commit 09d6e6feef33fa47bca440a096894b851b1ebca5) --- functest/opnfv_tests/openstack/tempest/conf_utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'functest/opnfv_tests/openstack/tempest/conf_utils.py') 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')) -- cgit 1.2.3-korg