aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-08-18 08:31:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-18 08:31:51 +0000
commit16b9a69410fd0aaa9a55b023997bb3872ee5907d (patch)
treebe45663d8fab26ed53c04425aa708bc5ae6093b5 /functest/opnfv_tests
parent0e919a00c9fa4827af77731fffb0fc5dccc1f16c (diff)
parent33de78413116823fc61a7df695f17574a9247bd0 (diff)
Merge "Remove multisite support"
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py93
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py15
2 files changed, 0 insertions, 108 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 7c88fc5d..975f2bdc 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -11,7 +11,6 @@ import ConfigParser
import logging
import os
import pkg_resources
-import re
import shutil
import subprocess
@@ -231,8 +230,6 @@ def configure_tempest(deployment_dir, IMAGE_ID=None, FLAVOR_ID=None,
conf_file = configure_verifier(deployment_dir)
configure_tempest_update_params(conf_file,
IMAGE_ID, FLAVOR_ID)
- if MODE == 'feature_multisite':
- configure_tempest_multisite_params(conf_file)
def configure_tempest_defcore(deployment_dir, img_flavor_dict):
@@ -373,93 +370,3 @@ def configure_verifier(deployment_dir):
% tempest_conf_file)
else:
return tempest_conf_file
-
-
-def configure_tempest_multisite_params(tempest_conf_file):
- """
- Add/update multisite parameters into tempest.conf file generated by Rally
- """
- logger.debug("Updating multisite tempest.conf parameters...")
- config = ConfigParser.RawConfigParser()
- 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}'")
- # kingbird_api_version = os.popen(cmd).read()
- # kingbird_api_version = os_utils.get_endpoint(service_type='multisite')
-
- if CI_INSTALLER_TYPE == 'fuel':
- # For MOS based setup, the service is accessible
- # via bind host
- kingbird_conf_path = "/etc/kingbird/kingbird.conf"
- installer_type = CI_INSTALLER_TYPE
- installer_ip = CI_INSTALLER_IP
- installer_username = CONST.__getattribute__(
- 'multisite_{}_installer_username'.format(installer_type))
- installer_password = CONST.__getattribute__(
- 'multisite_{}_installer_password'.format(installer_type))
-
- 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 '
- '\'fuel node --env 1| grep controller | grep "True\| 1" '
- '| awk -F\| "{print \$5}"\'' % (installer_password,
- ssh_options,
- installer_username,
- installer_ip))
- 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 \\" '
- 'grep -e "^bind_" %s \\""' % (installer_password,
- ssh_options,
- installer_username,
- installer_ip,
- multisite_controller_ip,
- kingbird_conf_path))
- bind_details = os.popen(cmd).read()
- bind_details = "".join(bind_details.split())
- # Extract port number from the bind details
- bind_port = re.findall(r"\D(\d{4})", bind_details)[0]
- # 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://%s:%s/" % (bind_host, bind_port)
- else:
- # cmd = "openstack endpoint show kingbird | grep publicurl |\
- # awk '{print $4}' | awk -F '/' '{print $3}'"
- # kingbird_endpoint_url = os.popen(cmd).read()
- kingbird_endpoint_url = os_utils.get_endpoint(service_type='kingbird')
-
- try:
- config.add_section("kingbird")
- except Exception:
- logger.info('kingbird section exist')
-
- # set the domain id
- config.set('auth', 'admin_domain_name', 'default')
-
- config.set('kingbird', 'endpoint_type', 'publicURL')
- config.set('kingbird', 'TIME_TO_SYNC', '120')
- config.set('kingbird', 'endpoint_url', kingbird_endpoint_url)
- config.set('kingbird', 'api_version', 'v1.0')
- with open(tempest_conf_file, 'wb') as config_file:
- config.write(config_file)
-
- backup_tempest_config(tempest_conf_file)
-
-
-def install_verifier_ext(path):
- """
- Install extension to active verifier
- """
- logger.info("Installing verifier from existing repo...")
- tag = get_repo_tag(path)
- cmd = ("rally verify add-verifier-ext --source {0} "
- "--version {1}"
- .format(path, tag))
- error_msg = ("Problem while adding verifier extension from %s" % path)
- ft_utils.execute_command_raise(cmd, error_msg=error_msg)
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index b00bc6af..003d4ea4 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -12,7 +12,6 @@ from __future__ import division
import logging
import os
-import pkg_resources
import re
import shutil
import subprocess
@@ -63,8 +62,6 @@ class TempestCommon(testcase.OSGCTestCase):
else:
if self.MODE == 'smoke':
testr_mode = "smoke"
- elif self.MODE == 'feature_multisite':
- testr_mode = "'[Kk]ingbird'"
elif self.MODE == 'full':
testr_mode = ""
else:
@@ -270,18 +267,6 @@ class TempestFullParallel(TempestCommon):
self.MODE = "full"
-class TempestMultisite(TempestCommon):
-
- def __init__(self, **kwargs):
- if "case_name" not in kwargs:
- kwargs["case_name"] = 'multisite'
- TempestCommon.__init__(self, **kwargs)
- self.MODE = "feature_multisite"
- self.OPTION = "--concurrency 1"
- conf_utils.install_verifier_ext(
- pkg_resources.resource_filename('kingbird', '..'))
-
-
class TempestCustom(TempestCommon):
def __init__(self, **kwargs):