Minor refactoring in the ONOS cell configuration:
* Each cell-specific variable is explicitly listed
in the cell config file:
ONOS_CELL, ONOS_NIC, OC1-OC9, OCN, OCI, ONOS_FEATURES
* Cleanup and bug fixes inside bash_profile:
- Don't export explicitly OCI and ONOS_CELL, because those
are now exported in the cell config file
- unset ONOS_CELL, ONOS_NIC, ONOS_FEATURES (the last two weren't
unset before)
- The built-in "cell" function shows OC1 to OC9 instead of OC0-OC9;
OC0 is never used/setup anywhere else
* Added two new shell commands:
- tools/test/bin/onos-lsit-cells : lists existing ONOS cell configurations
It is the equivalent of the "cells" built-in bash command
- tools/test/bin/onos-show-cell : shows the configuration of an ONOS cell
It is the equivalent of the "cell" built-in bash command, but
it can show also the configuration of any ONOS cell (not only
the default one).
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index 6b66ff1..e14c43b 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -61,15 +61,14 @@
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