diff options
author | George Paraskevopoulos <geopar@intracom-telecom.com> | 2017-02-17 11:49:14 +0200 |
---|---|---|
committer | George Paraskevopoulos <geopar@intracom-telecom.com> | 2017-02-17 15:46:03 +0200 |
commit | 75ac61401c83253d533983de6e2650f82fc4c427 (patch) | |
tree | fe6fe781467f90e72d3825ad995dc0e82cfe130e /sfc/tests/functest | |
parent | b1e66426c1efe2f7412a417eb3b728d5a8026e65 (diff) |
Run sfc_two_chains in multiple topologies
JIRA: SFC-63
The test will run in a number of configurations as described in SFC-63.
We expect to get decent coverage with these 5 topologies:
1. CLIENT_VNF_SAME_HOST
2. CLIENT_SERVER_SAME_HOST
3. SERVER_VNF_SAME_HOST
4. CLIENT_SERVER_SAME_HOST_SPLIT_VNF
5. CLIENT_SERVER_DIFFERENT_HOST_SPLIT_VNF
Change-Id: Iaca75bf180c33e3d22759e4da1ca4897072f68a6
Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
Diffstat (limited to 'sfc/tests/functest')
-rw-r--r-- | sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | 27 |
1 files changed, 23 insertions, 4 deletions
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 e02fa475..123b1cad 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -21,6 +21,7 @@ import sfc.lib.config as sfc_config import sfc.lib.utils as test_utils from sfc.lib.results import Results from opnfv.deployment.factory import Factory as DeploymentFactory +import sfc.lib.topology_shuffler as topo_shuffler """ logging configuration """ @@ -110,12 +111,23 @@ def main(): TESTCASE_CONFIG.secgroup_name, TESTCASE_CONFIG.secgroup_descr) + vnfs = ['testVNF1', 'testVNF2'] + + topo_seed = topo_shuffler.get_seed() # change to None for nova av zone + testTopology = topo_shuffler.topology(vnfs, seed=topo_seed) + + 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) + network_id, sg_id, av_zone=testTopology['client']) + srv_instance = test_utils.create_instance( nova_client, SERVER, COMMON_CONFIG.flavor, image_id, - network_id, sg_id) + network_id, sg_id, av_zone=testTopology['server']) srv_prv_ip = srv_instance.networks.get(TESTCASE_CONFIG.net_name)[0] @@ -128,8 +140,10 @@ def main(): COMMON_CONFIG.vnfd_dir, TESTCASE_CONFIG.test_vnfd_blue) os_tacker.create_vnfd(tacker_client, tosca_file=tosca_blue) - test_utils.create_vnf_in_av_zone(tacker_client, 'testVNF1', 'test-vnfd1') - test_utils.create_vnf_in_av_zone(tacker_client, 'testVNF2', 'test-vnfd2') + test_utils.create_vnf_in_av_zone( + tacker_client, vnfs[0], 'test-vnfd1', testTopology[vnfs[0]]) + test_utils.create_vnf_in_av_zone( + tacker_client, vnfs[1], 'test-vnfd2', 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') @@ -261,6 +275,11 @@ def main(): ovs_logger, controller_clients, compute_clients, error) results.add_to_summary(2, "FAIL", "SSH works") + logger.info('This test is run with the topology {0}' + .format(testTopology['id'])) + logger.info('Topology description: {0}' + .format(testTopology['description'])) + return results.compile_summary() |