Commit 5e32dd01 authored by FUMEY Clement's avatar FUMEY Clement
Browse files

Add python script that submit random data

parent e1b6f462
#!/usr/bin/env python
from subprocess import call
import random
MAX_NODES = 191
MAX_X = 8
MAX_Y = 12
random.seed()
for i in range(1,MAX_NODES):
node_name = "m3-" + str(i)
x = str(i % 8)
y = str(i / 8)
value = str(random.randint(1,200))
call(["curl","-X", "POST", "--header", "Content-Type: application/json", "--header", "Accept: application/json", "-d" ,"{\"id\": \"" + node_name + "\",\"position\": {\"x\":" + x +",\"y\":" + y + "},\"value\":" + value + "}","http://localhost:8080/measure"])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment