Added a number of test tools.
diff --git a/tools/build/envDefaults b/tools/build/envDefaults
index 71d4cf4..473095c 100644
--- a/tools/build/envDefaults
+++ b/tools/build/envDefaults
@@ -6,6 +6,7 @@
# M2 repository and Karaf gold bits
export M2_REPO=${M2_REPO:-~/.m2/repository}
export KARAF_ZIP=${KARAF_ZIP:-~/Downloads/apache-karaf-3.0.1.zip}
+export KARAF_TAR=${KARAF_TAR:-~/Downloads/apache-karaf-3.0.1.tar.gz}
export KARAF_DIST=$(basename $KARAF_ZIP .zip)
# ONOS Version and onos.tar.gz staging environment
diff --git a/tools/build/onos-package b/tools/build/onos-package
index a35308e..dca278d 100755
--- a/tools/build/onos-package
+++ b/tools/build/onos-package
@@ -13,7 +13,7 @@
# Make sure we have the original apache karaf bits first
[ ! -d $M2_REPO ] && echo "M2 repository $M2_REPO not found" && exit 1
-[ ! -f $KARAF_ZIP ] && echo "Apache Karaf bits $KARAF_ZIP not found" && exit 1
+[ ! -f $KARAF_ZIP -a ! -f $KARAF_TAR ] && echo "Apache Karaf bits $KARAF_ZIP or $KARAF_TAR not found" && exit 1
[ -d $ONOS_STAGE ] && echo "ONOS stage $ONOS_STAGE already exists" && exit 1
# Create the stage directory and warp into it
@@ -21,7 +21,8 @@
cd $ONOS_STAGE
# Unroll the Apache Karaf bits, prune them and make ONOS top-level directories.
-unzip -q $KARAF_ZIP && rm -rf $KARAF_DIST/demos
+[ -f $KARAF_ZIP ] && unzip -q $KARAF_ZIP && rm -rf $KARAF_DIST/demos
+[ -f $KARAF_TAR ] && tar zxf $KARAF_TAR && rm -rf $KARAF_DIST/demos
mkdir bin
# Stage the ONOS admin scripts and patch in Karaf service wrapper extras
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index 11e7349..dd03e2d 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -21,7 +21,8 @@
echo 'Installing ONOS bundles...'
$onos cluster:feature-install default onos-api 1>>$LOG 2>&1
- $onos cluster:feature-install default onos-core 1>>$LOG 2>&1
+ # $onos cluster:feature-install default onos-core 1>>$LOG 2>&1
+ $onos cluster:feature-install default onos-core-trivial 1>>$LOG 2>&1
$onos cluster:feature-install default onos-openflow 1>>$LOG 2>&1
$onos cluster:feature-install default onos-cli 1>>$LOG 2>&1
# $onos cluster:feature-install default onos-gui 1>>$LOG 2>&1
diff --git a/tools/test/bin/onos-install b/tools/test/bin/onos-install
index 6454ee0..b270704 100755
--- a/tools/test/bin/onos-install
+++ b/tools/test/bin/onos-install
@@ -27,6 +27,9 @@
# Install the upstart configuration file.
sudo cp $ONOS_INSTALL_DIR/debian/onos.conf /etc/init/onos.conf
+ # Remove any previous ON.Lab bits from ~/.m2 repo
+ rm -fr ~/.m2/repository/org/onlab
+
# Ignite the ONOS service.
sudo service onos start
"
diff --git a/tools/test/bin/onos-patch-vm b/tools/test/bin/onos-patch-vm
new file mode 100755
index 0000000..60252c0
--- /dev/null
+++ b/tools/test/bin/onos-patch-vm
@@ -0,0 +1,20 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# Remotely patches the ONOS VM to tailor its hostname.
+#-------------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+address=${1:-$OCI}
+remote=$ONOS_USER@$address
+name=${2:-onos-1}
+
+[ -z "$address" ] && echo "Null address not allowed" >&2 && exit 1
+[ -z "$name" ] && echo "Null name not allowed" >&2 && exit 1
+
+ssh $remote "
+ sudo perl -pi.bak -e \"s/127.0.1.1.*/127.0.1.1 $name/g\" /etc/hosts
+ sudo echo $name /etc/hostname
+ sudo hostname $name
+"
\ No newline at end of file
diff --git a/tools/test/bin/onos-push-keys b/tools/test/bin/onos-push-keys
new file mode 100755
index 0000000..a469643
--- /dev/null
+++ b/tools/test/bin/onos-push-keys
@@ -0,0 +1,13 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# Pushes the local id_rsa.pub to the remote ONOS host authorized_keys.
+#-------------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+remote=$ONOS_USER@${1:-$OCI}
+
+scp -q ~/.ssh/id_rsa.pub $remote:/tmp
+ssh $remote "cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys"
+ssh -n -o PasswordAuthentication=no $remote true
diff --git a/tools/test/bin/onos-verify-cell b/tools/test/bin/onos-verify-cell
new file mode 100755
index 0000000..8e7fe99
--- /dev/null
+++ b/tools/test/bin/onos-verify-cell
@@ -0,0 +1,11 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# Verifies connectivity to each node in ONOS cell.
+#-------------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+for node in $(env | sort | egrep "OC[0-9]+" | cut -d= -f2); do
+ printf "%s: " $node; ssh -n -o PasswordAuthentication=no $ONOS_USER@$node date
+done
\ No newline at end of file
diff --git a/tools/test/bin/onos-wait-for-start b/tools/test/bin/onos-wait-for-start
new file mode 100755
index 0000000..0190d6f
--- /dev/null
+++ b/tools/test/bin/onos-wait-for-start
@@ -0,0 +1,19 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# Waits for ONOS to reach run-level 100.
+#-------------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+remote=$ONOS_USER@${1:-$OCI}
+
+ssh $remote "
+ # Wait until we reach the run-level 100
+ running=""
+ while [ -z \$running ]; do
+ $ONOS_INSTALL_DIR/bin/onos bundle:list 2>/dev/null | \
+ grep -q 'START LEVEL 100' && running=1 || sleep 2
+ done
+
+"