diff options
author | 2017-08-18 08:31:51 +0000 | |
---|---|---|
committer | 2017-08-18 08:31:51 +0000 | |
commit | 16b9a69410fd0aaa9a55b023997bb3872ee5907d (patch) | |
tree | be45663d8fab26ed53c04425aa708bc5ae6093b5 /functest | |
parent | 0e919a00c9fa4827af77731fffb0fc5dccc1f16c (diff) | |
parent | 33de78413116823fc61a7df695f17574a9247bd0 (diff) |
Merge "Remove multisite support"
Diffstat (limited to 'functest')
-rw-r--r-- | functest/ci/config_functest.yaml | 8 | ||||
-rw-r--r-- | functest/ci/config_patch.yaml | 3 | ||||
-rw-r--r-- | functest/ci/testcases.yaml | 15 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/conf_utils.py | 93 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 15 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 57 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_tempest.py | 8 |
7 files changed, 0 insertions, 199 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 829c51f7b..6107b42aa 100644 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -162,14 +162,6 @@ ONOS: installer_master: '10.20.0.2' installer_master_username: 'root' installer_master_password: 'r00tme' -multisite: - fuel: - installer_username: 'root' - installer_password: 'r00tme' - compass: - installer_username: 'root' - installer_password: 'root' - multisite_controller_ip: '10.1.0.50' promise: tenant_name: promise tenant_description: promise Functionality Testing diff --git a/functest/ci/config_patch.yaml b/functest/ci/config_patch.yaml index ad8b0889f..865a564e6 100644 --- a/functest/ci/config_patch.yaml +++ b/functest/ci/config_patch.yaml @@ -20,6 +20,3 @@ ovs: image_properties: {'hw_mem_page_size':'large'} tempest: use_custom_flavors: True -multisite: - tempest: - use_custom_flavors: True diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 4a047b3f1..fecd8126d 100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -318,21 +318,6 @@ tiers: cmd: '. /home/opnfv/functest/conf/stackrc && security_scan --config /usr/local/etc/securityscanning/config.ini' - - case_name: multisite - enabled: false - project_name: multisite - criteria: 100 - blocking: false - description: >- - Test suite from kingbird - dependencies: - installer: '(fuel)|(compass)' - scenario: 'multisite' - run: - module: 'functest.opnfv_tests.openstack.tempest.tempest' - class: 'TempestMultisite' - - - case_name: functest-odl-sfc enabled: false project_name: sfc diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py index 7c88fc5d3..975f2bdc8 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 b00bc6af6..003d4ea41 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): diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index a807ae469..55085744b 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -199,22 +199,9 @@ class OSTempestConfUtilsTesting(unittest.TestCase): 'conf_utils.configure_verifier', return_value='test_conf_file'), \ mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.configure_tempest_update_params') as m1, \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.configure_tempest_multisite_params') as m2: - conf_utils.configure_tempest('test_dep_dir', - MODE='feature_multisite') - self.assertTrue(m1.called) - self.assertTrue(m2.called) - - with mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.configure_verifier', - return_value='test_conf_file'), \ - mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.configure_tempest_update_params') as m1: conf_utils.configure_tempest('test_dep_dir') self.assertTrue(m1.called) - self.assertTrue(m2.called) def test_configure_tempest_defcore_default(self): img_flavor_dict = {'image_id': 'test_image_id', @@ -322,50 +309,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase): mexe.assert_any_call("rally verify configure-verifier " "--reconfigure") - def test_configure_tempest_multisite_params_without_fuel(self): - conf_utils.CI_INSTALLER_TYPE = 'not_fuel' - with mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.os_utils.get_endpoint', - return_value='kingbird_endpoint_url'), \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' - 'set') as mset, \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' - 'read') as mread, \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' - 'add_section') as msection, \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ConfigParser.RawConfigParser.' - 'write') as mwrite, \ - mock.patch('__builtin__.open', mock.mock_open()), \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.backup_tempest_config'): - - conf_utils.configure_tempest_multisite_params('test_conf_file') - msection.assert_any_call("kingbird") - mset.assert_any_call('service_available', 'kingbird', 'true') - mset.assert_any_call('kingbird', 'endpoint_type', 'publicURL') - mset.assert_any_call('kingbird', 'TIME_TO_SYNC', '120') - mset.assert_any_call('kingbird', 'endpoint_url', - 'kingbird_endpoint_url') - self.assertTrue(mread.called) - self.assertTrue(mwrite.called) - - def test_install_verifier_ext_default(self): - with mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.get_repo_tag', - return_value='test_tag'), \ - mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.ft_utils.' - 'execute_command_raise') as mexe: - conf_utils.install_verifier_ext('test_path') - cmd = ("rally verify add-verifier-ext --source test_path " - "--version test_tag") - error_msg = ("Problem while adding verifier extension from" - " test_path") - mexe.assert_called_once_with(cmd, error_msg=error_msg) if __name__ == "__main__": logging.disable(logging.CRITICAL) diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py index b8b258b36..d5016f71b 100644 --- a/functest/tests/unit/openstack/tempest/test_tempest.py +++ b/functest/tests/unit/openstack/tempest/test_tempest.py @@ -35,9 +35,6 @@ class OSTempestTesting(unittest.TestCase): self.tempestsmoke_serial = tempest.TempestSmokeSerial() self.tempestsmoke_parallel = tempest.TempestSmokeParallel() self.tempestfull_parallel = tempest.TempestFullParallel() - with mock.patch('functest.opnfv_tests.openstack.tempest.tempest.' - 'conf_utils.install_verifier_ext'): - self.tempestmultisite = tempest.TempestMultisite() self.tempestcustom = tempest.TempestCustom() self.tempestdefcore = tempest.TempestDefcore() @@ -75,8 +72,6 @@ class OSTempestTesting(unittest.TestCase): self.tempestcommon.MODE = mode if self.tempestcommon.MODE == 'smoke': testr_mode = "smoke" - elif self.tempestcommon.MODE == 'feature_multisite': - testr_mode = "'[Kk]ingbird'" elif self.tempestcommon.MODE == 'full': testr_mode = "" else: @@ -96,9 +91,6 @@ class OSTempestTesting(unittest.TestCase): def test_generate_test_list_smoke_mode(self): self._test_generate_test_list_mode_default('smoke') - def test_generate_test_list_feature_multisite_mode(self): - self._test_generate_test_list_mode_default('feature_multisite') - def test_generate_test_list_full_mode(self): self._test_generate_test_list_mode_default('full') |