Basic Platform test suite using onos docker images; test  activate and deactivate apps

Change-Id: I731f5245883c2ffe6de87b41a613d7159d403b4d
diff --git a/TestON/tests/PLATdockertest/Dependency/onos-form-cluster b/TestON/tests/PLATdockertest/Dependency/onos-form-cluster
new file mode 100755
index 0000000..3ccf2a5
--- /dev/null
+++ b/TestON/tests/PLATdockertest/Dependency/onos-form-cluster
@@ -0,0 +1,39 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Forms ONOS cluster using REST API of each separate instance.
+# -----------------------------------------------------------------------------
+
+[ $# -lt 2 ] && echo "usage: $(basename $0) ip1 ip2..." && exit 1
+
+# Scan arguments for user/password or other options...
+while getopts u:p: o; do
+    case "$o" in
+        u) user=$OPTARG;;
+        p) password=$OPTARG;;
+    esac
+done
+user=${user:-onos}           # user defaults to 'onos'
+password=${password:-$user}  # password defaults to user name if not specified
+let OPC=$OPTIND-1
+shift $OPC
+
+ip=$1
+shift
+nodes=$*
+
+ipPrefix=${ip%.*}
+
+aux=/tmp/${ipPrefix}.cluster.json
+trap "rm -f $aux" EXIT
+
+echo "{ \"nodes\": [ { \"ip\": \"$ip\" }" > $aux
+for node in $nodes; do
+    echo ", { \"ip\": \"$node\" }" >> $aux
+done
+echo "], \"ipPrefix\": \"$ipPrefix.*\" }" >> $aux
+
+for node in $ip $nodes; do
+    echo "Forming cluster on $node..."
+    curl --user $user:$password -X POST \
+        http://$node:8181/onos/v1/cluster/configuration -d @$aux
+done