Change onos-wait-for-start and onos-service to allow addressing nodes by integer
(e.g. you can use 1 instead of $OC1) Change-Id: I2bbf18c55da713bf0947d3597710d59ed6f41dc1
Showing
2 changed files
with
6 additions
and
2 deletions
... | @@ -5,6 +5,7 @@ | ... | @@ -5,6 +5,7 @@ |
5 | 5 | ||
6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 | 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
7 | . $ONOS_ROOT/tools/build/envDefaults | 7 | . $ONOS_ROOT/tools/build/envDefaults |
8 | +. $ONOS_ROOT/tools/test/bin/find-node.sh | ||
8 | 9 | ||
9 | function print_usage { | 10 | function print_usage { |
10 | command_name=`basename $0` | 11 | command_name=`basename $0` |
... | @@ -38,7 +39,7 @@ case $2 in | ... | @@ -38,7 +39,7 @@ case $2 in |
38 | if [ "${1}" = "--cell" ]; then | 39 | if [ "${1}" = "--cell" ]; then |
39 | nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2) | 40 | nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2) |
40 | else | 41 | else |
41 | - nodes=${1:-$OCI} | 42 | + nodes=$(find_node ${1:-$OCI}) |
42 | fi | 43 | fi |
43 | 44 | ||
44 | # Execute the remote commands | 45 | # Execute the remote commands | ... | ... |
... | @@ -5,8 +5,11 @@ | ... | @@ -5,8 +5,11 @@ |
5 | 5 | ||
6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 | 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
7 | . $ONOS_ROOT/tools/build/envDefaults | 7 | . $ONOS_ROOT/tools/build/envDefaults |
8 | +. $ONOS_ROOT/tools/test/bin/find-node.sh | ||
8 | 9 | ||
9 | -remote=$ONOS_USER@${1:-$OCI} | 10 | +node=$(find_node ${1:-$OCI}) |
11 | + | ||
12 | +remote=$ONOS_USER@$node | ||
10 | 13 | ||
11 | ssh -t $remote " | 14 | ssh -t $remote " |
12 | # Wait until we reach the run-level 100 | 15 | # Wait until we reach the run-level 100 | ... | ... |
-
Please register or login to post a comment