Small improvements with output messages 21/9021/1
authorjose.lausuch <jose.lausuch@ericsson.com>
Tue, 2 Feb 2016 10:25:19 +0000 (11:25 +0100)
committerMorgan Richomme <morgan.richomme@orange.com>
Tue, 2 Feb 2016 10:30:19 +0000 (10:30 +0000)
Change-Id: I4c274df30bc3123bef23d5423a1762a07dd93e68
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
(cherry picked from commit ac0d556e54a09b5a3470b20384ac58f7ed383202)

docker/run_tests.sh
testcases/config_functest.py

index 5dd1f87..0d49c3d 100755 (executable)
@@ -76,9 +76,9 @@ function odl_tests(){
 }
 function run_test(){
     test_name=$1
-    echo ""
+    echo -e "\n\n\n\n"
     echo "----------------------------------------------"
-    echo "  Running test cases: $i"
+    echo "  Running test case: $i"
     echo "----------------------------------------------"
     echo ""
     case $test_name in
@@ -226,7 +226,7 @@ if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" ]] &&\
 else
     arr_test=(vping tempest vims rally)
 fi
-echo "arr_test: "${arr_test[@]}
+info "Tests to be executed: "${arr_test[@]}
 
 BASEDIR=`dirname $0`
 source ${BASEDIR}/common.sh
@@ -243,12 +243,6 @@ if [ "${TEST}" != "" ]; then
     info "Tests to execute: ${TEST}."
 fi
 
-if [ $offline == false ]; then
-    info "MODE: online"
-else
-    info "MODE: offline"
-fi
-
 # Check that the functest environment has been installed
 if [ ! -f ${FUNCTEST_CONF_DIR}/env_active ]; then
     error "The Functest environment is not installed. \
index 265328d..21c569c 100755 (executable)
@@ -162,24 +162,16 @@ def action_check():
     dirs = [RALLY_DIR, RALLY_INSTALLATION_DIR, VPING_DIR, ODL_DIR]
     for dir in dirs:
         if not os.path.exists(dir):
-            logger.debug("The directory '%s' does NOT exist." % dir)
+            logger.debug("   %s NOT found" % dir)
             errors = True
             errors_all = True
         else:
             logger.debug("   %s found" % dir)
-    if not errors:
-        logger.debug("...OK")
-    else:
-        logger.debug("...FAIL")
-
 
     logger.debug("Checking Rally deployment...")
     if not check_rally():
         logger.debug("   Rally deployment NOT installed.")
         errors_all = True
-        logger.debug("...FAIL")
-    else:
-        logger.debug("...OK")
 
     logger.debug("Checking Image...")
     errors = False
@@ -191,11 +183,6 @@ def action_check():
         logger.debug("   Image file found in %s" % IMAGE_PATH)
 
 
-    if not errors:
-        logger.debug("...OK")
-    else:
-        logger.debug("...FAIL")
-
     #TODO: check OLD environment setup
     return not errors_all
 
@@ -292,21 +279,21 @@ def check_rally():
 
 def create_private_neutron_net(neutron):
     neutron.format = 'json'
-    logger.info('Creating neutron network %s...' % NEUTRON_PRIVATE_NET_NAME)
+    logger.info("Creating network '%s'..." % NEUTRON_PRIVATE_NET_NAME)
     network_id = functest_utils. \
         create_neutron_net(neutron, NEUTRON_PRIVATE_NET_NAME)
 
     if not network_id:
         return False
-    logger.debug("Network '%s' created successfully" % network_id)
+    logger.debug("Network '%s' created successfully." % network_id)
 
-    logger.info('Updating neutron network %s...' % NEUTRON_PRIVATE_NET_NAME)
+    logger.info("Updating network '%s' with shared=True..." % NEUTRON_PRIVATE_NET_NAME)
     if functest_utils.update_neutron_net(neutron, network_id, shared=True):
-        logger.debug("Network '%s' updated successfully" % network_id)
+        logger.debug("Network '%s' updated successfully." % network_id)
     else:
-        logger.info('Updating neutron network %s failed' % network_id)
+        logger.info("Updating neutron network '%s' failed" % network_id)
 
-    logger.debug('Creating Subnet....')
+    logger.info("Creating Subnet....")
     subnet_id = functest_utils. \
         create_neutron_subnet(neutron,
                               NEUTRON_PRIVATE_SUBNET_NAME,
@@ -314,16 +301,16 @@ def create_private_neutron_net(neutron):
                               network_id)
     if not subnet_id:
         return False
-    logger.debug("Subnet '%s' created successfully" % subnet_id)
-    logger.debug('Creating Router...')
+    logger.debug("Subnet '%s' created successfully." % subnet_id)
+    logger.info("Creating Router...")
     router_id = functest_utils. \
         create_neutron_router(neutron, NEUTRON_ROUTER_NAME)
 
     if not router_id:
         return False
 
-    logger.debug("Router '%s' created successfully" % router_id)
-    logger.debug('Adding router to subnet...')
+    logger.debug("Router '%s' created successfully." % router_id)
+    logger.info("Adding router to subnet...")
 
     result = functest_utils.add_interface_router(neutron, router_id, subnet_id)