diff options
author | Manuel Buil <mbuil@suse.com> | 2017-12-14 12:13:19 +0100 |
---|---|---|
committer | Manuel Buil <mbuil@suse.com> | 2017-12-21 17:28:32 +0100 |
commit | deca6d35cd4ba0c6444b92d15b07ade1169d0ef3 (patch) | |
tree | 36abacae739f5c6bb494c2502b6ad3e37446d676 /sfc/tests/functest/run_sfc_tests.py | |
parent | 163aacce943bf07a5603587b9ae681ff9bf4605b (diff) |
Migrate to SNAPs openstack library
Functest is deprecating its openstack library which we were using extensively
We need then to move to an alternative and the best appears to be SNAPs
Change-Id: Icaa0b9f1ec580545b9d0faa88be2080a310deaf7
Signed-off-by: Manuel Buil<mbuil@suse.com>
Diffstat (limited to 'sfc/tests/functest/run_sfc_tests.py')
-rw-r--r-- | sfc/tests/functest/run_sfc_tests.py | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sfc/tests/functest/run_sfc_tests.py b/sfc/tests/functest/run_sfc_tests.py index 49bf6c20..a1e73040 100644 --- a/sfc/tests/functest/run_sfc_tests.py +++ b/sfc/tests/functest/run_sfc_tests.py @@ -14,13 +14,12 @@ import time import sys import yaml -from functest.utils import openstack_utils as os_utils from functest.core import testcase from opnfv.utils import ovs_logger as ovs_log from opnfv.deployment.factory import Factory as DeploymentFactory from sfc.lib import cleanup as sfc_cleanup from sfc.lib import config as sfc_config -from sfc.lib import utils as sfc_utils +from sfc.lib import odl_utils as odl_utils from collections import OrderedDict import logging @@ -127,20 +126,7 @@ class SfcFunctest(testcase.TestCase): self.__disable_heat_resource_finder_cache(nodes, COMMON_CONFIG.installer_type) - if COMMON_CONFIG.installer_type == 'fuel': - a_controller = [node for node in nodes - if node.is_controller()][0] - - rc_file = self.__fetch_tackerc_file(a_controller) - os_utils.source_credentials(rc_file) - - logger.info("Updating env with {0}".format(rc_file)) - logger.info("OS credentials:") - for var, value in os.environ.items(): - if var.startswith("OS_"): - logger.info("\t{0}={1}".format(var, value)) - - odl_ip, odl_port = sfc_utils.get_odl_ip_port(nodes) + odl_ip, odl_port = odl_utils.get_odl_ip_port(nodes) ovs_logger = ovs_log.OVSLogger( os.path.join(COMMON_CONFIG.sfc_test_dir, 'ovs-logs'), @@ -168,7 +154,7 @@ class SfcFunctest(testcase.TestCase): package=None) start_time = time.time() try: - result = t.main() + result, creators = t.main() except Exception as e: logger.error("Exception when executing: %s" % test_name) logger.error(e) @@ -190,7 +176,7 @@ class SfcFunctest(testcase.TestCase): dic = {"duration": duration, "status": status} self.details.update({test_name: dic}) - sfc_cleanup.cleanup(odl_ip=odl_ip, odl_port=odl_port) + sfc_cleanup.cleanup(creators, odl_ip=odl_ip, odl_port=odl_port) self.stop_time = time.time() |