Skip to content

Commit 2420f3e

Browse files
used get_backplane_ports api to get the excluded_ports
1 parent 7a74ca3 commit 2420f3e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/qos/qos_sai_base.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,13 +1002,7 @@ def dutConfig(
10021002

10031003
# Build a set of Ethernet ports to exclude (with 18.x.202.0/31 IPs)
10041004
excluded_ports = set()
1005-
for item in duthosts[0].show_and_parse("show ip interface"):
1006-
# Match lines starting with "Ethernet" and IP in 18.x.202.0/31
1007-
ip_mask = item.get('ipv4 address/mask', '')
1008-
ip = ip_mask.split('/')[0]
1009-
octets = ip.split('.')
1010-
if len(octets) >= 3 and octets[0] == '18' and octets[2] == '202':
1011-
excluded_ports.add(item['interface'])
1005+
excluded_ports.update(duthosts[0].get_backplane_ports())
10121006
# Filter minigraph_ptf_indices to exclude dynamic ports
10131007
src_mgFacts["minigraph_ptf_indices"] = {
10141008
key: value

0 commit comments

Comments
 (0)