}
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
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
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. \
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
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
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,
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)