Remove INSTALLER_IP from Functest
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 13 Feb 2018 10:50:34 +0000 (11:50 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 13 Feb 2018 13:58:48 +0000 (14:58 +0100)
It's mandatory for testcases which are out of Functest.

Change-Id: Ia5f5134334ad9f69d44409d817616fa9033fae95
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docs/testing/user/configguide/configguide.rst
functest/cli/commands/cli_env.py
functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/tests/unit/cli/commands/test_cli_env.py
functest/tests/unit/cli/commands/test_cli_os.py
functest/utils/env.py

index 9adf79e..c4d9a6d 100644 (file)
@@ -38,7 +38,6 @@ Preparing your environment
 cat env::
 
   INSTALLER_TYPE=XXX
-  INSTALLER_IP=XXX
   EXTERNAL_NETWORK=XXX
   DEPLOY_SCENARIO=XXX
 
@@ -198,13 +197,9 @@ Environment variables
 
 Several environement variables may be specified:
   * INSTALLER_TYPE=(apex|compass|daisy|fuel|joid)
-  * INSTALLER_IP=<Specific IP Address>
   * DEPLOY_SCENARIO=<vim>-<controller>-<nfv_feature>-<ha_mode>
 
 
-INSTALLER IP may be required by some test cases like SFC or Barometer in order
-to access the installer node and the deployment.
-
 The format for the DEPLOY_SCENARIO env variable can be described as follows:
   * vim: (os|k8s) = OpenStack or Kubernetes
   * controller is one of ( nosdn | odl )
index a5c0e39..f93ef61 100644 (file)
@@ -20,8 +20,6 @@ class Env(object):  # pylint: disable=too-few-public-methods
     @staticmethod
     def show():
         install_type = os.environ.get('INSTALLER_TYPE', 'Unknown')
-        installer_ip = os.environ.get('INSTALLER_IP', 'Unknown')
-        installer_info = ("%s, %s" % (install_type, installer_ip))
         scenario = os.environ.get('DEPLOY_SCENARIO', 'Unknown')
         node = os.environ.get('NODE_NAME', 'Unknown')
         build_tag = os.environ.get('BUILD_TAG', None)
@@ -29,7 +27,7 @@ class Env(object):  # pylint: disable=too-few-public-methods
             build_tag = build_tag.lstrip(
                 "jenkins-").lstrip("functest").lstrip("-")
 
-        env_info = {'INSTALLER': installer_info,
+        env_info = {'INSTALLER': install_type,
                     'SCENARIO': scenario,
                     'POD': node,
                     'BUILD_TAG': build_tag}
index efcbe7f..f128784 100644 (file)
@@ -52,7 +52,6 @@ TEST_ACCOUNTS_FILE = pkg_resources.resource_filename(
     'opnfv_tests/openstack/tempest/custom_tests/test_accounts.yaml')
 
 CI_INSTALLER_TYPE = CONST.__getattribute__('INSTALLER_TYPE')
-CI_INSTALLER_IP = CONST.__getattribute__('INSTALLER_IP')
 
 """ logging configuration """
 LOGGER = logging.getLogger(__name__)
index d17da16..7d6f778 100644 (file)
@@ -36,9 +36,6 @@ class CliEnvTesting(unittest.TestCase):
         if var == 'INSTALLER_TYPE':
             os.environ['INSTALLER_TYPE'] = ''
             reg_string = r"|  INSTALLER: Unknown, \S+\s*|"
-        elif var == 'INSTALLER_IP':
-            os.environ['INSTALLER_IP'] = ''
-            reg_string = r"|  INSTALLER: \S+, Unknown\s*|"
         elif var == 'SCENARIO':
             os.environ['DEPLOY_SCENARIO'] = ''
             reg_string = r"|   SCENARIO: Unknown\s*|"
@@ -57,9 +54,6 @@ class CliEnvTesting(unittest.TestCase):
     def test_show_ci_installer_type_ko(self, *args):
         self._test_show_missing_env_var('INSTALLER_TYPE', *args)
 
-    def test_show_ci_installer_ip_ko(self, *args):
-        self._test_show_missing_env_var('INSTALLER_IP', *args)
-
     def test_show_missing_ci_scenario(self, *args):
         self._test_show_missing_env_var('SCENARIO', *args)
 
index 02392d2..a5e562a 100644 (file)
@@ -23,7 +23,6 @@ class CliOpenStackTesting(unittest.TestCase):
         self.endpoint_ip = 'test_ip'
         self.os_auth_url = 'http://test_ip:test_port/v2.0'
         self.installer_type = 'test_installer_type'
-        self.installer_ip = 'test_installer_ip'
         self.openstack_creds = 'test_env_file'
         self.snapshot_file = 'test_snapshot_file'
         os.environ["OS_AUTH_URL"] = ''
index 110164b..b626473 100644 (file)
@@ -16,7 +16,6 @@ class Environment(object):  # pylint: disable=too-few-public-methods
         'DEPLOY_SCENARIO': 'os-nosdn-nofeature-noha',
         'DEPLOY_TYPE': 'virt',
         'INSTALLER_TYPE': None,
-        'INSTALLER_IP': None,
         'BUILD_TAG': None,
         'OS_ENDPOINT_TYPE': None,
         'OS_AUTH_URL': None,