diff options
Diffstat (limited to 'functest/opnfv_tests/openstack')
3 files changed, 12 insertions, 12 deletions
diff --git a/functest/opnfv_tests/openstack/examples/create_instance_and_ip.py b/functest/opnfv_tests/openstack/examples/create_instance_and_ip.py index 6a2abe60..b4e2e519 100755 --- a/functest/opnfv_tests/openstack/examples/create_instance_and_ip.py +++ b/functest/opnfv_tests/openstack/examples/create_instance_and_ip.py @@ -11,7 +11,9 @@ # import argparse +import os import sys + import functest.utils.functest_logger as ft_logger import functest.utils.openstack_utils as os_utils import functest.utils.functest_constants as ft_constants @@ -36,8 +38,7 @@ EXAMPLE_FLAVOR = ft_constants.EXAMPLE_FLAVOR EXAMPLE_IMAGE_NAME = ft_constants.EXAMPLE_IMAGE_NAME IMAGE_FILENAME = ft_constants.GLANCE_IMAGE_FILENAME IMAGE_FORMAT = ft_constants.GLANCE_IMAGE_FORMAT -IMAGE_PATH = ft_constants.FUNCTEST_DATA_DIR + \ - "/" + IMAGE_FILENAME +IMAGE_PATH = os.path.join(ft_constants.FUNCTEST_DATA_DIR, IMAGE_FILENAME) # NEUTRON Private Network parameters diff --git a/functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py b/functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py index 8e298d36..1216a671 100755 --- a/functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py +++ b/functest/opnfv_tests/openstack/tempest/gen_tempest_conf.py @@ -50,8 +50,8 @@ def configure_tempest_multisite(deployment_dir): config.read(tempest_conf_file) config.set('service_available', 'kingbird', 'true') - cmd = "openstack endpoint show kingbird | grep publicurl |\ - awk '{print $4}' | awk -F '/' '{print $4}'" + cmd = ("openstack endpoint show kingbird | grep publicurl |" + "awk '{print $4}' | awk -F '/' '{print $4}'") kingbird_api_version = os.popen(cmd).read() if CI_INSTALLER_TYPE == 'fuel': # For MOS based setup, the service is accessible @@ -66,8 +66,8 @@ def configure_tempest_multisite(deployment_dir): "multisite." + installer_type + "_environment.installer_password") - ssh_options = "-o UserKnownHostsFile=/dev/null -o \ - StrictHostKeyChecking=no" + ssh_options = ("-o UserKnownHostsFile=/dev/null -o " + "StrictHostKeyChecking=no") # Get the controller IP from the fuel node cmd = 'sshpass -p %s ssh 2>/dev/null %s %s@%s \ @@ -76,8 +76,7 @@ def configure_tempest_multisite(deployment_dir): ssh_options, installer_username, installer_ip) - multisite_controller_ip = \ - "".join(os.popen(cmd).read().split()) + multisite_controller_ip = "".join(os.popen(cmd).read().split()) # Login to controller and get bind host details cmd = 'sshpass -p %s ssh 2>/dev/null %s %s@%s "ssh %s \\" \ @@ -94,8 +93,7 @@ def configure_tempest_multisite(deployment_dir): # Extract ip address from the bind details bind_host = re.findall(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", bind_details)[0] - kingbird_endpoint_url = "http://" + bind_host + ":" + bind_port + \ - "/" + kingbird_endpoint_url = "http://%s:%s/" % (bind_host, bind_port) else: cmd = "openstack endpoint show kingbird | grep publicurl |\ awk '{print $4}' | awk -F '/' '{print $3}'" diff --git a/functest/opnfv_tests/openstack/tempest/run_tempest.py b/functest/opnfv_tests/openstack/tempest/run_tempest.py index cbf92c1f..6406cd19 100755 --- a/functest/opnfv_tests/openstack/tempest/run_tempest.py +++ b/functest/opnfv_tests/openstack/tempest/run_tempest.py @@ -62,8 +62,9 @@ logger = ft_logger.Logger("run_tempest").getLogger() GLANCE_IMAGE_NAME = ft_constants.GLANCE_IMAGE_NAME GLANCE_IMAGE_FILENAME = ft_constants.GLANCE_IMAGE_FILENAME GLANCE_IMAGE_FORMAT = ft_constants.GLANCE_IMAGE_FORMAT -GLANCE_IMAGE_PATH = ft_constants.FUNCTEST_DATA_DIR + \ - "/" + GLANCE_IMAGE_FILENAME +GLANCE_IMAGE_PATH = os.path.join(ft_constants.FUNCTEST_DATA_DIR, + GLANCE_IMAGE_FILENAME) + IMAGE_ID_ALT = None FLAVOR_NAME = ft_constants.FLAVOR_NAME |