general:\r
directories:\r
# Relative to the path where the repo is cloned:\r
- dir_vping: functest/opnfv_tests/OpenStack/vPing\r
- dir_odl: functest/opnfv_tests/Controllers/ODL\r
- dir_rally: functest/opnfv_tests/OpenStack/rally\r
- dir_tempest_cases: functest/opnfv_tests/OpenStack/tempest/custom_tests\r
- dir_vIMS: functest/opnfv_tests/vnf/vIMS\r
- dir_onos: functest/opnfv_tests/Controllers/ONOS/Teston\r
- dir_onos_sfc: functest/opnfv_tests/Controllers/ONOS/Sfc\r
+ dir_vping: functest/opnfv_tests/openstack/vping\r
+ dir_odl: functest/opnfv_tests/sdn/odl\r
+ dir_rally: functest/opnfv_tests/openstack/rally\r
+ dir_tempest_cases: functest/opnfv_tests/openstack/tempest/custom_tests\r
+ dir_vIMS: functest/opnfv_tests/vnf/ims\r
+ dir_onos: functest/opnfv_tests/sdn/onos/teston\r
+ dir_onos_sfc: functest/opnfv_tests/sdn/onos/sfc\r
\r
# Absolute path\r
dir_home: /home/opnfv\r
"odl")
odl_tests
[[ "$report" == "-r" ]] && args=-p
- ${FUNCTEST_TEST_DIR}/Controllers/ODL/OpenDaylightTesting.py \
+ ${FUNCTEST_TEST_DIR}/sdn/odl/odl.py \
--keystoneip $keystone_ip --neutronip $neutron_ip \
--osusername ${OS_USERNAME} --ostenantname ${OS_TENANT_NAME} \
--ospassword ${OS_PASSWORD} \
--odlip $odl_ip --odlwebport $odl_port ${args}
;;
"tempest_smoke_serial")
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \
+ python ${FUNCTEST_TEST_DIR}/openstack/tempest/run_tempest.py \
$clean_flag -s -m smoke $report
;;
"tempest_full_parallel")
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \
+ python ${FUNCTEST_TEST_DIR}/openstack/tempest/run_tempest.py \
$serial_flag $clean_flag -m full $report
;;
"vims")
- python ${FUNCTEST_TEST_DIR}/vnf/vIMS/vIMS.py $clean_flag $report
+ python ${FUNCTEST_TEST_DIR}/vnf/ims/vims.py $clean_flag $report
;;
"rally_full")
- python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py $clean_flag all $report
+ python ${FUNCTEST_TEST_DIR}/openstack/rally/run_rally-cert.py $clean_flag all $report
;;
"rally_sanity")
- python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py \
+ python ${FUNCTEST_TEST_DIR}/openstack/rally/run_rally-cert.py \
$clean_flag --sanity all $report
;;
"onos")
- python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py
+ python ${FUNCTEST_TEST_DIR}/sdn/onos/teston/onos.py
;;
"onos_sfc")
- python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py -t sfc
+ python ${FUNCTEST_TEST_DIR}/sdn/onos/teston/onos.py -t sfc
;;
"promise")
python ${FUNCTEST_TEST_DIR}/features/promise.py $report
python ${REPOS_DIR}/moon/tests/run_tests.py $report
;;
"multisite")
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/gen_tempest_conf.py
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \
+ python ${FUNCTEST_TEST_DIR}/openstack/tempest/gen_tempest_conf.py
+ python ${FUNCTEST_TEST_DIR}/openstack/tempest/run_tempest.py \
$clean_flag -s -m feature_multisite $report \
- -c ${FUNCTEST_TEST_DIR}/OpenStack/tempest/tempest_multisite.conf
+ -c ${FUNCTEST_TEST_DIR}/openstack/tempest/tempest_multisite.conf
;;
"odl-sfc")
ODL_SFC_DIR=${REPOS_DIR}/sfc/tests/functest/odl-sfc
installer: ''
scenario: '^((?!bgpvpn|odl_l3).)*$'
run:
- module: 'functest.opnfv_tests.OpenStack.vPing.vping_ssh'
+ module: 'functest.opnfv_tests.openstack.vping.vping_ssh'
class: 'VPingSSH'
-
installer: ''
scenario: '^((?!lxd).)*$'
run:
- module: 'functest.opnfv_tests.OpenStack.vPing.vping_userdata'
+ module: 'functest.opnfv_tests.openstack.vping.vping_userdata'
class: 'VPingUserdata'
-
installer: ''
scenario: 'odl'
run:
- module: 'functest.opnfv_tests.Controllers.ODL.OpenDaylightTesting'
- class: 'ODLTestCases'
+ module: 'functest.opnfv_tests.sdn.odl.odl'
+ class: 'ODLTests'
-
name: onos
scenario: 'bgpvpn'
run:
module: 'functest.opnfv_tests.features.sdnvpn'
- class: 'SDNVPN'
+ class: 'SdnVpnTests'
-
name: security_scan
scenario: ''
run:
module: 'functest.opnfv_tests.features.domino'
- class: 'DominoCases'
+ class: 'DominoTests'
-
name: odl-sfc
criteria: 'status == "PASS"'
installer: 'fuel'
scenario: '^((?!bgpvpn|noha).)*$'
run:
- module: 'functest.opnfv_tests.vnf.vRNC.parser'
+ module: 'functest.opnfv_tests.vnf.rnc.parser'
class: 'Parser'
-
name: openstack
import functest.utils.functest_constants as ft_constants
-class DominoCases(TestCasesBase.TestCasesBase):
+class DominoTests(TestCasesBase.TestCasesBase):
DOMINO_REPO = ft_constants.DOMINO_REPO
RESULTS_DIR = ft_constants.FUNCTEST_RESULTS_DIR
logger = ft_logger.Logger("domino").getLogger()
def __init__(self):
- super(DominoCases, self).__init__()
+ super(DominoTests, self).__init__()
self.project_name = "domino"
self.case_name = "domino-multinode"
help="Create json result file",
action="store_true")
args = vars(parser.parse_args())
- domino = DominoCases()
+ domino = DominoTests()
try:
result = domino.main(**args)
if result != TestCasesBase.TestCasesBase.EX_OK:
import functest.utils.functest_utils as ft_utils
-class SDNVPN(TestCasesBase.TestCasesBase):
+class SdnVpnTests(TestCasesBase.TestCasesBase):
SDNVPN_REPO = ft_constants.SDNVPN_REPO_DIR
SDNVPN_REPO_TESTS = os.path.join(SDNVPN_REPO, "tests/functest")
RESULTS_DIR = ft_constants.FUNCTEST_RESULTS_DIR
logger = ft_logger.Logger("sdnvpn").getLogger()
def __init__(self):
- super(SDNVPN, self).__init__()
+ super(SdnVpnTests, self).__init__()
self.project_name = "sdnvpn"
self.case_name = "bgpvpn"
help="Create json result file",
action="store_true")
args = vars(parser.parse_args())
- sdnvpn = SDNVPN()
+ sdnvpn = SdnVpnTests()
try:
result = sdnvpn.main(**args)
if result != TestCasesBase.TestCasesBase.EX_OK:
return self._data
-class ODLTestCases(TestCasesBase.TestCasesBase):
+class ODLTests(TestCasesBase.TestCasesBase):
repos = ft_constants.REPOS_DIR
odl_test_repo = os.path.join(repos, "odl_test")
action='store_true')
args = vars(parser.parse_args())
- odl = ODLTestCases()
+ odl = ODLTests()
try:
result = odl.main(**args)
if result != TestCasesBase.TestCasesBase.EX_OK:
import time
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
-from Sfc_fun import Sfc_fun
+from sfc_onos import SfcOnos
logger = ft_logger.Logger("sfc").getLogger()
-Sfc_obj = Sfc_fun()
+Sfc_obj = SfcOnos()
OK = 200
CREATED = 201
NO_CONTENT = 204
-class Sfc_fun:
+class SfcOnos:
"""Defines all the def function of SFC."""
def __init__(self):
import requests
import time
-from environment import environment
+from environment import Environment
import functest.utils.functest_logger as ft_logger
-class client(environment):
+class Client(Environment):
logger = ft_logger.Logger("client").getLogger()
def __init__(self):
- environment.__init__(self)
- self.loginfo = environment()
+ Environment.__init__(self)
+ self.loginfo = Environment()
self.testcase = ''
def RunScript(self, handle, testname, timeout=300):
import pexpect
import re
-from foundation import foundation
+from foundation import Foundation
import functest.utils.functest_logger as ft_logger
-class connection(foundation):
+class Connection(Foundation):
logger = ft_logger.Logger("connection").getLogger()
def __init__(self):
- foundation.__init__(self)
- self.loginfo = foundation()
+ Foundation.__init__(self)
+ self.loginfo = Foundation()
def AddKnownHost(self, handle, ipaddr, username, password):
"""
import sys
import time
-from connection import connection
+from connection import Connection
import functest.utils.functest_logger as ft_logger
-class environment(connection):
+class Environment(Connection):
logger = ft_logger.Logger("environment").getLogger()
def __init__(self):
- connection.__init__(self)
- self.loginfo = connection()
+ Connection.__init__(self)
+ self.loginfo = Connection()
self.masterhandle = ''
self.home = ''
import functest.utils.functest_utils as ft_utils
-class foundation:
+class Foundation:
def __init__(self):
# currentpath = os.getcwd()
currentpath = \
- ft_constants.FUNCTEST_TEST_DIR + '/Controllers/ONOS/Teston/CI'
+ ft_constants.FUNCTEST_TEST_DIR + '/sdn/onos/teston/ci'
self.cipath = currentpath
self.logdir = os.path.join(currentpath, 'log')
self.workhome = currentpath[0: currentpath.rfind('opnfv_tests') - 1]
########################################################################
-class clearwater:
+class Clearwater:
def __init__(self, inputs={}, orchestrator=None, logger=None):
self.config = inputs
import functest.utils.functest_logger as ft_logger
-class orchestrator:
+class Orchestrator:
def __init__(self, testcase_dir, inputs={}):
self.testcase_dir = testcase_dir
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
-from clearwater import clearwater
-from orchestrator import orchestrator
+from clearwater import Clearwater
+from orchestrator import Orchestrator
import functest.utils.functest_constants as ft_constants
pp = pprint.PrettyPrinter(indent=4)
# Cloudify parameters
-VIMS_DIR = os.path.join(ft_constants.FUNCTEST_TEST_DIR, 'vnf/vIMS/')
+VIMS_DIR = os.path.join(ft_constants.FUNCTEST_TEST_DIR, 'vnf/ims/')
VIMS_DATA_DIR = ft_constants.VIMS_DATA_DIR
VIMS_TEST_DIR = ft_constants.VIMS_TEST_DIR
VIMS_TENANT_NAME = ft_constants.VIMS_TENANT_NAME
public_auth_url = keystone.service_catalog.url_for(
service_type='identity', endpoint_type='publicURL')
- cfy = orchestrator(VIMS_DATA_DIR, CFY_INPUTS)
+ cfy = Orchestrator(VIMS_DATA_DIR, CFY_INPUTS)
cfy.set_credentials(username=ks_creds['username'], password=ks_creds[
'password'], tenant_name=ks_creds['tenant_name'],
# ############### CLEARWATER INITIALISATION ################
- cw = clearwater(CW_INPUTS, cfy, logger)
+ cw = Clearwater(CW_INPUTS, cfy, logger)
logger.info("Collect flavor id for all clearwater vm")
nova = nvclient.Client("2", **nv_creds)
from robot.errors import RobotError
from functest.core import TestCasesBase
-from functest.opnfv_tests.Controllers.ODL import OpenDaylightTesting
+from functest.opnfv_tests.sdn.odl import odl
from functest.utils import functest_constants as ft_constants
-class ODLTestCasesTesting(unittest.TestCase):
+class ODLTesting(unittest.TestCase):
logging.disable(logging.CRITICAL)
ft_constants.OS_USERNAME = self._os_username
ft_constants.OS_PASSWORD = self._os_password
ft_constants.OS_TENANT_NAME = self._os_tenantname
- self.test = OpenDaylightTesting.ODLTestCases()
+ self.test = odl.ODLTests()
@mock.patch('fileinput.input', side_effect=Exception())
def test_set_robotframework_vars_failed(self, *args):
def _fake_url_for(cls, service_type='identity', **kwargs):
if service_type == 'identity':
return "http://{}:5000/v2.0".format(
- ODLTestCasesTesting._keystone_ip)
+ ODLTesting._keystone_ip)
elif service_type == 'network':
- return "http://{}:9696".format(ODLTestCasesTesting._neutron_ip)
+ return "http://{}:9696".format(ODLTesting._neutron_ip)
else:
return None
def _test_main(self, status, *args):
kwargs = self._get_main_kwargs()
self.assertEqual(self.test.main(**kwargs), status)
- odl_res_dir = OpenDaylightTesting.ODLTestCases.res_dir
+ odl_res_dir = odl.ODLTests.res_dir
if len(args) > 0:
args[0].assert_called_once_with(odl_res_dir)
if len(args) > 1:
'RESTCONFPORT:{}'.format(self._odl_restconfport)]
output_file = os.path.join(odl_res_dir, 'output.xml')
args[1].assert_called_once_with(
- OpenDaylightTesting.ODLTestCases.basic_suite_dir,
- OpenDaylightTesting.ODLTestCases.neutron_suite_dir,
+ odl.ODLTests.basic_suite_dir,
+ odl.ODLTests.neutron_suite_dir,
log='NONE',
output=output_file,
report='NONE',
--with-coverage \
--cover-erase \
--cover-package=functest.core.TestCasesBase \
- --cover-package=functest.opnfv_tests.Controllers.ODL.OpenDaylightTesting \
+ --cover-package=functest.opnfv_tests.sdn.odl.odl \
--cover-xml \
--cover-html \
functest/tests/unit