[ONOS-7350] Add ISSU HA/rollback test scenario
Change-Id: I8c1952480cd429d40c77db2e66d16ace27948148
diff --git a/tools/test/bin/onos-check-issu-status b/tools/test/bin/onos-check-issu-status
new file mode 100755
index 0000000..a0aa52b
--- /dev/null
+++ b/tools/test/bin/onos-check-issu-status
@@ -0,0 +1,27 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Checks whether the specified ONOS cluster node has the desired state.
+# -----------------------------------------------------------------------------
+
+aux=/tmp/stc/stc-$$.log
+trap "rm -f $aux 2>/dev/null" EXIT
+
+function onos_nodes() {
+ echo $(env | sort | egrep "^OC[0-9]+" | cut -d= -f2)
+}
+
+nodes=$(onos_nodes)
+
+for attempt in {1..5}; do
+ for node in $nodes; do
+ onos $node issu status > $aux
+ cat $aux
+
+ status=$(cat $aux)
+
+ [ "$status" = "${1}" ] && exit 0
+ sleep 1
+ done
+done
+
+exit 1
\ No newline at end of file