#!/bin/bash | |
# ----------------------------------------------------------------------------- | |
# ONOS topology configuration uploader. | |
# ----------------------------------------------------------------------------- | |
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 | |
. $ONOS_ROOT/tools/build/envDefaults | |
node="${1:-$OC1}" | |
file="${2:-$ONOS_ROOT/tools/test/topos/oe-linear-3.json}" | |
curl -sS --fail -L -X POST -H 'Content-Type:application/json' \ | |
http://$node:8181/onos/v1/config/topology -d@$file |