onos/tools/test/bin/onos-upload-sprites
Simon Hunt fd8c7d7288 GUI -- Reworked sprite definition loading via websocket events.
- includes option to specify sprite definition id: #/topo?sprites=defn_name.

Change-Id: If2ce59384e01bb5f35827a503748e21ab4fb1b31
2015-04-14 17:53:49 -07:00

19 lines
537 B
Bash
Executable File

#!/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