added script client tester

This commit is contained in:
root 2015-10-14 10:51:31 +02:00
parent 1863695a38
commit 90117229f9
2 changed files with 24 additions and 0 deletions

23
bin/iotronic Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
HOST='localhost'
PORT='1288'
VERSION='v1'
BASE=http://$HOST:$PORT/$VERSION
if [ $# -lt 1 ]
then
echo "list - create-board - delete-board - show"
fi
case "$1" in
list) curl $BASE/boards/
;;
create-board) curl -X POST $BASE/boards/
;;
delete-board) curl -X DELETE $BASE/boards/$2
;;
show) curl $BASE/boards/$2
;;
esac

View File

@ -63,6 +63,7 @@ setup(
data_files=[
('/usr/bin', ['bin/iotronic-conductor']),
('/usr/bin', ['bin/iotronic']),
],