Make STC intent operations use intent IDs

Change-Id: Ib2eb4e66bd0243b2263c737fb074dbf3c34aa7fe
diff --git a/tools/test/bin/onos-check-intent b/tools/test/bin/onos-check-intent
index 03c3215..55410ad 100755
--- a/tools/test/bin/onos-check-intent
+++ b/tools/test/bin/onos-check-intent
@@ -10,10 +10,12 @@
 trap "rm -f $aux 2>/dev/null" EXIT
 target=${1:-$OCI}
 
+echo onos-check-intent: $*
+
 set -x
 for i in 1 2 3; do
-    onos $target "onos:intents" >> $aux
-    grep "state=$2" $aux && cat $aux && exit 0
+    onos $target "onos:intents" > $aux
+    ( cat $aux | grep "id=$2" | grep "state=$3" ) && cat $aux && exit 0
     sleep 1
 done