Skip to content

Commit

Permalink
Fix condition intended to skip iBGP neighbors to work on single-asic (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
arista-nwolfe authored and mssonicbld committed Nov 15, 2024
1 parent 3e99804 commit 0e9fd39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/bgp/test_bgp_session_flap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 0e9fd39

Please sign in to comment.