a2a49e466f66edc227070228e7f8ef8d614c41be
[integration/distribution.git] / distributions / virtualization / src / assemble / resources / run.sh
1 #!/bin/bash
2
3 # Use same path for run.base.sh
4 RUNSH_DIR=$(dirname $0)
5 RUN_BASE_SH=${RUNSH_DIR}/run.base.sh
6
7 function usage {
8     echo "Please select one of the 3 supported Virtualization technology : \"$0 -virt [ovsdb | opendove | vtn]\""
9     exit 1
10 }
11
12 virtIndex=0
13 while true ; do
14     (( i += 1 ))
15     case "${@:$i:1}" in
16         -virt) virtIndex=$i ;;
17         "") break ;;
18     esac
19 done
20
21 # Virtualization edition select
22 if [ ${virtIndex} -eq 0 ]; then
23     usage
24 fi
25
26 virt=${@:$virtIndex+1:1}
27 if [ "${virt}" == "" ]; then
28     usage
29 else
30     if [ "${virt}" == "ovsdb" ]; then
31         ODL_VIRT_FILTER="opendove|vtn"
32     elif [ "${virt}" == "opendove" ]; then
33         ODL_VIRT_FILTER="ovsdb|vtn"
34     elif [ "${virt}" == "vtn" ]; then
35         ODL_VIRT_FILTER="affinity|opendove|ovsdb|controller.(arphandler|samples)"
36     else
37         usage
38     fi
39 fi
40
41 $RUN_BASE_SH -bundlefilter "org.opendaylight.(${ODL_VIRT_FILTER})" "${@:1:$virtIndex-1}" "${@:virtIndex+2}"