Praseed Balakrishnan

Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next

......@@ -9,6 +9,10 @@ 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)
# Add ONOS-specific directories to the exectable PATH
export PATH="$PATH:$ONOS_ROOT/tools/dev/bin:$ONOS_ROOT/tools/test/bin"
export PATH="$PATH:$ONOS_ROOT/tools/build"
# Fallback build number us derived from from the user name & time
export BUILD_NUMBER=${BUILD_NUMBER:-$(id -un)~$(date +'%Y/%m/%d@%H:%M')}
......
......@@ -61,15 +61,14 @@ function cell {
if [ -n "$1" ]; then
[ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
echo "No such cell: $1" >&2 && return 1
unset ONOS_CELL ONOS_NIC ONOS_FEATURES
unset OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN OCI
. $ONOS_ROOT/tools/test/cells/$1
export OCI=$OC1
export ONOS_CELL=$1
cell
else
env | egrep "ONOS_CELL"
env | egrep "OCI"
env | egrep "OC[0-9]+" | sort
env | egrep "OC[1-9]+" | sort
env | egrep "OCN"
env | egrep "ONOS_" | egrep -v 'ONOS_ROOT|ONOS_CELL'
fi
......
#!/bin/bash
# -----------------------------------------------------------------------------
# List available ONOS cells configuration.
# -----------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
# Lists available cells
for cell in $(ls -1 $ONOS_ROOT/tools/test/cells); do
if [ ${cell} = "${ONOS_CELL}" ]; then
cell_id="${cell} *"
else
cell_id="${cell}"
fi
cell_descr="$(grep '^#' $ONOS_ROOT/tools/test/cells/$cell | head -n 1)"
printf "%-12s %s\n" "${cell_id}" "${cell_descr}"
done
#!/bin/bash
# -----------------------------------------------------------------------------
# Print the configuration of an ONOS cell.
# -----------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
function print_usage {
echo "Print the configuration of an ONOS cell."
echo "If no arguments are specified, it will print the configuration for the default"
echo "ONOS cell as specified in the 'ONOS_CELL' environmental variable."
echo
echo "Optional arguments:"
echo " [cell-name] Print the configuration of 'cell-name'"
echo " [-h | --help] Print this help"
}
if [ "${1}" = "-h" -o "${1}" = "--help" ]; then
print_usage
exit 0
fi
if [ -n "${1}" ]; then
cell="${1}"
else
if [ -z "${ONOS_CELL}" ]; then
echo "Environmental variable 'ONOS_CELL' is not defiled"
exit 1
else
cell="${ONOS_CELL}"
fi
fi
if [ ! -f $ONOS_ROOT/tools/test/cells/${cell} ]; then
echo "No such cell: ${cell}"
exit 1
fi
# Load the cell setup
. $ONOS_ROOT/tools/test/cells/${cell}
echo "ONOS_CELL=${ONOS_CELL}"
echo "ONOS_NIC=${ONOS_NIC}"
for n in {1..9}; do
ocn="OC${n}"
if [ -n "${!ocn}" ]; then
echo "$ocn=${!ocn}"
fi
done
echo "OCN=${OCN}"
echo "OCI=${OCI}"
echo "ONOS_FEATURES=${ONOS_FEATURES}"
# Local VirtualBox-based single ONOS instance & ONOS mininet box
export ONOS_CELL="cbench"
export ONOS_NIC=192.168.56.*
export OC1="192.168.56.103"
export OCN="192.168.56.103"
export OCI="${OC1}"
export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd"
......
# Local VirtualBox-based ONOS instances 1,2 & ONOS mininet box
export ONOS_CELL="local"
export ONOS_NIC=192.168.56.*
export OC1="192.168.56.101"
export OC2="192.168.56.102"
export OCN="192.168.56.103"
export OCI="${OC1}"
export ONOS_FEATURES=""
......
# ProxMox-based cell of ONOS instance; no mininet-box
export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-app-tvue,onos-app-proxyarp"
export ONOS_CELL="office"
export ONOS_NIC="10.128.4.*"
export OC1="10.128.4.60"
export OCI="${OC1}"
export ONOS_FEATURES="webconsole,onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-app-tvue,onos-app-proxyarp"
......
# ProxMox-based cell of ONOS instances 1,2 & ONOS mininet box
export ONOS_CELL="prox"
export ONOS_NIC="10.1.9.*"
export OC1="10.1.9.94"
export OC2="10.1.9.82"
export OCN="10.1.9.93"
export OCI="${OC1}"
export ONOS_FEATURES=""
......
# Local VirtualBox-based single ONOS instance & ONOS mininet box
export ONOS_CELL="single"
export ONOS_NIC=192.168.56.*
export OC1="192.168.56.101"
export OCN="192.168.56.103"
export OCI="${OC1}"
export ONOS_FEATURES=""
......
# Local VirtualBox-based ONOS instances 1,2,3 & ONOS mininet box
export ONOS_CELL="triple"
export ONOS_NIC=192.168.56.*
export OC1="192.168.56.101"
export OC2="192.168.56.102"
export OC3="192.168.56.104"
export OCN="192.168.56.103"
export OCI="${OC1}"
export ONOS_FEATURES=""
......