You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why I did it
This PR is to backport PR #11117 into 202205 branch.
This PR is to define Yang model for SYSTEM_DEFAULTS table.
The table was introduced in PR sonic-net/SONiC#982
The table will be like
"SYSTEM_DEFAULTS": {
"tunnel_qos_remap": {
"status": "enabled"
}
}
Work item tracking
Microsoft ADO (https://msazure.visualstudio.com/One/_workitems/edit/23037078)
How I did it
Add a new yang file sonic-system-defaults. Yang.
How to verify it
Verified by UT
*[Generating Application Config by Jinja2 Template](#generating-application-config-by-jinja2-template)
63
64
*[Incremental Configuration by Subscribing to ConfigDB](#incremental-configuration-by-subscribing-to-configdb)
@@ -1801,6 +1802,31 @@ The RADIUS and RADIUS_SERVER tables define RADIUS config paramerters. RADIUS tab
1801
1802
1802
1803
```
1803
1804
1805
+
### SYSTEM_DEFAULTS table
1806
+
To have a better management of the features in SONiC, a new table `SYSTEM_DEFAULTS` is introduced.
1807
+
1808
+
```
1809
+
"SYSTEM_DEFAULTS": {
1810
+
"tunnel_qos_remap": {
1811
+
"status": "enabled"
1812
+
}
1813
+
"default_bgp_status": {
1814
+
"status": "down"
1815
+
}
1816
+
"synchronous_mode": {
1817
+
"status": "enable"
1818
+
}
1819
+
"dhcp_server": {
1820
+
"status": "enable"
1821
+
}
1822
+
}
1823
+
```
1824
+
The default value of flags in `SYSTEM_DEFAULTS` table can be set in `init_cfg.json` and loaded into db at system startup. These flags are usually set at image being build, and are unlikely to change at runtime.
1825
+
1826
+
If the values in `config_db.json` is changed by user, it will not be rewritten back by `init_cfg.json` as `config_db.json` is loaded after `init_cfg.json` in [docker_image_ctl.j2](https://github.com/Azure/sonic-buildimage/blob/master/files/build_templates/docker_image_ctl.j2)
1827
+
1828
+
For the flags that can be changed by reconfiguration, we can update entries in `minigraph.xml`, and parse the new values in to config_db with minigraph parser at reloading minigraph. If there are duplicated entries in `init_cfg.json` and `minigraph.xml`, the values in `minigraph.xml` will overwritten the values defined in `init_cfg.json`.
0 commit comments