summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS/Teston/CI/dependencies
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-01 11:03:09 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2015-10-01 11:03:09 +0200
commit19c7d0ecfd453d5e631466401e454d4da3314f9b (patch)
treec1dac5451af1760f963d709772b5062ba2741983 /testcases/Controllers/ONOS/Teston/CI/dependencies
parent5901dd9a47b08c162acb631bf5acaeeb1b7ce745 (diff)
parent96bf9abe9b1b26a79dcc86900e8eb33d8544e773 (diff)
Merge branch 'master' into stable/arnoarno.2015.2.0
Diffstat (limited to 'testcases/Controllers/ONOS/Teston/CI/dependencies')
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/dependencies/onos23
1 files changed, 23 insertions, 0 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/dependencies/onos b/testcases/Controllers/ONOS/Teston/CI/dependencies/onos
new file mode 100644
index 000000000..d4d59e0f7
--- /dev/null
+++ b/testcases/Controllers/ONOS/Teston/CI/dependencies/onos
@@ -0,0 +1,23 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# ONOS remote command-line client.
+# -----------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. /root/.bashrc
+. $ONOS_ROOT/tools/build/envDefaults
+. $ONOS_ROOT/tools/test/bin/find-node.sh
+
+[ "$1" = "-w" ] && shift && onos-wait-for-start $1
+
+[ -n "$1" ] && OCI=$(find_node $1) && shift
+
+if which client 1>/dev/null 2>&1 && [ -z "$ONOS_USE_SSH" ]; then
+ # Use Karaf client only if we can and are allowed to
+ unset KARAF_HOME
+ client -h $OCI -u karaf "$@" 2>/dev/null
+else
+ # Otherwise use raw ssh; strict checking is off for dev environments only
+ #ssh -p 8101 -o StrictHostKeyChecking=no $OCI "$@"
+ sshpass -p karaf ssh -l karaf -p 8101 $OCI "$@"
+fi