diff --git a/tests/bgp/test_bgp_gr_helper.py b/tests/bgp/test_bgp_gr_helper.py index 67b1e9164c..df07bd6a75 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_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']] @@ -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: diff --git a/tests/iface_loopback_action/iface_loopback_action_helper.py b/tests/iface_loopback_action/iface_loopback_action_helper.py index d7a10866d7..240f9a705f 100644 --- a/tests/iface_loopback_action/iface_loopback_action_helper.py +++ b/tests/iface_loopback_action/iface_loopback_action_helper.py @@ -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