Skip to content

Commit

Permalink
Use self assigned port in case gnmi does not define any.
Browse files Browse the repository at this point in the history
  • Loading branch information
tahmed-dev committed Jul 6, 2020
1 parent 8435927 commit 970c445
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dockers/docker-sonic-telemetry/telemetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ fi

# If no configuration entry exists for TELEMETRY, create one default port
if [ -z "$GNMI" ]; then
sonic-db-cli CONFIG_DB hset "TELEMETRY|gnmi" port 8080
PORT=8080
sonic-db-cli CONFIG_DB hset "TELEMETRY|gnmi" port $PORT
else
PORT=$(echo $GNMI | jq -r '.port')
fi

PORT=$(echo $GNMI | jq -r '.port')
TELEMETRY_ARGS+=" --port $PORT"

CLIENT_AUTH=$(echo $GNMI | jq -r '.client_auth')
Expand Down

0 comments on commit 970c445

Please sign in to comment.