Fixing onos-package not to be sensitive to cell settings and instead allowing onos-config (used from onos-install) to be fully sensitive to cell settings.
Added onos-package-test and onos-push-test-bits scripts.

Change-Id: Ie3f829f8a6e6d8a419388428feca56b69635ed44
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index d1a2ff0..082f506 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -8,6 +8,10 @@
 
 remote=$ONOS_USER@${1:-$OCI}
 
+# Customize features
+export ONOS_FEATURES="${ONOS_FEATURES:-webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow}"
+
+
 # Generate a cluster.json from the ON* environment variables
 CDEF_FILE=/tmp/${remote}.cluster.json
 echo "{ \"ipPrefix\": \"$ONOS_NIC\"," > $CDEF_FILE
@@ -35,6 +39,10 @@
     # Suppress Hazelcast multicast joiner warning
     echo "log4j.logger.com.hazelcast.cluster.impl.MulticastService= ERROR" \
         >> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/org.ops4j.pax.logging.cfg
+
+    # Patch the Apache Karaf distribution file to load ONOS features
+    perl -pi.old -e \"s|^(featuresBoot=.*,management)(,webconsole,.*)|\1,$ONOS_FEATURES|\" \
+        $ONOS_INSTALL_DIR/$KARAF_DIST/etc/org.apache.karaf.features.cfg
 "
 
 # Generate a default tablets.json from the ON* environment variables
@@ -42,7 +50,6 @@
 onos-gen-partitions $TDEF_FILE
 scp -q $TDEF_FILE $remote:$ONOS_INSTALL_DIR/config/tablets.json
 
-
 # copy tools/package/config/ to remote
 scp -qr ${ONOS_ROOT}/tools/package/config/ $remote:$ONOS_INSTALL_DIR/
 
diff --git a/tools/test/bin/onos-push-test-bits b/tools/test/bin/onos-push-test-bits
new file mode 100755
index 0000000..927d157
--- /dev/null
+++ b/tools/test/bin/onos-push-test-bits
@@ -0,0 +1,16 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Remotely pushes test bits to a remote test machine and unrolls them in /tmp
+# -----------------------------------------------------------------------------
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+node=${1:-$OCI}
+remote=$ONOS_USER@$node
+
+scp -q $ONOS_TEST_TAR $remote:/tmp
+ssh $remote "
+    rm -f /tmp/onos $ONOS_TEST_BITS
+    cd /tmp && tar zxf $ONOS_TEST_BITS.tar.gz && ln -s $ONOS_TEST_BITS onos
+"
diff --git a/tools/test/cells/ec2 b/tools/test/cells/ec2
new file mode 100644
index 0000000..204988e
--- /dev/null
+++ b/tools/test/cells/ec2
@@ -0,0 +1,20 @@
+# Bare metal cluster
+
+# Use the 10G NIC for cluster communications
+export ONOS_NIC="192.168.200.*"
+
+# ONOS Test proxy
+export OCT=192.168.200.101
+
+# Use the 1G NICs for external access
+export OC1=192.168.200.101
+export OC2=192.168.200.102
+export OC3=192.168.200.103
+export OC4=192.168.200.104
+export OC5=192.168.200.105
+export OC6=192.168.200.106
+export OC7=192.168.200.107
+
+export OCI=${OC1}
+
+export ONOS_FEATURES=webconsole,onos-api,onos-core,onos-cli,onos-rest,onos-null