diff options
Diffstat (limited to 'framework/src/onos/tools/test/bin/onos-upload-sprites')
-rwxr-xr-x | framework/src/onos/tools/test/bin/onos-upload-sprites | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/framework/src/onos/tools/test/bin/onos-upload-sprites b/framework/src/onos/tools/test/bin/onos-upload-sprites new file mode 100755 index 00000000..982d7132 --- /dev/null +++ b/framework/src/onos/tools/test/bin/onos-upload-sprites @@ -0,0 +1,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 |