From 07347a85ead77c6a2f2bc9b0ae806f4d7fae152e Mon Sep 17 00:00:00 2001 From: Sonic Build Admin Date: Fri, 18 Apr 2025 19:37:22 +0000 Subject: [PATCH] [PR#17130] - fib - Changes for VOQ single-dut multi-asic ### Description of PR Summary: Fixes # (issue) - Split the original PR https://github.com/sonic-net/sonic-mgmt/pull/17130 into individual PRs for each test. - This is an enhancement to support VOQ Single DUT Multi-ASIC setup for T2 topo. ### Type of change - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request - [ ] 202012 - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [x] 202411 ### Approach #### What is the motivation for this PR? - New testbed modification of VOQ Single DUT and multi-asic. #### How did you do it? - If switch type is VOQ, decide based on the number of Duts and also based on if the DUT is modular chassis or not. #### How did you verify/test it? #### Any platform specific information? #### Supported testbed topology if it's a new test case? - T2 VOQ Single Dut Multi ASIC ### Documentation --- tests/common/fixtures/fib_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/common/fixtures/fib_utils.py b/tests/common/fixtures/fib_utils.py index f802c73f4d..20e04a59db 100644 --- a/tests/common/fixtures/fib_utils.py +++ b/tests/common/fixtures/fib_utils.py @@ -49,7 +49,10 @@ def get_t2_fib_info(duthosts, duts_cfg_facts, duts_mg_facts): dut_port_channels.setdefault(duthost.hostname, {}).update(asic_cfg_facts[1].get('PORTCHANNEL_MEMBER', {})) sys_neigh = {} if switch_type == "voq": - voq_db = VoqDbCli(duthosts.supervisor_nodes[0]) + if len(duthosts) == 1: + voq_db = VoqDbCli(duthosts.frontend_nodes[0]) + else: + voq_db = VoqDbCli(duthosts.supervisor_nodes[0]) for entry in voq_db.dump_neighbor_table(): neigh_key = entry.split('|') neigh_ip = neigh_key[-1] @@ -356,7 +359,7 @@ def fib_info_files_per_function(duthosts, ptfhost, duts_running_config_facts, du @pytest.fixture(scope="module") def single_fib_for_duts(tbinfo, duthosts): # For a T2 topology, we are generating a single fib file across all asics, but have multiple frontend nodes (DUTS). - if tbinfo['topo']['type'] == "t2": + if tbinfo['topo']['type'] == "t2" and len(duthosts) > 1: if duthosts[0].facts['switch_type'] == "voq": return "single-fib-single-hop" else: