Skip to content

Commit

Permalink
add support for save-on-set to gnmi (sonic-net#18481)
Browse files Browse the repository at this point in the history
* add support for save-on-set to gnmi

sonic-net/SONiC#1297

* leave default if not set

* move to telemetry.sh
  • Loading branch information
rlucus authored May 29, 2024
1 parent 6b26c2c commit 27473fa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dockers/docker-sonic-telemetry/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ else
TELEMETRY_ARGS+=" -v=2"
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"
fi

# Server will handle threshold connections consecutively
THRESHOLD_CONNECTIONS=$(echo $GNMI | jq -r '.threshold')
if [[ $THRESHOLD_CONNECTIONS =~ ^[0-9]+$ ]]; then
Expand Down

0 comments on commit 27473fa

Please sign in to comment.