Merge "Port status update"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Fri, 5 Aug 2016 10:37:44 +0000 (10:37 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 5 Aug 2016 10:37:44 +0000 (10:37 +0000)
INFO
docs/userguide/doctor_scenario_in_functest.rst
tests/run.sh

diff --git a/INFO b/INFO
index 4bce1d6..08c017f 100644 (file)
--- a/INFO
+++ b/INFO
@@ -12,11 +12,12 @@ Repository: doctor
 
 Committers:
 Ashiq Khan (NTT DOCOMO, khan@nttdocomo.com)
+Bertrand Souville (NTT DOCOMO, souville@docomolab-euro.com)
 Carlos Goncalves (NEC, Carlos.Goncalves@neclab.eu)
 Dong Wenjuan (ZTE, dong.wenjuan@zte.com.cn)
 Gerald Kunzmann (NTT DOCOMO, kunzmann@docomolab-euro.com)
 Mario Cho (hephaex@gmail.com)
-Peter Lee (ClearPath Networks, plee@clearpathnet.com)
+Peter Lee (Corenova Technologies, peter@corenova.com)
 Ryota Mibu (NEC, r-mibu@cq.jp.nec.com)
 Serge Manning (Sprint, Serge.Manning@sprint.com)
 Tomi Juvonen (Nokia, tomi.juvonen@nokia.com)
@@ -28,3 +29,4 @@ Link(s) to approval of committer update:
 http://lists.opnfv.org/pipermail/opnfv-tsc/2015-June/000905.html
 http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2015-June/003165.html
 http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2016-June/011245.html
+http://lists.opnfv.org/pipermail/opnfv-tech-discuss/2016-July/011771.html
index 3a43570..b36937e 100644 (file)
@@ -94,18 +94,20 @@ Test case
 
 Functest will call the "run.sh" script in Doctor to run the test job.
 
+Currently, only 'Apex' and 'local' installer are supported.
+
 The "run.sh" script will execute the following steps.
 
-Firstly, verify connectivity to target compute host according to different
-installer and prepare image for booting VM. Currently, only 'Apex' and
-'local' installer are supported.
+Firstly, prepare image for booting VM, then create a test project and test
+user (both default to doctor) for the Doctor tests.
 
-Secondly, the Doctor components are started, and, based on the above
-preparation, a test user (default as demo) will be created for the Doctor
-tests.
+Secondly, boot a VM under the doctor project and check the VM status to verify
+that the VM is launched completely. Then get the compute host info where the VM
+is launched to verify connectivity to the target compute host. Get the consumer
+ip according to the route to compute ip and create an alarm event in Ceilometer
+using the consumer ip.
 
-Thirdly, the VM is booted, and an alarm event is created in Ceilometer.
-After sleeping for 1 minute in order to wait for the VM launch to complete,
+Thirdly, the Doctor components are started, and, based on the above preparation,
 a failure is injected to the system, i.e. the network of compute host is
 disabled for 3 minutes. To ensure the host is down, the status of the host
 will be checked.
index ae030e2..2f141f5 100755 (executable)
@@ -96,17 +96,12 @@ prepare_compute_ssh() {
 }
 
 get_consumer_ip() {
-    #get network of the compute_ip address
-    network_pre=${COMPUTE_IP%.*}
-    network=${network_pre}.0/24
+    CONSUMER_IP=$(ip route get $COMPUTE_IP | awk '/ src /{print $NF}')
 
-    #if there is a dedicated route, use it
-    dev=$(ip route |grep $network | awk '{print $3}' |head -n 1)
-
-    #if there is no route, use default route
-    [[ -z $dev ]] && dev=$(ip route |grep ^default | awk '{print $3}' |head -n 1)
-
-    CONSUMER_IP=$(ip addr show $dev |grep inet | grep $network_pre | awk '{print $2}' | cut -d'/' -f1)
+    if [[ -z "$CONSUMER_IP" ]]; then
+        echo "ERROR: Could not get CONSUMER_IP."
+        exit 1
+    fi
 }
 
 download_image() {
@@ -261,7 +256,7 @@ cleanup() {
 
     echo "waiting disabled compute host back to be enabled..."
     python ./nova_force_down.py "$COMPUTE_HOST" --unset
-    sleep 180
+    sleep 240
     check_host_status "UP"
     ssh $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP" \
         "[ -e disable_network.log ] && cat disable_network.log"
@@ -314,7 +309,7 @@ start_consumer
 sleep 60
 echo "injecting host failure..."
 inject_failure
-sleep 10
+sleep 60
 
 check_host_status "DOWN"
 calculate_notification_time