Thomas Vachuska | 9ed335b | 2015-04-14 12:07:47 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Tool to upload GUI sprites definitions using GUI REST API. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | node=${1} |
| 7 | sprites=${2} |
| 8 | |
Simon Hunt | fd8c7d7 | 2015-04-14 17:53:37 -0700 | [diff] [blame^] | 9 | if [ -z "$node" -o -z "$sprites" ] |
| 10 | then |
| 11 | echo "Usage: onos-upload-sprites <server-ip> <sprites-defn.json>" |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
Thomas Vachuska | 9ed335b | 2015-04-14 12:07:47 -0700 | [diff] [blame] | 15 | export URL=http://$node:8181/onos/ui/rs/topology/sprites |
| 16 | export HDR="-HContent-Type:application/json" |
| 17 | |
| 18 | curl --fail -sS -X POST $HDR $URL --data @$sprites |