Skip to content

Commit 686c554

Browse files
authored
add support for save-on-set to gnmi
sonic-net/SONiC#1297
1 parent 3939241 commit 686c554

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dockers/docker-sonic-gnmi/gnmi-native.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,14 @@ else
102102
fi
103103
fi
104104

105+
# gNMI save-on-set behavior is disabled by default.
106+
# Save-on-set can be turned on by setting the "TELEMETRY|gnmi|save_on_set"
107+
# to "true".
108+
readonly SAVE_ON_SET=$(echo ${GNMI} | jq -r '.save_on_set // empty')
109+
if [ ! -z "${SAVE_ON_SET}" ]; then
110+
TELEMETRY_ARGS+=" --with-save-on-set=${SAVE_ON_SET}"
111+
else
112+
TELEMETRY_ARGS+=" --with-save-on-set=false"
113+
fi
114+
105115
exec /usr/sbin/telemetry ${TELEMETRY_ARGS}

0 commit comments

Comments
 (0)