aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/tests/functest/sfc_one_chain_two_service_functions.py
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2017-09-11 13:56:05 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-11 13:56:06 +0000
commitf17e3297ab82ba6654f3bc8a5756d76502233cf4 (patch)
tree61d21098c923f345de56ecb37ae867cbaabcfc40 /sfc/tests/functest/sfc_one_chain_two_service_functions.py
parent00ec6171218b0d43d9ac566515ca04cd6b8b4b28 (diff)
parent4336c75c74333cdd9740aedd5e5db3a5e68824be (diff)
Merge "Allign the SFC testcases to the new Tacker API"
Diffstat (limited to 'sfc/tests/functest/sfc_one_chain_two_service_functions.py')
-rw-r--r--sfc/tests/functest/sfc_one_chain_two_service_functions.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions.py b/sfc/tests/functest/sfc_one_chain_two_service_functions.py
index 3dbae79c..ef0ebd76 100644
--- a/sfc/tests/functest/sfc_one_chain_two_service_functions.py
+++ b/sfc/tests/functest/sfc_one_chain_two_service_functions.py
@@ -125,20 +125,22 @@ def main():
server_ip = server_instance.networks.get(TESTCASE_CONFIG.net_name)[0]
logger.info("Server instance received private ip [{}]".format(server_ip))
+ test_utils.register_vim(tacker_client, vim_file=COMMON_CONFIG.vim_file)
+
tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir,
COMMON_CONFIG.vnfd_dir,
TESTCASE_CONFIG.test_vnfd_red)
os_tacker.create_vnfd(
tacker_client,
- tosca_file=tosca_file)
+ tosca_file=tosca_file, vnfd_name='test-vnfd1')
tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir,
COMMON_CONFIG.vnfd_dir,
TESTCASE_CONFIG.test_vnfd_blue)
os_tacker.create_vnfd(
tacker_client,
- tosca_file=tosca_file)
+ tosca_file=tosca_file, vnfd_name='test-vnfd2')
default_param_file = os.path.join(
COMMON_CONFIG.sfc_test_dir,
@@ -146,10 +148,10 @@ def main():
COMMON_CONFIG.vnfd_default_params_file)
test_utils.create_vnf_in_av_zone(
- tacker_client, vnfs[0], 'test-vnfd1',
+ tacker_client, vnfs[0], 'test-vnfd1', 'test-vim',
default_param_file, testTopology[vnfs[0]])
test_utils.create_vnf_in_av_zone(
- tacker_client, vnfs[1], 'test-vnfd2',
+ tacker_client, vnfs[1], 'test-vnfd2', 'test-vim',
default_param_file, testTopology[vnfs[1]])
vnf1_id = os_tacker.wait_for_vnf(tacker_client, vnf_name=vnfs[0])
@@ -158,25 +160,23 @@ def main():
logger.error('ERROR while booting vnfs')
sys.exit(1)
- vnf1_instance_id = test_utils.get_nova_id(tacker_client, 'vdu1', vnf1_id)
+ vnf1_instance_id = test_utils.get_nova_id(tacker_client, 'VDU1', vnf1_id)
os_utils.add_secgroup_to_instance(nova_client, vnf1_instance_id, sg_id)
- vnf2_instance_id = test_utils.get_nova_id(tacker_client, 'vdu1', vnf2_id)
+ vnf2_instance_id = test_utils.get_nova_id(tacker_client, 'VDU1', vnf2_id)
os_utils.add_secgroup_to_instance(nova_client, vnf2_instance_id, sg_id)
- os_tacker.create_sfc(tacker_client, 'red',
- chain_vnf_names=[vnfs[0], vnfs[1]])
+ tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir,
+ COMMON_CONFIG.vnffgd_dir,
+ TESTCASE_CONFIG.test_vnffgd_red)
- os_tacker.create_sfc_classifier(
- tacker_client, 'red_http', sfc_name='red',
- match={
- 'source_port': 0,
- 'dest_port': 80,
- 'protocol': 6
- })
+ os_tacker.create_vnffgd(tacker_client,
+ tosca_file=tosca_file,
+ vnffgd_name='red')
- logger.info(test_utils.run_cmd('tacker sfc-list')[1])
- logger.info(test_utils.run_cmd('tacker sfc-classifier-list')[1])
+ os_tacker.create_vnffg(tacker_client,
+ vnffgd_name='red',
+ vnffg_name='red_http')
# Start measuring the time it takes to implement the classification rules
t1 = threading.Thread(target=test_utils.wait_for_classification_rules,