aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-upload-sprites
blob: 982d7132aa75b0528a92b2174255a1674a9a53b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# -----------------------------------------------------------------------------
# Tool to upload GUI sprites definitions using GUI REST API.
# -----------------------------------------------------------------------------

node=${1}
sprites=${2}

if [ -z "$node" -o -z "$sprites" ]
then
    echo "Usage: onos-upload-sprites <server-ip> <sprites-defn.json>"
    exit 1
fi

export URL=http://$node:8181/onos/ui/rs/topology/sprites
export HDR="-HContent-Type:application/json"

curl --fail -sS -X POST $HDR $URL --data @$sprites