Showing
1 changed file
with
13 additions
and
0 deletions
tools/test/bin/onos-topo-cfg
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | +# ----------------------------------------------------------------------------- | ||
| 3 | +# ONOS topology configuration uploader. | ||
| 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:-$OC1}" | ||
| 10 | +file="${2:-$ONOS_ROOT/tools/test/topos/oe-linear-3.json}" | ||
| 11 | + | ||
| 12 | +curl -sS --fail -L -X POST -H 'Content-Type:application/json' \ | ||
| 13 | + http://$node:8181/onos/v1/config/topology -d@$file |
-
Please register or login to post a comment