Commit b8d15ff
authored
[Snappi][master] Adding support for tgen_port_info in PFC tx_drop_counter and global_pause test-script (sonic-net#22490)
Description of PR
Added support for tgen_port_info in:
tests/snappi_tests/pfc/test_global_pause_with_snappi.py
tests/snappi_tests/pfc/test_tx_drop_counter_with_snappi.py
Summary:
Fixes # (issue)
Type of change
Bug fix
Testbed and Framework(new/improvement)
New Test case
Skipped for non-supported platforms
Test case improvement
Back port request
202205
202305
202311
202405
202411
202505
202511
Approach
What is the motivation for this PR?
The tgen_port_info was added as part of Snappi test infra improvement, which enabled users to select between static (from variables.override.yml) and dynamic (select 100 and 400Gbps ports) ports.
This was NOT included in test_tx_drop_counter and test_global_pause test-scripts under snappi_tests/pfc section.
How did you do it?
Imported the tgen_port_info from snappi_fixtures.py and removed any reference to old setup_dut_port function for both test-scripts.
How did you verify/test it?
Verification on 202511 is present in pull-request sonic-net#22380.
Verification steps for master:
azureuser@7e081020c2c7:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixre-egl-board73,ixre-egl-board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/y.xml --skip_sanity --log-file=/tmp/y.log --topology multidut-tgen -cache-clear --disable_loganalyzer snappi_tests/pfc/test_global_pause_with_snappi.py --pdb
Fri Feb 20 00:07:16 UTC 2026
====================================================================================================================== test session starts =======================================================================================================================
platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.5.0
---- curtailed output ----
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.014s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 1.261s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.116s
---- curtailed output ----
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows stop 5.353s
PASSED [ 50%]
---- curtailed output ----
INFO tests.common.plugins.memory_utilization:__init__.py:64 Before test: collected memory_values {'before_test': {}, 'after_test': {}}
------------------------------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------------------------------
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.014s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 1.059s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.110s
---- curtailed output ----
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows stop 5.514s
PASSED [100%]
---- curtailed output ----
----------------------------------------------------------------------------------------------------------------- generated xml file: /tmp/y.xml -----------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------- live log sessionfinish ---------------------------------------------------------------------------------------------------------------------
INFO root:__init__.py:67 Can not get Allure report URL. Please check logs
=========================================================================================================== 2 passed, 9 warnings in 789.04s (0:13:09) ============================================================================================================
INFO:root:Can not get Allure report URL. Please check logs
azureuser@7e081020c2c7:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixre-egl-board73,ixre-egl-board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/y.xml --skip_sanity --log-file=/tmp/y.log --topology multidut-tgen -cache-clear --disable_loganalyzer snappi_tests/pfc/test_tx_drop_counter_with_snappi.py --pdb
Fri Feb 20 00:21:03 UTC 2026
---- curtailed output ----
INFO ixnetwork_restpy.connection:connection.py:329 User info IxNetwork/tgen-ixia-03/admin-112-3670867
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 snappi-1.27.1
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 snappi_ixnetwork-1.27.2
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 ixnetwork_restpy-1.6.1
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.000s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 0.213s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.122s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Aggregation mode speed change 0.000s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Location configuration 0.288s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Layer1 configuration 0.000s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Lag Configuration 0.061s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Convert device config : 0.155s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Create IxNetwork device config : 0.000s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Push IxNetwork device config : 0.093s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Devices configuration 0.299s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows configuration 0.120s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Start interfaces 0.155s
INFO root:__init__.py:76 -------------------- fixture tgen_port_info setup ends --------------------
INFO root:__init__.py:81 -------------------- fixture disable_pfcwd setup starts --------------------
INFO root:__init__.py:85 -------------------- fixture disable_pfcwd setup ends --------------------
INFO root:conftest.py:3818 skip setup dualtor mux cables on non-dualtor testbed
---- curtailed output ----
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.012s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 1.265s
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.112s
---- curtailed output ----
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
---- curtailed output ----
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Link State operation 0.052s
INFO tests.snappi_tests.pfc.files.helper:helper.py:452 Snappi port Port 0 is set to DOWN
INFO tests.snappi_tests.pfc.files.helper:helper.py:457 Sleeping for 90 seconds
INFO snappi_ixnetwork.snappi_api:snappi_api.py:1419 Link State operation 0.058s
INFO tests.snappi_tests.pfc.files.helper:helper.py:469 Snappi port Port 0 is set to UP
---- curtailed output ----
INFO root:__init__.py:67 Can not get Allure report URL. Please check logs
=========================================================================================================== 2 passed, 9 warnings in 906.71s (0:15:06) ============================================================================================================
INFO:root:Can not get Allure report URL. Please check logs
Signed-off-by: amitpawa <[email protected]>
* snappi: issue-22363 removed multidut-port-info import from pfc tx_drop_counter testcase
Signed-off-by: amitpawa <[email protected]>
---------
Signed-off-by: amitpawa <[email protected]>1 parent 6286b96 commit b8d15ff
File tree
2 files changed
+39
-66
lines changed- tests/snappi_tests/pfc
2 files changed
+39
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 50 | + | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 52 | + | |
77 | 53 | | |
78 | 54 | | |
79 | 55 | | |
| |||
93 | 69 | | |
94 | 70 | | |
95 | 71 | | |
96 | | - | |
97 | | - | |
Lines changed: 15 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
0 commit comments