Fix traffic and pause actions. Turn off throttling simulation. 97/29997/1
authorbryan <bryan.sullivan@att.com>
Tue, 7 Mar 2017 21:56:54 +0000 (13:56 -0800)
committerbryan <bryan.sullivan@att.com>
Tue, 7 Mar 2017 21:56:54 +0000 (13:56 -0800)
JIRA: VES-1

Change-Id: I8e0e7bf8a0b27854bf9bf8bcd1aa5329918e2d8b
Signed-off-by: bryan <bryan.sullivan@att.com>
tests/blueprints/tosca-vnfd-hello-ves/start.sh
tests/vHello_VES.sh

index 03162ec..3222f72 100755 (executable)
@@ -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
index 116ba14..e9e5eca 100644 (file)
 #   $ bash vHello_VES.sh monitor <mon_ip>
 #     monitor: attach to the collector VM and run the VES Monitor
 #     <mon_ip>: IP address of VDU4 (monitor VM)
-#   $ bash vHello_VES.sh traffic
+#   $ bash vHello_VES.sh traffic <ip>
 #     traffic: generate some traffic
-#   $ bash vHello_VES.sh pause VDU1|VDU2
+#     <ip>: address of server
+#   $ bash vHello_VES.sh pause <ip>
 #     pause: pause the VNF (web server) for a minute to generate a state change
-#     VDU1: Pause VDU1
-#     VDU2: Pause VDU2
+#     <ip>: address of server
 #   $ bash vHello_VES.sh stop
 #     stop: stop test and uninstall blueprint
 #   $ bash vHello_VES.sh clean  <hpvuser> <hpvpw>
@@ -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 <mon_ip>
      monitor: attach to the collector VM and run the VES Monitor
      <mon_ip>: IP address of VDU4 (monitor VM)
-   $ bash vHello_VES.sh traffic
+   $ bash vHello_VES.sh traffic <ip>
      traffic: generate some traffic
-   $ bash vHello_VES.sh pause VDU1|VDU2
+     <ip>: address of server
+   $ bash vHello_VES.sh pause <ip>
      pause: pause the VNF (web server) for a minute to generate a state change
-     VDU1: Pause VDU1
-     VDU2: Pause VDU2
+     <ip>: address of server
    $ bash vHello_VES.sh stop
      stop: stop test and uninstall blueprint
    $ bash vHello_VES.sh clean <user>