From 63357565439aee6bbc83419f909d52fc20dd36a4 Mon Sep 17 00:00:00 2001 From: Longxiang Lyu <35479537+lolyu@users.noreply.github.com> Date: Mon, 15 Mar 2021 14:01:07 +0800 Subject: [PATCH] [test_ipinip] Strip ip prefix (#3140) What is the motivation for this PR? Strip the ip prefix in the ip address passed to simple_ip_packet How did you do it? Strip the prefix. Signed-off-by: Longxiang Lyu --- tests/dualtor/test_ipinip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dualtor/test_ipinip.py b/tests/dualtor/test_ipinip.py index 1aaccfaa9e9..4435b64c827 100644 --- a/tests/dualtor/test_ipinip.py +++ b/tests/dualtor/test_ipinip.py @@ -29,7 +29,7 @@ def build_encapsulated_packet(rand_selected_interface, ptfadapter, rand_selected """Build the encapsulated packet sent from T1 to ToR.""" tor = rand_selected_dut _, server_ips = rand_selected_interface - server_ipv4 = server_ips["server_ipv4"] + server_ipv4 = server_ips["server_ipv4"].split("/")[0] config_facts = tor.get_running_config_facts() try: peer_ipv4_address = [_["address_ipv4"] for _ in config_facts["PEER_SWITCH"].values()][0]