From 8a66eac4bbb898d943d461845e371381425a9cf7 Mon Sep 17 00:00:00 2001 From: Juan Vidal Date: Fri, 24 Mar 2017 15:16:21 +0000 Subject: Harmonize vxlan-tool calls Renamed vxlan_firewall and vxlan_tool_stop to start_vxlan_tool and stop_vxlan_tool respectively. Added some comments to explain their behavior. Cleaned both functions to use ".format()" string formatting, which improves readability. Modified behavior of start_vxlan_tool: now it does NOT block traffic by default Change-Id: I6754b020a474be1e9adf2d83e7c9f5053930b702 Signed-off-by: Juan Vidal --- sfc/tests/functest/sfc_one_chain_two_service_functions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sfc/tests/functest/sfc_one_chain_two_service_functions.py') 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 bdf6f1b4..d28c6178 100644 --- a/sfc/tests/functest/sfc_one_chain_two_service_functions.py +++ b/sfc/tests/functest/sfc_one_chain_two_service_functions.py @@ -198,10 +198,9 @@ def main(): '\033[91mFailed to start HTTP server on %s\033[0m' % server_ip) sys.exit(1) - logger.info("Starting vxlan_tool on %s" % sf2) - test_utils.vxlan_firewall(sf2, block=False) - logger.info("Starting vxlan_tool on %s" % sf1) - test_utils.vxlan_firewall(sf1, block=False) + for sf in (sf1, sf2): + logger.info("Starting vxlan_tool on %s" % sf) + test_utils.start_vxlan_tool(sf) logger.info("Wait for ODL to update the classification rules in OVS") t1.join() @@ -219,8 +218,9 @@ def main(): logger.info("Changing the vxlan_tool to block HTTP traffic") # Make SF1 block now http traffic - test_utils.vxlan_tool_stop(sf1) - test_utils.vxlan_firewall(sf1, port="80") + test_utils.stop_vxlan_tool(sf1) + logger.info("Starting HTTP firewall on %s" % sf1) + test_utils.start_vxlan_tool(sf1, block="80") logger.info("Test HTTP again") if test_utils.is_http_blocked(client_ip, srv_prv_ip): -- cgit 1.2.3-korg