From 06c6ed512e57d4aa025845c6d373f5e24f2855ad Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 7 Mar 2017 13:56:54 -0800 Subject: Fix traffic and pause actions. Turn off throttling simulation. JIRA: VES-1 Change-Id: I8e0e7bf8a0b27854bf9bf8bcd1aa5329918e2d8b Signed-off-by: bryan --- tests/blueprints/tosca-vnfd-hello-ves/start.sh | 2 +- tests/vHello_VES.sh | 27 +++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/blueprints/tosca-vnfd-hello-ves/start.sh b/tests/blueprints/tosca-vnfd-hello-ves/start.sh index 03162ec..3222f72 100755 --- a/tests/blueprints/tosca-vnfd-hello-ves/start.sh +++ b/tests/blueprints/tosca-vnfd-hello-ves/start.sh @@ -172,7 +172,7 @@ setup_agent () { echo "$0: Start evel_demo agent" id=$(cut -d ',' -f 3 /mnt/openstack/latest/meta_data.json | cut -d '"' -f 4) - nohup ../output/x86_64/evel_demo --id $id --fqdn $collector_ip --port 30000 --username $username --password $password > /dev/null 2>&1 & + nohup ../output/x86_64/evel_demo --id $id --fqdn $collector_ip --port 30000 --username $username --password $password -x > /dev/null 2>&1 & echo "$0: Start collectd agent running in the VM" setup_collectd true diff --git a/tests/vHello_VES.sh b/tests/vHello_VES.sh index 116ba14..e9e5eca 100644 --- a/tests/vHello_VES.sh +++ b/tests/vHello_VES.sh @@ -52,12 +52,12 @@ # $ bash vHello_VES.sh monitor # monitor: attach to the collector VM and run the VES Monitor # : IP address of VDU4 (monitor VM) -# $ bash vHello_VES.sh traffic +# $ bash vHello_VES.sh traffic # traffic: generate some traffic -# $ bash vHello_VES.sh pause VDU1|VDU2 +# : address of server +# $ bash vHello_VES.sh pause # pause: pause the VNF (web server) for a minute to generate a state change -# VDU1: Pause VDU1 -# VDU2: Pause VDU2 +# : address of server # $ bash vHello_VES.sh stop # stop: stop test and uninstall blueprint # $ bash vHello_VES.sh clean @@ -422,24 +422,23 @@ EOF traffic () { echo "$0: $(date) Generate some traffic, somewhat randomly" - get_vdu_ip VDU3 ns="0 00 000" while true do for n in $ns; do sleep .$n$[ ( $RANDOM % 10 ) + 1 ]s - curl -s http://$ip > /dev/null + curl -s http://$1 > /dev/null done done } pause () { echo "$0: $(date) Pause the VNF (web server) in $1 for 30 seconds to generate a state change fault report (Stopped)" - get_vdu_ip $1 - ssh -i /tmp/vHello -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$ip "sudo docker pause vHello" + $1 + sudo ssh -t -t -i /opt/tacker/vHello -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$1 "sudo docker pause vHello" sleep 20 echo "$0: $(date) Unpausing the VNF to generate a state change fault report (Started)" - ssh -i /tmp/vHello -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$ip "sudo docker unpause vHello" + sudo ssh -t -t -i /opt/tacker/vHello -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$1 "sudo docker unpause vHello" } forward_to_container () { @@ -487,7 +486,7 @@ case "$1" in pass ;; traffic) - traffic + traffic $2 pass ;; pause) @@ -551,12 +550,12 @@ case "$1" in $ bash vHello_VES.sh monitor monitor: attach to the collector VM and run the VES Monitor : IP address of VDU4 (monitor VM) - $ bash vHello_VES.sh traffic + $ bash vHello_VES.sh traffic traffic: generate some traffic - $ bash vHello_VES.sh pause VDU1|VDU2 + : address of server + $ bash vHello_VES.sh pause pause: pause the VNF (web server) for a minute to generate a state change - VDU1: Pause VDU1 - VDU2: Pause VDU2 + : address of server $ bash vHello_VES.sh stop stop: stop test and uninstall blueprint $ bash vHello_VES.sh clean -- cgit 1.2.3-korg