Adding an STC scenario to test basic HA functionality

Change-Id: Ic70b592bf932dcdcd4eb88606d0b0aa9ef9c4a59
diff --git a/tools/test/bin/onos-check-node-status b/tools/test/bin/onos-check-node-status
new file mode 100755
index 0000000..ba86703
--- /dev/null
+++ b/tools/test/bin/onos-check-node-status
@@ -0,0 +1,20 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Checks whether the specified ONOS cluster node has the desired state.
+# -----------------------------------------------------------------------------
+
+aux=/tmp/stc-$$.log
+trap "rm -f $aux 2>/dev/null" EXIT
+
+for attempt in {1..10}; do
+    onos ${1:-$OCI} "onos:nodes" | grep -v /bin/client > $aux
+    cat $aux
+
+    # Normalize the node status
+    state=$(grep ${2:-$OC2} $aux | cut -d, -f3 | cut -d= -f2)
+
+    [ "$state" = "${3:-READY}" ] && exit 0
+    sleep 1
+done
+
+exit 1
\ No newline at end of file