Update lit mode setting logic for smartswitch testbeds#22465
Merged
prabhataravind merged 3 commits intosonic-net:masterfrom Feb 20, 2026
Merged
Update lit mode setting logic for smartswitch testbeds#22465prabhataravind merged 3 commits intosonic-net:masterfrom
prabhataravind merged 3 commits intosonic-net:masterfrom
Conversation
* Instead of using a default true value, read it from the testbed file and set it accordingly. * If no such parameter exists in testbed file, derive lit mode status from topology Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the is_light_mode parameter to is_lit_mode and improves the logic for determining lit mode status in smartswitch testbeds. Instead of using a hardcoded default true value, the new logic first attempts to read the value from the testbed configuration file, and if not present, derives it based on the topology name (automatically set to true for smartswitch topologies: t1-smartswitch-ha, t1-28-lag, smartswitch-t1, t1-48-lag).
Changes:
- Renamed parameter from
is_light_modetois_lit_modefor better terminology alignment - Updated lit mode determination logic to read from testbed_facts with topology-based fallback
- Ensured consistent naming across Ansible playbooks and Python modules
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ansible/library/generate_golden_config_db.py | Renamed parameter definition, instance variable, and all usages from is_light_mode to is_lit_mode |
| ansible/config_sonic_basedon_testbed.yml | Updated set_fact logic to read from testbed_facts with fallback, and renamed all references from is_light_mode to is_lit_mode |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
prsunny
approved these changes
Feb 19, 2026
Contributor
|
@theasianpianist , can you review? |
theasianpianist
approved these changes
Feb 19, 2026
Collaborator
|
@prabhataravind PR conflicts with 202511 branch |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
To provide the flexibility to use a testbed as lit or dark mode as defined in testbed.yaml file
How did you do it?
By setting a is_lit_mode in testbed.yaml, so that it can be passed to generate_golden_config_db script.
How did you verify/test it?
By doing add-topo and deploy-mg on lit and dark mode smartswitch testbeds
Any platform specific information?
Smartswitch specific change
Supported testbed topology if it's a new test case?
Documentation