Remove multisite support 69/39569/1
authorJuha Kosonen <juha.kosonen@nokia.com>
Fri, 18 Aug 2017 06:57:25 +0000 (09:57 +0300)
committerJuha Kosonen <juha.kosonen@nokia.com>
Fri, 18 Aug 2017 06:57:25 +0000 (09:57 +0300)
JIRA: FUNCTEST-866

Change-Id: I55a4416688b2aca0897910cac69b33e154e73095
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
14 files changed:
docker/Dockerfile
docs/testing/developer/devguide/index.rst
docs/testing/user/configguide/configguide.rst
docs/testing/user/userguide/introduction.rst
docs/testing/user/userguide/runfunctest.rst
functest/ci/config_functest.yaml
functest/ci/config_patch.yaml
functest/ci/testcases.yaml
functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/opnfv_tests/openstack/tempest/tempest.py
functest/tests/unit/openstack/tempest/test_conf_utils.py
functest/tests/unit/openstack/tempest/test_tempest.py
requirements.txt
upper-constraints.txt

index 1811e93..fe91852 100644 (file)
@@ -16,7 +16,6 @@ ARG BRANCH=master
 ARG RALLY_TAG=0.8.1
 ARG ODL_TAG=release/beryllium-sr4
 ARG OPENSTACK_TAG=stable/ocata
-ARG KINGBIRD_TAG=1.1.0
 ARG VIMS_TAG=stable
 ARG VROUTER_TAG=stable
 ARG REPOS_DIR=/home/opnfv/repos
index 1e794aa..dceb4ab 100644 (file)
@@ -109,7 +109,6 @@ The external test cases are:
  * odl-netvirt
  * onos
  * fds
- * multisite
  * orchestra_ims
  * parser
  * promise
index a72055c..750fa9b 100644 (file)
@@ -304,7 +304,6 @@ should now be in place::
             |-- doctor
             |-- domino
             |-- functest
-            |-- kingbird
             |-- odl_test
             |-- onos
             |-- parser
index 2954aaa..7c82c6f 100644 (file)
@@ -132,10 +132,6 @@ validate the scenario for the release.
 |             |               |                | See `Domino User Guide`_ for     |
 |             |               |                | details                          |
 |             |               +----------------+----------------------------------+
-|             |               | multisite      | Multisite                        |
-|             |               |                | See `Multisite User Guide`_ for  |
-|             |               |                | details                          |
-|             |               +----------------+----------------------------------+
 |             |               | odl-sfc        | SFC testing for odl scenarios    |
 |             |               |                | See `SFC User Guide`_ for details|
 |             |               +----------------+----------------------------------+
@@ -257,4 +253,3 @@ section `Executing the functest suites`_ of this document.
 .. _`Parser User Guide`: http://artifacts.opnfv.org/parser/colorado/docs/userguide/index.html
 .. _`Functest Dashboard`: http://testresults.opnfv.org/kibana_dashboards/
 .. _`SFC User Guide`: http://artifacts.opnfv.org/sfc/colorado/userguide/index.html
-.. _`Multisite User Guide`: http://artifacts.opnfv.org/multisite/docs/userguide/index.html
index 58a3e4b..5367421 100644 (file)
@@ -610,7 +610,7 @@ variables:
  * The scenario [controller]-[feature]-[mode], stored in DEPLOY_SCENARIO with
 
    * controller = (odl|ocl|nosdn|onos)
-   * feature = (ovs(dpdk)|kvm|sfc|bgpvpn|multisites|ovs_dpdk_bar)
+   * feature = (ovs(dpdk)|kvm|sfc|bgpvpn|ovs_dpdk_bar)
    * mode = (ha|noha)
 
 The constraints per test case are defined in the Functest configuration file
index 679140f..415d5e9 100644 (file)
@@ -158,14 +158,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
index ad8b088..865a564 100644 (file)
@@ -20,6 +20,3 @@ ovs:
         image_properties: {'hw_mem_page_size':'large'}
     tempest:
         use_custom_flavors: True
-multisite:
-    tempest:
-        use_custom_flavors: True
index 8691448..aae6c3b 100644 (file)
@@ -316,21 +316,6 @@ tiers:
                     args:
                         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
index 7c88fc5..975f2bd 100644 (file)
@@ -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)
index b00bc6a..003d4ea 100644 (file)
@@ -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):
index a807ae4..5508574 100644 (file)
@@ -195,18 +195,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
             self.assertTrue(m2.called)
 
     def test_configure_tempest_default(self):
-        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, \
-            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'), \
@@ -214,7 +202,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase):
                        '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)
index b8b258b..d5016f7 100644 (file)
@@ -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')
 
index 5344d0c..4f8d06b 100644 (file)
@@ -25,7 +25,6 @@ mock>=2.0 # BSD
 iniparse==0.4
 PrettyTable<0.8,>=0.7.1 # BSD
 six>=1.9.0 # MIT
-kingbird
 opnfv
 snaps
 rally
index 4f4e1da..234ccee 100644 (file)
@@ -14,5 +14,4 @@ robotframework===3.0.2
 robotframework-httplibrary===0.4.2
 robotframework-requests===0.4.7
 robotframework-sshlibrary===2.1.3;python_version=='2.7'
-kingbird===1.1.0
 rally===0.9.1