From 0e9fd394c7499c82dbda60a8dff170bcc2a34a0a Mon Sep 17 00:00:00 2001 From: arista-nwolfe <94405414+arista-nwolfe@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:10:08 -0500 Subject: [PATCH] Fix condition intended to skip iBGP neighbors to work on single-asic (#15411) Fixes #13662 added support for running bgp/test_bgp_session_flap.py on T2 topology. However, the condition it added to skip iBGP neighbors only works on multi-asic LCs: if 'asic' not in v['description'].lower(): The better solution is to check the BGP session's peer group which will indicate if it's internal or not regardless of single-asic or multi-asic --- tests/bgp/test_bgp_session_flap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bgp/test_bgp_session_flap.py b/tests/bgp/test_bgp_session_flap.py index f41fafc6894..3ed3d564ee9 100644 --- a/tests/bgp/test_bgp_session_flap.py +++ b/tests/bgp/test_bgp_session_flap.py @@ -66,7 +66,8 @@ def setup(tbinfo, nbrhosts, duthosts, enum_frontend_dut_hostname, enum_rand_one_ tor_neighbors = dict() neigh_asn = dict() for k, v in bgp_facts['bgp_neighbors'].items(): - if 'asic' not in v['description'].lower(): + # Skip iBGP neighbors + if "INTERNAL" not in v["peer group"] and "VOQ_CHASSIS" not in v["peer group"]: neigh_keys.append(v['description']) neigh_asn[v['description']] = v['remote AS'] tor_neighbors[v['description']] = nbrhosts[v['description']]["host"]