80ed9bd92234530b838f6c4702a1ca61570e60fd
[functest.git] / testcases / features / sfc / prepare_odl_sfc.bash
1 #!/bin/bash
2
3 #
4 # Author: George Paraskevopoulos (geopar@intracom-telecom.com)
5 #         Manuel Buil (manuel.buil@ericsson.com)
6 # Prepares the controller and the compute nodes for the odl-sfc testcase
7 #
8 #
9 # All rights reserved. This program and the accompanying materials
10 # are made available under the terms of the Apache License, Version 2.0
11 # which accompanies this distribution, and is available at
12 # http://www.apache.org/licenses/LICENSE-2.0
13 #
14
15 ODL_SFC_LOG=/home/opnfv/functest/results/odl-sfc.log
16 ODL_SFC_DIR=${FUNCTEST_REPO_DIR}/testcases/features/sfc
17
18 # Split the output to the log file and redirect STDOUT and STDERR to /dev/null
19 bash ${ODL_SFC_DIR}/server_presetup_CI.bash |& \
20     tee -a ${ODL_SFC_LOG} 1>/dev/null 2>&1
21
22 # Get return value from PIPESTATUS array (bash specific feature)
23 ret_val=${PIPESTATUS[0]}
24 if [ $ret_val != 0 ]; then
25     echo "The tacker server deployment failed"
26     exit $ret_val
27 fi
28 echo "The tacker server was deployed successfully"
29
30 bash ${ODL_SFC_DIR}/compute_presetup_CI.bash |& \
31     tee -a ${ODL_SFC_LOG} 1>/dev/null 2>&1
32
33 ret_val=${PIPESTATUS[0]}
34 if [ $ret_val != 0 ]; then
35     exit $ret_val
36 fi
37
38 exit 0