Sync scripts from stacklight-model

This allows to deploy OpenStack (with OVS or OpenContrail) and
Kubernetes deployments with the same tools.

Change-Id: I5efeab98e70d083a8c54a649b7b59101edc497a6
diff --git a/scripts/opencontrail_control_install.sh b/scripts/opencontrail_control_install.sh
index eca1773..f83053f 100755
--- a/scripts/opencontrail_control_install.sh
+++ b/scripts/opencontrail_control_install.sh
@@ -4,10 +4,10 @@
 CWD="$(dirname "$(readlink -f "$0")")"
 
 # Import common functions
-COMMONS=$CWD/common_functions.sh
+COMMONS="$CWD"/common_functions.sh
 if [ ! -f "$COMMONS" ]; then
-	echo "File $COMMONS does not exist"
-	exit 1
+    echo "File $COMMONS does not exist"
+    exit 1
 fi
 . "$COMMONS"
 
@@ -18,12 +18,12 @@
 
 # Provision opencontrail control services
 hosts=($(get_nodes_names "ctl[0-9]"))
-vip=$(salt-call pillar.get _param:cluster_vip_address | grep '^ ' | sed -e 's/  *//')
+vip=$(salt-call pillar.get _param:openstack_control_address | grep '^ ' | sed -e 's/  *//')
 nb=$(( ${#hosts[@]} - 1 ))
 for i in $(seq 0 $nb); do
-	h=${hosts[$i]}
-	ip=$(salt-call pillar.get linux:network:host:"${h}":address | grep '^ ' | sed -e 's/  *//')
-	salt -C 'I@opencontrail:control:id:1' cmd.run "/usr/share/contrail-utils/provision_control.py --api_server_ip $vip --api_server_port 8082 --host_name $h --host_ip $ip --router_asn 64512 --admin_password workshop --admin_user admin --admin_tenant_name admin --oper add"
+    h=${hosts[$i]}
+    ip=$(salt-call pillar.get linux:network:host:"${h}":address | grep '^ ' | sed -e 's/  *//')
+    salt -C 'I@opencontrail:control:id:1' cmd.run "/usr/share/contrail-utils/provision_control.py --api_server_ip $vip --api_server_port 8082 --host_name $h --host_ip $ip --router_asn 64512 --admin_password workshop --admin_user admin --admin_tenant_name admin --oper add"
 done
 
 # Test opencontrail