X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FvFW%2Fscripts%2Fupdate_running_streams.sh;fp=vnfs%2FvFW%2Fscripts%2Fupdate_running_streams.sh;h=6ba0b9d53db402f9f38a3ff407acad8a4874a5b1;hb=3bf047e64a1121208719e7603bf91c69d532ecf8;hp=0000000000000000000000000000000000000000;hpb=c4ee5ddf54658c83a59b5db46b8af8f957ffa390;p=demo.git diff --git a/vnfs/vFW/scripts/update_running_streams.sh b/vnfs/vFW/scripts/update_running_streams.sh new file mode 100644 index 00000000..6ba0b9d5 --- /dev/null +++ b/vnfs/vFW/scripts/update_running_streams.sh @@ -0,0 +1,18 @@ +#/bin/bash + +if [ ! "$#" -eq 1 ] +then + echo "Usage: ./update_running_streams.sh [number of active streams]" + exit +fi + +STREAMS=$1 +BODY="" + +for((i=1; $i<= $STREAMS; i++)); do + BODY+="{\"id\":\"fw_udp$i\", \"is-enabled\":\"true\"}," +done + +BODY='{"pg-streams":{"pg-stream": ['${BODY%?}']}}' + +curl -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 9005870c-900b-2e2e-0902-ef2009bb0ff7" -d "$BODY" "http://localhost:8183/restconf/config/sample-plugin:sample-plugin/pg-streams" \ No newline at end of file