Update Honeycomb to Rel1810 for vFW
[demo.git] / vnfs / vFW / scripts / enable_disable_streams.sh
1 #!/bin/bash
2
3 if [ -z $1 ]; then
4   echo "Missing number of streams to enable. Exit (1)"
5   exit
6 fi
7
8 if [ "$1" -gt "10" ] || [ "$1" -lt "1" ]; then
9   echo "The number of streams to enable must be between 1 and 10. Exit(1)"
10   exit
11 fi
12
13 STREAMS=$1
14
15 # Disable all the streams
16 vppctl packet-generator disable-stream
17
18 # Enable streams based on client input
19 for((i=1; i <= $STREAMS; i++)); do
20   vppctl packet-generator enable-stream fw_udp$i
21 done