- CONTROLLERIP=ODL_SYSTEM_${i}_IP
- echo "Execute the configuration script on controller ${!CONTROLLERIP}"
- scp ${WORKSPACE}/configuration-script.sh ${!CONTROLLERIP}:/tmp
- ssh ${!CONTROLLERIP} "bash /tmp/configuration-script.sh ${i}"
+ # Get full list of ODL nodes for this site
+ odl_node_list=
+ for j in `seq 1 ${NUM_ODLS_PER_SITE}`
+ do
+ odl_ip=ODL_SYSTEM_$(((i - 1) * NUM_ODLS_PER_SITE + j))_IP
+ odl_node_list="${odl_node_list} ${!odl_ip}"
+ done
+
+ for j in `seq 1 ${NUM_ODLS_PER_SITE}`
+ do
+ odl_ip=ODL_SYSTEM_$(((i - 1) * NUM_ODLS_PER_SITE + j))_IP
+ # Copy over the config script to controller and execute it (parameters are used only for cluster)
+ echo "Execute the configuration script on controller ${!odl_ip} for index $j with node list ${odl_node_list}"
+ scp ${WORKSPACE}/configuration-script.sh ${!odl_ip}:/tmp
+ ssh ${!odl_ip} "bash /tmp/configuration-script.sh ${j} '${odl_node_list}'"
+ done