From 21c2137506a75868732c37481af6209772c6ee3e Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Sun, 26 Feb 2023 18:22:59 -0800 Subject: [PATCH] [bgp] Don't use portchannel members entry (#7568) Signed-off-by: Saikrishna Arcot Description of PR Summary: Fixes sonic-net/sonic-buildimage#11873 https://github.com/sonic-net/sonic-buildimage/issues/11873 Approach What is the motivation for this PR? The members entry in the PORTCHANNEL table has been removed. Switch to using PORTCHANNEL_MEMBERS instead. Related to sonic-net/sonic-buildimage#13660 https://github.com/sonic-net/sonic-buildimage/pull/13660 --- tests/bgp/test_bgp_gr_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bgp/test_bgp_gr_helper.py b/tests/bgp/test_bgp_gr_helper.py index 97b19ea0945..67b1e9164ce 100644 --- a/tests/bgp/test_bgp_gr_helper.py +++ b/tests/bgp/test_bgp_gr_helper.py @@ -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', {}) + portchannels = 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']] @@ -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]['members']: + for member in portchannels[test_interface].keys(): nbr_ports.append(dev_nbrs[member]['port']) test_neighbor_name = dev_nbrs[member]['name'] else: