Skip to content

Commit

Permalink
Fix bgp_gr_helper and iface_loopback action failure du to config_db c…
Browse files Browse the repository at this point in the history
…hange

The PR#13660 removed the 'members' key in "PORTCHANNEL" in config_db.json, need to align the test
  • Loading branch information
nhe-NV committed Mar 17, 2023
1 parent 97966cb commit 2c92ace
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/bgp/test_bgp_gr_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _verify_prefix_counters_from_neighbor_after_graceful_restart(duthost, bgp_ne

config_facts = duthost.config_facts(host=duthost.hostname, source="running")['ansible_facts']
bgp_neighbors = config_facts.get('BGP_NEIGHBOR', {})
portchannels = config_facts.get('PORTCHANNEL_MEMBER', {})
portchannels_memebers = config_facts.get('PORTCHANNEL_MEMBER', {})
dev_nbrs = config_facts.get('DEVICE_NEIGHBOR', {})
configurations = tbinfo['topo']['properties']['configuration_properties']
exabgp_ips = [configurations['common']['nhipv4'], configurations['common']['nhipv6']]
Expand All @@ -130,7 +130,7 @@ def _verify_prefix_counters_from_neighbor_after_graceful_restart(duthost, bgp_ne
# get neighbor device connected ports
nbr_ports = []
if test_interface.startswith("PortChannel"):
for member in portchannels[test_interface].keys():
for member in portchannels_memebers[test_interface].keys():
nbr_ports.append(dev_nbrs[member]['port'])
test_neighbor_name = dev_nbrs[member]['name']
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_portchannel_of_port(config_facts, port):
"""
portchannels = config_facts['PORTCHANNEL'].keys() if 'PORTCHANNEL' in config_facts else []
for portchannel in portchannels:
portchannel_members = config_facts['PORTCHANNEL'][portchannel].get('members')
portchannel_members = config_facts['PORTCHANNEL_MEMBER'][portchannel].keys()
if port in portchannel_members:
return portchannel

Expand Down

0 comments on commit 2c92ace

Please sign in to comment.