diff options
Diffstat (limited to 'sfc/tests')
-rw-r--r-- | sfc/tests/functest/config.yaml | 1 | ||||
-rw-r--r-- | sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py | 7 | ||||
-rw-r--r-- | sfc/tests/functest/sfc_symmetric_chain.py | 22 | ||||
-rw-r--r-- | sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | 12 |
4 files changed, 35 insertions, 7 deletions
diff --git a/sfc/tests/functest/config.yaml b/sfc/tests/functest/config.yaml index 618d69e1..bb32a7df 100644 --- a/sfc/tests/functest/config.yaml +++ b/sfc/tests/functest/config.yaml @@ -15,6 +15,7 @@ defaults: image_format: qcow2 url: "http://artifacts.opnfv.org/sfc/images" vnfd-dir: "vnfd-templates" + vnfd-default-params-file: "test-vnfd-default-params.yaml" testcases: sfc_two_chains_SSH_and_HTTP: diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py index 72408897..357f08de 100644 --- a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py +++ b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py @@ -148,15 +148,22 @@ def main(): tacker_client, tosca_file=tosca_file) + default_param_file = os.path.join( + COMMON_CONFIG.sfc_test_dir, + COMMON_CONFIG.vnfd_dir, + COMMON_CONFIG.vnfd_default_params_file) + test_utils.create_vnf_in_av_zone( tacker_client, 'testVNF1', 'test-vnfd1', + default_param_file, av_zone=availability_zones[0]) test_utils.create_vnf_in_av_zone( tacker_client, 'testVNF2', 'test-vnfd2', + default_param_file, av_zone=availability_zones[1]) vnf1_id = os_tacker.wait_for_vnf(tacker_client, vnf_name='testVNF1') diff --git a/sfc/tests/functest/sfc_symmetric_chain.py b/sfc/tests/functest/sfc_symmetric_chain.py index 6ac8c1b6..409bd0b8 100644 --- a/sfc/tests/functest/sfc_symmetric_chain.py +++ b/sfc/tests/functest/sfc_symmetric_chain.py @@ -22,6 +22,7 @@ from opnfv.deployment.factory import Factory as DeploymentFactory import sfc.lib.config as sfc_config import sfc.lib.utils as test_utils from sfc.lib.results import Results +import sfc.lib.topology_shuffler as topo_shuffler logger = ft_logger.Logger(__name__).getLogger() @@ -96,13 +97,22 @@ def main(): TESTCASE_CONFIG.secgroup_name, TESTCASE_CONFIG.secgroup_descr) + vnfs = ['testVNF1'] + # Using seed=0 uses the baseline topology: everything in the same host + testTopology = topo_shuffler.topology(vnfs, seed=0) + logger.info('This test is run with the topology {0}' + .format(testTopology['id'])) + logger.info('Topology description: {0}' + .format(testTopology['description'])) + test_utils.create_instance( nova_client, CLIENT, COMMON_CONFIG.flavor, image_id, network_id, - sg_id) + sg_id, + av_zone=testTopology[CLIENT]) server_instance = test_utils.create_instance( nova_client, @@ -110,17 +120,19 @@ def main(): COMMON_CONFIG.flavor, image_id, network_id, - sg_id) + sg_id, + av_zone=testTopology[SERVER]) server_ip = server_instance.networks.get(TESTCASE_CONFIG.net_name)[0] - tosca = os.path.join( + tosca_file = os.path.join( COMMON_CONFIG.sfc_test_dir, COMMON_CONFIG.vnfd_dir, TESTCASE_CONFIG.test_vnfd) - os_tacker.create_vnfd(tacker_client, tosca_file=tosca) - test_utils.create_vnf_in_av_zone(tacker_client, 'testVNF1', 'test-vnfd1') + os_tacker.create_vnfd(tacker_client, tosca_file=tosca_file) + test_utils.create_vnf_in_av_zone( + tacker_client, vnfs[0], 'test-vnfd1', testTopology[vnfs[0]]) vnf_id = os_tacker.wait_for_vnf(tacker_client, vnf_name='testVNF1') if vnf_id is None: diff --git a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py index 99e5d67e..fa549b16 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -139,10 +139,18 @@ def main(): COMMON_CONFIG.vnfd_dir, TESTCASE_CONFIG.test_vnfd_blue) os_tacker.create_vnfd(tacker_client, tosca_file=tosca_blue) + + default_param_file = os.path.join( + COMMON_CONFIG.sfc_test_dir, + COMMON_CONFIG.vnfd_dir, + COMMON_CONFIG.vnfd_default_params_file) + test_utils.create_vnf_in_av_zone( - tacker_client, vnfs[0], 'test-vnfd1', testTopology[vnfs[0]]) + tacker_client, vnfs[0], 'test-vnfd1', + default_param_file, testTopology[vnfs[0]]) test_utils.create_vnf_in_av_zone( - tacker_client, vnfs[1], 'test-vnfd2', testTopology[vnfs[1]]) + tacker_client, vnfs[1], 'test-vnfd2', + default_param_file, testTopology[vnfs[1]]) vnf1_id = os_tacker.wait_for_vnf(tacker_client, vnf_name='testVNF1') vnf2_id = os_tacker.wait_for_vnf(tacker_client, vnf_name='testVNF2') |