Skip to content

Commit

Permalink
add support for save-on-set to gnmi
Browse files Browse the repository at this point in the history
  • Loading branch information
rlucus committed Mar 27, 2024
1 parent 3939241 commit 686c554
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dockers/docker-sonic-gnmi/gnmi-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,14 @@ else
fi
fi

# gNMI save-on-set behavior is disabled by default.
# Save-on-set can be turned on by setting the "TELEMETRY|gnmi|save_on_set"
# to "true".
readonly SAVE_ON_SET=$(echo ${GNMI} | jq -r '.save_on_set // empty')
if [ ! -z "${SAVE_ON_SET}" ]; then
TELEMETRY_ARGS+=" --with-save-on-set=${SAVE_ON_SET}"
else
TELEMETRY_ARGS+=" --with-save-on-set=false"
fi

exec /usr/sbin/telemetry ${TELEMETRY_ARGS}

0 comments on commit 686c554

Please sign in to comment.