Thomas Vachuska | dcadc2b | 2014-10-29 12:03:29 -0700 | [diff] [blame] | 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 | |
Thomas Vachuska | f9879c5 | 2016-01-15 11:12:19 -0800 | [diff] [blame] | 9 | echo "This facility has been deprecated and will be removed in 1.6.0 (Goldeneye) release!!!" |
| 10 | |
Thomas Vachuska | 8531429 | 2014-11-14 17:52:12 -0800 | [diff] [blame] | 11 | node="${1:-$OCI}" |
Thomas Vachuska | dcadc2b | 2014-10-29 12:03:29 -0700 | [diff] [blame] | 12 | file="${2:-$ONOS_ROOT/tools/test/topos/oe-linear-3.json}" |
Ayaka Koshibe | d88b81d | 2015-09-17 17:52:27 -0700 | [diff] [blame] | 13 | url="${3:-config/topology}" |
Thomas Vachuska | dcadc2b | 2014-10-29 12:03:29 -0700 | [diff] [blame] | 14 | |
Thomas Vachuska | 3c831fa | 2015-08-17 18:44:15 -0700 | [diff] [blame] | 15 | curl -sS --fail -L --user $ONOS_WEB_USER:$ONOS_WEB_PASS \ |
| 16 | -X POST -H 'Content-Type:application/json' \ |
Ayaka Koshibe | d88b81d | 2015-09-17 17:52:27 -0700 | [diff] [blame] | 17 | http://$node:8181/onos/v1/${url} -d@$file |