Skip to content

[Snappi] Adding support for tgen_port_info in PFC tx_drop_counter and global_pause test-script.#22380

Closed
amitpawar12 wants to merge 3 commits intosonic-net:masterfrom
amitpawar12:snappi-issue-22363-tgen-port-info
Closed

[Snappi] Adding support for tgen_port_info in PFC tx_drop_counter and global_pause test-script.#22380
amitpawar12 wants to merge 3 commits intosonic-net:masterfrom
amitpawar12:snappi-issue-22363-tgen-port-info

Conversation

@amitpawar12
Copy link
Contributor

@amitpawar12 amitpawar12 commented Feb 12, 2026

Description of PR

Summary:
Fixes #

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?

Verified the same on multi-DUT platform. As part of verification, test#1 runs on 1 RTR interface and 1 port-channel. test#2 runs on both portchannel interfaces.

  1. snappi_tests/pfc/test_global_pause_with_snappi.py
ansible@edc9e5307195:/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/e.xml --skip_sanity --log-file=/tmp/e.log --topology multidut-tgen -cache-clear --deep_clean --disable_loganalyzer snappi_tests/pfc/test_global_pause_with_snappi.py --pdb
Thu Feb 12 14:46:24 UTC 2026
---------- truncated logs -------------
WARNING  ixnetwork_restpy.connection:connection.py:351 Verification of certificates is disabled
WARNING  ixnetwork_restpy.connection:connection.py:351 Unable to connect to http://10.251.30.3:443.
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1859 Running test for test-subtype:single-line-long-to-short-400Gbps
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1442 rx_port:[{'ip': '100.117.59.187', 'port_id': '5', 'peer_port': 'Ethernet56', 'peer_device': 'ixre-egl-board74', 'speed': '400000', 'location': '100.117.59.187/12', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board74>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1443 tx_port:[{'ip': '100.117.59.187', 'port_id': '1', 'peer_port': 'Ethernet0', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/1', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:358 Using system_id:00:00:00:00:00:01 for portchannel:PortChannel110
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:891 Found relevant router interfaces
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:3622 skip setup dualtor mux cables on non-dualtor testbed
INFO     tests.common.plugins.memory_utilization:__init__.py:64 Before test: collected memory_values {'before_test': {}, 'after_test': {}}
---------- truncated logs -------------
INFO     tests.snappi_tests.pfc.test_global_pause_with_snappi_new:test_global_pause_with_snappi_new.py:50 Snappi Ports : [{'ip': '100.117.59.187', 'port_id': 0, 'peer_port': 'Ethernet56', 'peer_device': 'ixre-egl-board74', 'speed': '400000', 'location': '100.117.59.187/12', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board74>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}, {'ip': '100.117.59.187', 'port_id': 1, 'peer_port': 'Ethernet0', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/1', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:616 Wait for Arp to Resolve ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:639 Starting transmit on all flows ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:655 Polling DUT for traffic statistics for 23 seconds ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:674 Polling TGEN for in-flight traffic statistics...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:679 In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4', 'Background Flow Prio 1', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:680 In-flight TX frames: [200191570, 200191570, 81896551, 81896551, 81896551, 81896551, 81896551]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:681 In-flight RX frames: [200191570, 200191570, 81896551, 81896551, 81896551, 81896551, 81896551]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:682 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:693 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:700 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:728 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:730 Stopping transmit on all remaining flows
---------- truncated logs -------------
----------------------------------------------------------------------------------------------------------------------- live log teardown ------------------------------------------------------------------------------------------------------------------------
INFO     tests.common.plugins.memory_utilization:__init__.py:124 After test: collected memory_values {'before_test': {}, 'after_test': {}}
INFO     root:__init__.py:93 -------------------- fixture disable_pfcwd teardown starts --------------------
INFO     root:__init__.py:102 -------------------- fixture disable_pfcwd teardown ends --------------------
 snappi_tests/pfc/test_global_pause_with_snappi_new.py::test_global_pause[tgen_port_info0] ✓                                                                                                                                                        50% █████  
---------- truncated logs -------------
INFO     root:__init__.py:69 -------------------- fixture tgen_port_info setup starts --------------------
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1849 Cleaning up any previous IXIA config
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1859 Running test for test-subtype:single-line-long-to-long-400Gbps
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1442 rx_port:[{'ip': '100.117.59.187', 'port_id': '1', 'peer_port': 'Ethernet0', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/1', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1443 tx_port:[{'ip': '100.117.59.187', 'port_id': '3', 'peer_port': 'Ethernet152', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/5', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic1'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:358 Using system_id:00:00:00:00:00:02 for portchannel:PortChannel110
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:358 Using system_id:00:00:00:00:00:03 for portchannel:PortChannel112
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:888 Found relevant portchannel interfaces
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:3622 skip setup dualtor mux cables on non-dualtor testbed

---------- truncated logs -------------
------------------------------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------------------------------
INFO     tests.snappi_tests.pfc.test_global_pause_with_snappi_new:test_global_pause_with_snappi_new.py:50 Snappi Ports : [{'ip': '100.117.59.187', 'port_id': 0, 'peer_port': 'Ethernet0', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/1', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}, {'ip': '100.117.59.187', 'port_id': 1, 'peer_port': 'Ethernet152', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/5', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic1'}]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:616 Wait for Arp to Resolve ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:639 Starting transmit on all flows ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:655 Polling DUT for traffic statistics for 27 seconds ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:674 Polling TGEN for in-flight traffic statistics...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:679 In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4', 'Background Flow Prio 1', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:680 In-flight TX frames: [242337164, 242337164, 99137931, 99137931, 99137931, 99137931, 99137931]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:681 In-flight RX frames: [242337164, 242337164, 99137931, 99137931, 99137931, 99137931, 99137931]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:682 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:693 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:700 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:728 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:730 Stopping transmit on all remaining flows
---------- truncated logs -------------
Results (701.65s (0:11:41)):
       2 passed
INFO:root:Can not get Allure report URL. Please check logs
  1. test_tx_drop_counter
ansible@edc9e5307195:/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/e.xml --skip_sanity --log-file=/tmp/e.log --topology multidut-tgen -cache-clear --deep_clean --disable_loganalyzer snappi_tests/pfc/test_tx_drop_counter_with_snappi.py --pdb
Wed Feb 11 22:48:46 UTC 2026
---------- truncated logs -------------
INFO     root:__init__.py:69 -------------------- fixture tgen_port_info setup starts --------------------
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1849 Cleaning up any previous IXIA config
WARNING  ixnetwork_restpy.connection:connection.py:351 Verification of certificates is disabled
WARNING  ixnetwork_restpy.connection:connection.py:351 Unable to connect to http://10.251.30.3:443.
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1859 Running test for test-subtype:single-line-long-to-short-400Gbps
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1442 rx_port:[{'ip': '100.117.59.187', 'port_id': '5', 'peer_port': 'Ethernet56', 'peer_device': 'ixre-egl-board74', 'speed': '400000', 'location': '100.117.59.187/12', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board74>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1443 tx_port:[{'ip': '100.117.59.187', 'port_id': '1', 'peer_port': 'Ethernet0', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/1', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:358 Using system_id:00:00:00:00:00:01 for portchannel:PortChannel110
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:891 Found relevant router interfaces
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:3622 skip setup dualtor mux cables on non-dualtor testbed
INFO     tests.common.plugins.memory_utilization:__init__.py:64 Before test: collected memory_values {'before_test': {}, 'after_test': {}}
------------------------------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------------------------------
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:616 Wait for Arp to Resolve ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:639 Starting transmit on all flows ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:655 Polling DUT for traffic statistics for 16 seconds ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:674 Polling TGEN for in-flight traffic statistics...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:679 In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4']
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:680 In-flight TX frames: [158045977, 158045977]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:681 In-flight RX frames: [158045977, 158045977]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:682 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:693 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:700 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:728 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:730 Stopping transmit on all remaining flows
INFO     tests.snappi_tests.pfc.files.helper:helper.py:424 Snappi port Port 0 is set to DOWN
INFO     tests.snappi_tests.pfc.files.helper:helper.py:429 Sleeping for 90 seconds
INFO     tests.snappi_tests.pfc.files.helper:helper.py:441 Snappi port Port 0 is set to UP

---------- truncated logs -------------
INFO     tests.common.plugins.memory_utilization:__init__.py:124 After test: collected memory_values {'before_test': {}, 'after_test': {}}
INFO     root:__init__.py:93 -------------------- fixture disable_pfcwd teardown starts --------------------
INFO     root:__init__.py:102 -------------------- fixture disable_pfcwd teardown ends --------------------
 snappi_tests/pfc/test_tx_drop_counter_with_snappi_new.py::test_tx_drop_counter[tgen_port_info0] ✓                                                                                                                                                  50% █████     
---------- truncated logs -------------
INFO     root:__init__.py:69 -------------------- fixture tgen_port_info setup starts --------------------
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1849 Cleaning up any previous IXIA config
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1859 Running test for test-subtype:single-line-long-to-long-400Gbps
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1442 rx_port:[{'ip': '100.117.59.187', 'port_id': '1', 'peer_port': 'Ethernet0', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/1', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic0'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:1443 tx_port:[{'ip': '100.117.59.187', 'port_id': '4', 'peer_port': 'Ethernet176', 'peer_device': 'ixre-egl-board73', 'speed': '400000', 'location': '100.117.59.187/6', 'intf_config_changed': False, 'api_server_ip': '10.251.30.3', 'asic_type': 'broadcom', 'duthost': <MultiAsicSonicHost ixre-egl-board73>, 'snappi_speed_type': 'speed_400_gbps', 'asic_value': 'asic1'}]
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:358 Using system_id:00:00:00:00:00:02 for portchannel:PortChannel110
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:358 Using system_id:00:00:00:00:00:03 for portchannel:PortChannel113
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:888 Found relevant portchannel interfaces

---------- truncated logs -------------
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:616 Wait for Arp to Resolve ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:639 Starting transmit on all flows ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:655 Polling DUT for traffic statistics for 16 seconds ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:674 Polling TGEN for in-flight traffic statistics...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:679 In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4']
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:680 In-flight TX frames: [158045977, 158045977]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:681 In-flight RX frames: [158045977, 158045977]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:682 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:693 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:700 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:728 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:730 Stopping transmit on all remaining flows
INFO     tests.snappi_tests.pfc.files.helper:helper.py:424 Snappi port Port 0 is set to DOWN
INFO     tests.snappi_tests.pfc.files.helper:helper.py:429 Sleeping for 90 seconds
INFO     tests.snappi_tests.pfc.files.helper:helper.py:441 Snappi port Port 0 is set to UP

---------- truncated logs -------------
INFO     tests.conftest:conftest.py:3108 Core dump and config check passed for test_tx_drop_counter_with_snappi_new.py
 snappi_tests/pfc/test_tx_drop_counter_with_snappi_new.py::test_tx_drop_counter[tgen_port_info1] ✓                                                                                                                                                 100% █████████
---------- truncated logs -------------
Results (819.04s (0:13:39)):
       2 passed
INFO:root:Can not get Allure report URL. Please check logs

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…test-script

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
…p_counter testcase

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
… test-script

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
@mssonicbld
Copy link
Collaborator

/azp run

@amitpawar12
Copy link
Contributor Author

@sdszhang , @rawal01 for viz.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sdszhang sdszhang moved this to In Review in SONiC Snappi Feb 17, 2026
@amitpawar12
Copy link
Contributor Author

Closing this PR as the same is raised for master branch.

@github-project-automation github-project-automation bot moved this from To be Merged to Done in SONiC Snappi Feb 20, 2026
yejianquan pushed a commit that referenced this pull request Feb 23, 2026
…nter and global_pause test-script (#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 #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 <amit.2.pawar@nokia.com>

* snappi: issue-22363 removed multidut-port-info import from pfc tx_drop_counter testcase

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>

---------

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
aronovic pushed a commit to aronovic/sonic-mgmt that referenced this pull request Mar 3, 2026
…nter 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 sonic-net#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 sonic-net#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 sonic-net#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 sonic-net#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 <amit.2.pawar@nokia.com>

* snappi: issue-22363 removed multidut-port-info import from pfc tx_drop_counter testcase

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>

---------

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
Signed-off-by: Mihut Aronovici <aronovic@cisco.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
…nter 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 <amit.2.pawar@nokia.com>

* snappi: issue-22363 removed multidut-port-info import from pfc tx_drop_counter testcase

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>

---------

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
Signed-off-by: Abhishek <abhishek@nexthop.ai>
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
…nter 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 <amit.2.pawar@nokia.com>

* snappi: issue-22363 removed multidut-port-info import from pfc tx_drop_counter testcase

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>

---------

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants