aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/vFW
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/vFW')
-rw-r--r--vnfs/vFW/scripts/enable_disable_streams.sh21
-rwxr-xr-xvnfs/vFW/scripts/v_packetgen_install.sh6
-rwxr-xr-xvnfs/vFW/scripts/v_packetgen_install_arm64.sh5
3 files changed, 28 insertions, 4 deletions
diff --git a/vnfs/vFW/scripts/enable_disable_streams.sh b/vnfs/vFW/scripts/enable_disable_streams.sh
new file mode 100644
index 00000000..d2551552
--- /dev/null
+++ b/vnfs/vFW/scripts/enable_disable_streams.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ -z $1 ]; then
+ echo "Missing number of streams to enable. Exit (1)"
+ exit
+fi
+
+if [ "$1" -gt "10" ] || [ "$1" -lt "1" ]; then
+ echo "The number of streams to enable must be between 1 and 10. Exit(1)"
+ exit
+fi
+
+STREAMS=$1
+
+# Disable all the streams
+vppctl packet-generator disable-stream
+
+# Enable streams based on client input
+for((i=1; i <= $STREAMS; i++)); do
+ vppctl packet-generator enable-stream fw_udp$i
+done \ No newline at end of file
diff --git a/vnfs/vFW/scripts/v_packetgen_install.sh b/vnfs/vFW/scripts/v_packetgen_install.sh
index ba809898..a26d5dcc 100755
--- a/vnfs/vFW/scripts/v_packetgen_install.sh
+++ b/vnfs/vFW/scripts/v_packetgen_install.sh
@@ -61,7 +61,7 @@ cd /opt
unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip v_packetgen_init.sh > /opt/v_packetgen_init.sh
unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip vpacketgen.sh > /opt/vpacketgen.sh
unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip run_traffic_fw_demo.sh > /opt/run_traffic_fw_demo.sh
-unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip update_running_streams.sh > /opt/update_running_streams.sh
+unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip enable_disable_streams.sh > /opt/enable_disable_streams.sh
wget -O sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf&a=sample-distribution&c=hc&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION"
wget -O vfw_pg_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw_pg_streams&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION"
@@ -69,12 +69,12 @@ tar -zmxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz
tar -zmxvf vfw_pg_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz
mv vfw_pg_streams-$DEMO_ARTIFACTS_VERSION pg_streams
mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb
-sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/sample-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json
+sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/sample-distribution-$DEMO_ARTIFACTS_VERSION/config/restconf.json
rm *.tar.gz
chmod +x v_packetgen_init.sh
chmod +x vpacketgen.sh
chmod +x run_traffic_fw_demo.sh
-chmod +x update_running_streams.sh
+chmod +x enable_disable_streams.sh
# Install VPP
export UBUNTU="trusty"
diff --git a/vnfs/vFW/scripts/v_packetgen_install_arm64.sh b/vnfs/vFW/scripts/v_packetgen_install_arm64.sh
index 8dee6977..929e5365 100755
--- a/vnfs/vFW/scripts/v_packetgen_install_arm64.sh
+++ b/vnfs/vFW/scripts/v_packetgen_install_arm64.sh
@@ -62,6 +62,7 @@ cd /opt
unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip v_packetgen_init_arm64.sh > /opt/v_packetgen_init.sh
unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip vpacketgen.sh > /opt/vpacketgen.sh
unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip run_traffic_fw_demo.sh > /opt/run_traffic_fw_demo.sh
+unzip -p -j /opt/vfw-scripts-$INSTALL_SCRIPT_VERSION.zip enable_disable_streams.sh > /opt/enable_disable_streams.sh
wget -O sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf&a=sample-distribution&c=hc&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION"
wget -O vfw_pg_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw_pg_streams&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION"
@@ -69,10 +70,12 @@ tar -zmxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz
tar -zmxvf vfw_pg_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz
mv vfw_pg_streams-$DEMO_ARTIFACTS_VERSION pg_streams
mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb
-sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/sample-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json
+sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/sample-distribution-$DEMO_ARTIFACTS_VERSION/config/restconf.json
rm *.tar.gz
chmod +x v_packetgen_init.sh
chmod +x vpacketgen.sh
+chmod +x run_traffic_fw_demo.sh
+chmod +x enable_disable_streams.sh
# Install VPP
rm /etc/apt/sources.list.d/99fd.io.list