aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
diff options
context:
space:
mode:
Diffstat (limited to 'sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py')
-rw-r--r--sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py27
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()