-scp ${WORKSPACE}/controller-script.sh ${ODL_SYSTEM_IP}:/tmp
-ssh ${ODL_SYSTEM_IP} 'bash /tmp/controller-script.sh'
+# Execute the configuration script on controller.
+scp ${WORKSPACE}/configuration-script.sh ${ODL_SYSTEM_IP}:/tmp
+ssh ${ODL_SYSTEM_IP} 'bash /tmp/configuration-script.sh'
+
+# Run config plan in case it exists
+if [ -f ${WORKSPACE}/test/csit/configplans/${TESTPLAN} ]; then
+ echo "configplan exists!!!"
+ echo "Reading the configplan:"
+ cat ${WORKSPACE}/test/csit/configplans/${TESTPLAN} | sed "s:integration:${WORKSPACE}:" > configplan.txt
+ cat configplan.txt
+ for line in $( egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' configplan.txt ); do
+ echo "Executing ${line}..."
+ source ${line}
+ done
+fi
+
+# Copy over the startup script to controller and execute it.
+scp ${WORKSPACE}/startup-script.sh ${ODL_SYSTEM_IP}:/tmp
+ssh ${ODL_SYSTEM_IP} 'bash /tmp/startup-script.sh'