Thomas Vachuska | 1627dc8 | 2015-11-13 12:22:14 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # ONOS network 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:-$OCI}" |
| 10 | file="${2:-$ONOS_ROOT/tools/test/topos/oe-linear-3.json}" |
| 11 | url="${3}" |
| 12 | |
Ayaka Koshibe | e8402da | 2016-01-12 15:06:45 -0800 | [diff] [blame] | 13 | curl --fail -sSL --user $ONOS_WEB_USER:$ONOS_WEB_PASS \ |
Thomas Vachuska | 1627dc8 | 2015-11-13 12:22:14 -0800 | [diff] [blame] | 14 | -X POST -H 'Content-Type:application/json' \ |
| 15 | http://$node:8181/onos/v1/network/configuration/${url} -d@$file |