Skip to content

[202503] Support golden_config for LT2 #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ansible/library/generate_golden_config_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ def generate_smartswitch_golden_config_db(self):
gold_config_db.update(smartswitch_config_obj)
return json.dumps(gold_config_db, indent=4)

def generate_ft2_golden_config_db(self):
def generate_lt2_ft2_golden_config_db(self):
"""
Generate golden_config for FT2 to enable FEC.
**Only PORT table is updated**.
"""
SUPPORTED_TOPO = ["ft2-64"]
SUPPORTED_TOPO = ["ft2-64", "lt2-p32o64", "lt2-o128-d110u14"]
if self.topo_name not in SUPPORTED_TOPO:
return "{}"
SUPPORTED_PORT_SPEED = ["100000", "200000", "400000", "800000"]
SUPPORTED_PORT_SPEED = ["200000", "400000", "800000"]
ori_config = json.loads(self.get_config_from_minigraph())
port_config = ori_config.get("PORT", {})
for name, config in port_config.items():
Expand All @@ -272,8 +272,8 @@ def generate(self):
config = self.generate_smartswitch_golden_config_db()
self.module.run_command("sudo rm -f {}".format(TEMP_SMARTSWITCH_CONFIG_PATH))
module_msg = module_msg + " for smartswitch"
elif self.topo_name in ["ft2-64"]:
config = self.generate_ft2_golden_config_db()
elif "ft2" in self.topo_name or "lt2" in self.topo_name:
config = self.generate_lt2_ft2_golden_config_db()
elif "t2" in self.topo_name and self.macsec_profile:
config = self.generate_t2_golden_config_db()
self.module.run_command("sudo rm -f {}".format(MACSEC_PROFILE_PATH))
Expand Down