blob: 982d7132aa75b0528a92b2174255a1674a9a53b6 [file] [log] [blame]
Thomas Vachuska9ed335b2015-04-14 12:07:47 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Tool to upload GUI sprites definitions using GUI REST API.
4# -----------------------------------------------------------------------------
5
6node=${1}
7sprites=${2}
8
Simon Huntfd8c7d72015-04-14 17:53:37 -07009if [ -z "$node" -o -z "$sprites" ]
10then
11 echo "Usage: onos-upload-sprites <server-ip> <sprites-defn.json>"
12 exit 1
13fi
14
Thomas Vachuska9ed335b2015-04-14 12:07:47 -070015export URL=http://$node:8181/onos/ui/rs/topology/sprites
16export HDR="-HContent-Type:application/json"
17
18curl --fail -sS -X POST $HDR $URL --data @$sprites