Skip to content
Merged
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
9 changes: 7 additions & 2 deletions tests/dhcp_relay/test_dhcpv6_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,16 @@ def dut_dhcp_relay_data(duthosts, rand_one_dut_hostname, ptfhost, tbinfo):
# Obtain uplink port indicies for this DHCP relay agent
uplink_interfaces = []
uplink_port_indices = []
topo_type = tbinfo['topo']['type']
for iface_name, neighbor_info_dict in mg_facts['minigraph_neighbors'].items():
if neighbor_info_dict['name'] in mg_facts['minigraph_devices']:
neighbor_device_info_dict = mg_facts['minigraph_devices'][neighbor_info_dict['name']]
if 'type' in neighbor_device_info_dict and \
neighbor_device_info_dict['type'] in ['LeafRouter', 'MgmtLeafRouter']:
if 'type' not in neighbor_device_info_dict:
continue
nei_type = neighbor_device_info_dict['type']
if topo_type == 't0' and nei_type == 'LeafRouter' or \
topo_type == 'm0' and nei_type == 'MgmtLeafRouter' or \
topo_type == 'mx' and nei_type == 'MgmtToRRouter':
# If this uplink's physical interface is a member of a portchannel interface,
# we record the name of the portchannel interface here, as this is the actual
# interface the DHCP relay will listen on.
Expand Down