Showing
1 changed file
with
17 additions
and
0 deletions
tools/test/bin/onos-batch
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | +# ----------------------------------------------------------------------------- | ||
| 3 | +# Executes selected set of ONOS commands using the batch mode. | ||
| 4 | +# ----------------------------------------------------------------------------- | ||
| 5 | + | ||
| 6 | +[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 | ||
| 7 | +. $ONOS_ROOT/tools/build/envDefaults | ||
| 8 | + | ||
| 9 | +node=${1:-$OCI} | ||
| 10 | + | ||
| 11 | +commands="${2:-summary,intents,flows,hosts}" | ||
| 12 | + | ||
| 13 | +aux=/tmp/onos-batch.$$ | ||
| 14 | +trap "rm -f $aux" EXIT | ||
| 15 | + | ||
| 16 | +echo "$commands" | tr ',' '\n' > $aux | ||
| 17 | +onos $node -b <$aux |
-
Please register or login to post a comment