Skip to content

Commit

Permalink
[deploy-mg][mx] Fix generate golden config db failed in mx with OS ve…
Browse files Browse the repository at this point in the history
…rsion doesn't support dhcp_server (sonic-net#16086)

What is the motivation for this PR?
Golden config db var has been changed from json like string to dict by this RP sonic-net#15922
But for mx with OS version doesn't support dhcp_server, it would still generate empty json like string, which would cause failure

How did you do it?
Change empty golden config generated for mx doesn't support dhcp_server

How did you verify/test it?
Deploy-mg
  • Loading branch information
yaqiangz authored Dec 17, 2024
1 parent 8806b58 commit 5c2245a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/library/generate_golden_config_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def generate_mx_golden_config_db(self):
# Generate FEATURE table from init_cfg.ini
ori_config_db = json.loads(out)
if "FEATURE" not in ori_config_db or "dhcp_server" not in ori_config_db["FEATURE"]:
return "{}"
return {}

ori_config_db["FEATURE"]["dhcp_server"]["state"] = "enabled"
gold_config_db = {
Expand Down

0 comments on commit 5c2245a

Please sign in to comment.