-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[minigraph] Consume golden_config_db.json while loading minigraph (#2140
) What I did This PR is for supporting consume golden_config_db.json while loading minigraph. User can put the golden_config_db.json with minigraph file to override configDB after reload minigraph. The golden_config_db.json looks just like a config_db.json and it will be placed on /etc/sonic/golden_config_db.json. How I did it Add code config override-config-table command to let it consume golden_config_db.json How to verify it Add UT tests and run.
- Loading branch information
Showing
7 changed files
with
729 additions
and
2 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
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,113 @@ | ||
{ | ||
"running_config": { | ||
"ACL_TABLE": { | ||
"DATAACL": { | ||
"policy_desc": "DATAACL", | ||
"ports": [ | ||
"Ethernet4" | ||
], | ||
"stage": "ingress", | ||
"type": "L3" | ||
}, | ||
"NTP_ACL": { | ||
"policy_desc": "NTP_ACL", | ||
"services": [ | ||
"NTP" | ||
], | ||
"stage": "ingress", | ||
"type": "CTRLPLANE" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
}, | ||
"database": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
}, | ||
"golden_config": { | ||
|
||
}, | ||
"expected_config": { | ||
"ACL_TABLE": { | ||
"DATAACL": { | ||
"policy_desc": "DATAACL", | ||
"ports": [ | ||
"Ethernet4" | ||
], | ||
"stage": "ingress", | ||
"type": "L3" | ||
}, | ||
"NTP_ACL": { | ||
"policy_desc": "NTP_ACL", | ||
"services": [ | ||
"NTP" | ||
], | ||
"stage": "ingress", | ||
"type": "CTRLPLANE" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
}, | ||
"database": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
} | ||
} |
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,122 @@ | ||
{ | ||
"running_config": { | ||
"ACL_TABLE": { | ||
"DATAACL": { | ||
"policy_desc": "DATAACL", | ||
"ports": [ | ||
"Ethernet4" | ||
], | ||
"stage": "ingress", | ||
"type": "L3" | ||
}, | ||
"NTP_ACL": { | ||
"policy_desc": "NTP_ACL", | ||
"services": [ | ||
"NTP" | ||
], | ||
"stage": "ingress", | ||
"type": "CTRLPLANE" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
}, | ||
"database": { | ||
"rate_limit_interval": "600", | ||
"state": "enabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
}, | ||
"golden_config": { | ||
"ACL_TABLE": { | ||
"EVERFLOWV6": { | ||
"policy_desc": "EVERFLOWV6", | ||
"ports": [ | ||
"Ethernet12" | ||
], | ||
"stage": "ingress", | ||
"type": "MIRRORV6" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"state": "disabled" | ||
}, | ||
"database": { | ||
"state": "disabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet12": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/12", | ||
"description": "Servers2:eth0", | ||
"index": "3", | ||
"lanes": "37,38,39,40", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
}, | ||
"expected_config": { | ||
"ACL_TABLE": { | ||
"EVERFLOWV6": { | ||
"policy_desc": "EVERFLOWV6", | ||
"ports": [ | ||
"Ethernet12" | ||
], | ||
"stage": "ingress", | ||
"type": "MIRRORV6" | ||
} | ||
}, | ||
"AUTO_TECHSUPPORT_FEATURE": { | ||
"bgp": { | ||
"state": "disabled" | ||
}, | ||
"database": { | ||
"state": "disabled" | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet12": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/12", | ||
"description": "Servers2:eth0", | ||
"index": "3", | ||
"lanes": "37,38,39,40", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000", | ||
"tpid": "0x8100" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.