From 9e203623edcc90f636c65d3cb8ad1562eb5d96b6 Mon Sep 17 00:00:00 2001 From: alawing Date: Tue, 27 Aug 2024 09:59:27 -0700 Subject: [PATCH] Added sonic-clears on beginning of stup_neighbors (#14251) --- tests/ecmp/test_fgnhg.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ecmp/test_fgnhg.py b/tests/ecmp/test_fgnhg.py index e3f7aa06c7f..9688c787867 100644 --- a/tests/ecmp/test_fgnhg.py +++ b/tests/ecmp/test_fgnhg.py @@ -66,8 +66,8 @@ def configure_interfaces(cfg_facts, duthost, ptfhost, vlan_ip): ptf_to_dut_port_map[ptf_port_id] = port port_list.sort() - bank_0_port = port_list[:len(port_list)/2] - bank_1_port = port_list[len(port_list)/2:] + bank_0_port = port_list[:len(port_list)//2] + bank_1_port = port_list[len(port_list)//2:] # Create vlan if duthost.command('config interface ip add Vlan' + str(DEFAULT_VLAN_ID) + ' ' + str(vlan_ip)) @@ -111,6 +111,9 @@ def generate_fgnhg_config(duthost, ip_to_port, bank_0_port, bank_1_port): def setup_neighbors(duthost, ptfhost, ip_to_port): + duthost.shell("sonic-clear fdb all") + duthost.shell("sonic-clear arp") + duthost.shell("sonic-clear ndp") vlan_name = "Vlan" + str(DEFAULT_VLAN_ID) neigh_entries = {} neigh_entries['NEIGH'] = {}