Fixes to allow running p4 trellis scenario

Change-Id: I4882668168521b9119692ecd696189b2b8d5f9de
(cherry picked from commit a61ba5792d9e7a25d3446f37179fbf13ac152098)
diff --git a/tools/test/bin/onos-find-device b/tools/test/bin/onos-find-device
new file mode 100755
index 0000000..fbf1692
--- /dev/null
+++ b/tools/test/bin/onos-find-device
@@ -0,0 +1,26 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Finds a device in the system.
+# -----------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+aux=/tmp/stc/stc-$$.log
+trap "rm -f $aux 2>/dev/null" EXIT
+
+echo onos-find-device: $*
+
+target=${1:-$OCI}
+id=$2
+
+onos $target "onos:devices" | tee $aux
+cat $aux | fgrep "id=$id"
+
+if [ $? -ne 0 ]
+then
+    exit 1;
+fi
+
+exit 0
+