Skip to content

Commit

Permalink
add back T0/T1 merge (sonic-net#15598)
Browse files Browse the repository at this point in the history
Description of PR
Summary:
T0/T1 support in snappi multidut is being overwritten by recent commit. Adding it back in.

Approach
What is the motivation for this PR?
Add back T0/T1 support for multidut snappi.

How did you do it?
Use T0/T1 specific function to get snappi ports instead of using variables.py

co-authorized by: [email protected]
  • Loading branch information
sdszhang authored Nov 18, 2024
1 parent 4146d8a commit 3f7b7de
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/snappi_tests/files/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tests.common.helpers.parallel import parallel_run
from tests.common.utilities import wait_until
from tests.common.snappi_tests.snappi_fixtures import get_snappi_ports_for_rdma, \
snappi_dut_base_config
snappi_dut_base_config, is_snappi_multidut

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -101,12 +101,15 @@ def setup_ports_and_dut(
"testbed {}, subtype {} in variables.py".format(
MULTIDUT_TESTBED, testbed_subtype))
logger.info('Running test for testbed subtype: {}'.format(testbed_subtype))
snappi_ports = get_snappi_ports_for_rdma(
get_snappi_ports,
rdma_ports,
tx_port_count,
rx_port_count,
MULTIDUT_TESTBED)
if is_snappi_multidut(duthosts):
snappi_ports = get_snappi_ports_for_rdma(
get_snappi_ports,
rdma_ports,
tx_port_count,
rx_port_count,
MULTIDUT_TESTBED)
else:
snappi_ports = get_snappi_ports
testbed_config, port_config_list, snappi_ports = snappi_dut_base_config(
duthosts, snappi_ports, snappi_api, setup=True)

Expand Down

0 comments on commit 3f7b7de

Please sign in to comment.