Skip to content

Comments

Update lit mode setting logic for smartswitch testbeds#22465

Merged
prabhataravind merged 3 commits intosonic-net:masterfrom
prabhataravind:paravind/ss_lit_mode
Feb 20, 2026
Merged

Update lit mode setting logic for smartswitch testbeds#22465
prabhataravind merged 3 commits intosonic-net:masterfrom
prabhataravind:paravind/ss_lit_mode

Conversation

@prabhataravind
Copy link
Contributor

@prabhataravind prabhataravind commented Feb 19, 2026

  • 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.

Description of PR

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?

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

 * 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>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prabhataravind
Copy link
Contributor Author

@JibinBao please review. This is a modification to your changes in PR #20415.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_mode to is_lit_mode for 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

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Contributor

prsunny commented Feb 19, 2026

@theasianpianist , can you review?

Copy link
Contributor

@vvolam vvolam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prabhataravind prabhataravind merged commit 47aed96 into sonic-net:master Feb 20, 2026
22 checks passed
@prabhataravind prabhataravind deleted the paravind/ss_lit_mode branch February 20, 2026 02:57
@prabhataravind prabhataravind added Request for 202511 branch Request to backport a change to 202511 branch Approved for 202511 branch labels Feb 20, 2026
@mssonicbld
Copy link
Collaborator

@prabhataravind PR conflicts with 202511 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants