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
Copy file name to clipboardExpand all lines: doc/mgmt/gnmi/save_on_set.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,6 @@ Add the option for enabling the SONiC gNMI implementation to save its in-memory
45
45
-[gNMI](https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md) - Google Network Management Interface
46
46
- UMF - Unified Management Framework
47
47
48
-
49
48
### Overview
50
49
51
50
Having configuration be persistant across switch reboot is a useful feature that is not currently implemented by UMF.
@@ -60,6 +59,7 @@ For this reason and for more versatility the save-on-set behavior should be able
60
59
### Requirements
61
60
62
61
This feature should be off by default to avoid interfering with legacy switches.
62
+
63
63
### Architecture Design
64
64
65
65
This feature does not change the SONiC Architecture
@@ -106,9 +106,12 @@ This feature does not change the SONiC Architecture
106
106
#### Required Changes
107
107
108
108
##### Telemetry Executable
109
+
109
110
A new command-line parameter will be added to control the behavior of the save-on-set functionality. By default, i.e. when the option is not specified, the gNMI server will behave as it did before this change - the configuration will not be saved to a file without explicit action from the administrator for example by execution of a command via ssh connection.
110
111
111
-
The new parameter will be: --with-save-on-set and when present it will configure a function pointer variable gnmi.SaveOnSet to point to a function that actually performs the save operation.
112
+
The telemetry.sh startup script will be modified to read `TELEMETRY|gnmi|save_on_set` and pass the value along during startup. Any changes to this value will only take effect after restarting telemetry.
113
+
114
+
The new parameter will be: --with-save-on-set and when present it will configure a function pointer variable gnmi.SaveOnSet to point to a function that initiates the save operation.
112
115
113
116
```go
114
117
var (
@@ -123,7 +126,8 @@ if *withSaveOnSet {
123
126
```
124
127
125
128
##### Call to Save ConfigDB
126
-
A function to initial the backup located in the sonic-mgmt-framework.
129
+
130
+
A function to initialize the backup located in the sonic-mgmt-framework.
127
131
128
132
```go
129
133
// SaveConfig initiates the operation of saving the current content of
@@ -212,7 +216,8 @@ No effect on warm/fast boot
212
216
#### Unit Test cases
213
217
214
218
- No behavior change if the feature is not enabled.
215
-
- A gNMI.Set() call should generate a signal to save ConfigDB.
219
+
- A gNMI.Set() call should generate a message to save ConfigDB on the DBUS when enabled.
220
+
216
221
#### System Test cases
217
222
218
223
- A gNMI.Set() call should result in an update to the ConfigDB backup file.
0 commit comments