Thomas Vachuska
Committed by Pavlin Radoslavov

Added a short-hand for setting the OCI variable.

Added export.

Change-Id: I1e9b5366ce460995d494f7df81659fea0b6c8584
......@@ -46,6 +46,7 @@ alias op='onos-package'
alias ot='onos-test'
alias ol='onos-log'
alias ow='onos-watch'
alias oi='setPrimaryInstance'
alias go='ob && ot && onos -w'
alias pub='onos-push-update-bundle'
......@@ -99,6 +100,12 @@ function cells {
done
}
# Sets the primary instance to the specified instance number.
function setPrimaryInstance {
export OCI=$(env | egrep "OC[0-9]+" | sort | egrep OC${1:-1} | cut -d= -f2)
echo $OCI
}
# Miscellaneous
function spy {
ps -ef | egrep "$@" | grep -v egrep
......
......@@ -25,7 +25,7 @@ if [ -n "${1}" ]; then
cell="${1}"
else
if [ -z "${ONOS_CELL}" ]; then
echo "Environmental variable 'ONOS_CELL' is not defiled"
echo "Environmental variable 'ONOS_CELL' is not defined"
exit 1
else
cell="${ONOS_CELL}"
......
......@@ -6,7 +6,7 @@
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
. $ONOS_ROOT/tools/build/envDefaults
node="${1:-$OC1}"
node="${1:-$OCI}"
file="${2:-$ONOS_ROOT/tools/test/topos/oe-linear-3.json}"
curl -sS --fail -L -X POST -H 'Content-Type:application/json' \
......