3 # Use same path for run.internal.sh
4 RUNSH_DIR=$(dirname $0)
5 CONTROLLER_RUNSH=${RUNSH_DIR}/run.internal.sh
10 # Added help for of13 before help from controller (this help common for intagration and controller)
13 if [ -n "${helparg}" ]; then
15 harvestHelp ${helparg}
16 if (( $? == 0 )); then
18 echo -e '\nFor more information type -help.\n'
21 echo 'For more information on a specific command, type -help command-name.'
23 echo ' Added option for integration:'
27 echo ' Visit wiki for more information :'
29 echo ' https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Controller_Artifacts:run_sh'
31 echo 'Common options: '
34 if ${needParentHelp}; then
35 $CONTROLLER_RUNSH -help ${helparg}
45 -of10) OF13=0 ; (( i += 1 ));;
46 -of13) OF13=1 ; (( i += 1 ));;
47 -bundlefilter) (( i += 1 )); BUNDLEFILTER="|${@:$i:1}";;
48 -help) (( i += 1 )); helparg=${@:$i:1}; usage ;;
53 # clean available optional configurations (links)
54 find ${RUNSH_DIR}/configuration/initial -type l -exec rm {} \;
58 # Option to run the OpenDaylight controller with the OpenFlow plugin (1.3).
61 OF_FILTER="org.opendaylight.(openflowplugin|openflowjava|controller.sal-compatibility|ovsdb.of-extension)"
62 OF_PLUGIN_RUNTIME="1.0"
63 if (( $OF13 != 0 )); then
64 OF_PLUGIN_RUNTIME="1.3"
65 OF_FILTER="org.opendaylight.controller.(thirdparty.org.openflow|protocol_plugins.openflow)"
66 while read ofConfig; do
67 ln -s ../initial.available/$(basename ${ofConfig}) ${RUNSH_DIR}/configuration/initial/
68 done < <(find ${RUNSH_DIR}/configuration/initial.available -name '*openflowplugin.xml')
71 # Make sure we suck out our additional args so as to not confuse
73 NEWARGS=`echo $@|sed 's/-of13//'|sed 's/-of10//'|sed 's/-bundlefilter[ ]*[^ ]*//'`
75 # Build the filter string
78 FILTER=${FILTERBEGINING}${OF_FILTER}${BUNDLEFILTER}${FILTERENDING}
81 $CONTROLLER_RUNSH -Dfelix.fileinstall.filter="$FILTER" -Dovsdb.of.version="$OF_PLUGIN_RUNTIME" $NEWARGS