-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config] Generate sysinfo as needed when override config (#2836)
ADO: 17921518 What I did The generated Golden Config will not have knowledge of configs that are produced in run time, such as mac and platform. Generate that info in Override Config if missing. How I did it Reuse the mac and platform in existing device runnning config and generate that if missing. How to verify it Unit test
- Loading branch information
Showing
3 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
55 changes: 55 additions & 0 deletions
55
tests/config_override_input/multi_asic_dm_gen_sysinfo.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"localhost": { | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"default_bgp_status": "down", | ||
"default_pfcwd_status": "enable", | ||
"deployment_id": "1", | ||
"docker_routing_config_mode": "separated", | ||
"hostname": "sonic-switch", | ||
"hwsku": "Mellanox-SN3800-D112C8", | ||
"peer_switch": "sonic-switch", | ||
"type": "ToRRouter", | ||
"suppress-fib-pending": "enabled" | ||
} | ||
} | ||
}, | ||
"asic0": { | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"asic_id": "01.00.0", | ||
"asic_name": "asic0", | ||
"bgp_asn": "65100", | ||
"cloudtype": "None", | ||
"default_bgp_status": "down", | ||
"default_pfcwd_status": "enable", | ||
"deployment_id": "None", | ||
"docker_routing_config_mode": "separated", | ||
"hostname": "sonic", | ||
"hwsku": "multi_asic", | ||
"region": "None", | ||
"sub_role": "FrontEnd", | ||
"type": "LeafRouter" | ||
} | ||
} | ||
}, | ||
"asic1": { | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"asic_id": "08:00.0", | ||
"asic_name": "asic1", | ||
"bgp_asn": "65100", | ||
"cloudtype": "None", | ||
"default_bgp_status": "down", | ||
"default_pfcwd_status": "enable", | ||
"deployment_id": "None", | ||
"docker_routing_config_mode": "separated", | ||
"hostname": "sonic", | ||
"hwsku": "multi_asic", | ||
"region": "None", | ||
"sub_role": "BackEnd", | ||
"type": "LeafRouter" | ||
} | ||
} | ||
} | ||
} |
This file contains 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