Update INFO.yaml with new PTL
[demo.git] / vnfs / vFW / scripts / update_running_streams.sh
1 #/bin/bash
2
3 if [ ! "$#" -eq 1 ]
4 then
5   echo "Usage: ./update_running_streams.sh [number of active streams]"
6   exit
7 fi
8
9 STREAMS=$1
10 BODY=""
11
12 for((i=1; $i<= $STREAMS; i++)); do
13   BODY+="{\"id\":\"fw_udp$i\", \"is-enabled\":\"true\"},"
14 done
15
16 BODY='{"pg-streams":{"pg-stream": ['${BODY%?}']}}'
17
18 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"