Skip to content

Commit

Permalink
[snappi][master only] add enum with completeness_level back in (sonic…
Browse files Browse the repository at this point in the history
…-net#15538)

Summary:
The fix in sonic-net#15057 was overwritten by recent changes. This PR add it back into master. sonic-net#15539 add it back into 202405.
Will open another PR for 202405 as the fix will be slight different.

test_pfc_pause_single_lossless_prio_reboot:

the parameter/fixture sequence is different between master and 202405 branch.
this change moves the enum_dut_lossless_prio_with_completeness_level back to original position. so it will be same as 202405 branch.
test_pfc_pause_single_lossy_prio_reboot:

add enum_dut_lossy_prio_with_completeness_level back in.
  • Loading branch information
sdszhang authored and sreejithsreekumaran committed Nov 15, 2024
1 parent b7f2730 commit 5c9c259
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ def test_pfc_pause_single_lossless_prio_reboot(snappi_api, # n
fanout_graph_facts_multidut, # noqa: F811
duthosts,
localhost,
enum_dut_lossless_prio_with_completeness_level, # noqa: F811
prio_dscp_map, # noqa: F811
lossless_prio_list, # noqa: F811
all_prio_list, # noqa: F811
get_snappi_ports, # noqa: F811
tbinfo, # noqa: F811
enum_dut_lossless_prio_with_completeness_level, # noqa: F811
setup_ports_and_dut, # noqa: F811
disable_pfcwd, # noqa: F811
reboot_duts): # noqa: F811
Expand All @@ -159,10 +159,10 @@ def test_pfc_pause_single_lossless_prio_reboot(snappi_api, # n
fanout_graph_facts_multidut (pytest fixture): fanout graph
duthosts (pytest fixture): list of DUTs
localhost (pytest fixture): localhost handle
enum_dut_lossless_prio_with_completeness_level (str): lossless priority to test, e.g., 's6100-1|3'
all_prio_list (pytest fixture): list of all the priorities
prio_dscp_map (pytest fixture): priority vs. DSCP map (key = priority).
lossless_prio_list (pytest fixture): list of all the lossless priorities
enum_dut_lossless_prio_with_completeness_level (str): lossless priority to test, e.g., 's6100-1|3'
tbinfo (pytest fixture): fixture provides information about testbed
get_snappi_ports (pytest fixture): gets snappi ports and connected DUT port info and returns as a list
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def test_pfc_pause_single_lossy_prio_reboot(snappi_api, # noqa: F811
fanout_graph_facts_multidut, # noqa: F811
duthosts,
localhost,
enum_dut_lossy_prio,
enum_dut_lossy_prio_with_completeness_level,
prio_dscp_map, # noqa: F811
lossy_prio_list, # noqa: F811
all_prio_list, # noqa: F811
Expand All @@ -154,7 +154,7 @@ def test_pfc_pause_single_lossy_prio_reboot(snappi_api, # noqa: F811
fanout_graph_facts_multidut (pytest fixture): fanout graph
duthosts (pytest fixture): list of DUTs
localhost (pytest fixture): localhost handle
enum_dut_lossy_prio (str): name of lossy priority to test, e.g., 's6100-1|2'
enum_dut_lossy_prio_with_completeness_level (str): name of lossy priority to test, e.g., 's6100-1|2'
prio_dscp_map (pytest fixture): priority vs. DSCP map (key = priority).
lossy_prio_list (pytest fixture): list of all the lossy priorities
all_prio_list (pytest fixture): list of all the priorities
Expand All @@ -166,7 +166,7 @@ def test_pfc_pause_single_lossy_prio_reboot(snappi_api, # noqa: F811
"""
testbed_config, port_config_list, snappi_ports = setup_ports_and_dut

_, lossy_prio = enum_dut_lossy_prio.split('|')
_, lossy_prio = enum_dut_lossy_prio_with_completeness_level.split('|')
lossy_prio = int(lossy_prio)
pause_prio_list = [lossy_prio]
test_prio_list = [lossy_prio]
Expand Down

0 comments on commit 5c9c259

Please sign in to comment.