Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[portchannel ]Fix bgp_gr_helper/iface_loopback action failure due to config_db change #7774

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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