1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

added another script to query the context broker

This commit is contained in:
Steffen Vogel 2015-09-22 11:33:43 +02:00
parent 7724d2c701
commit a5e2eb3f83
2 changed files with 35 additions and 2 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
(curl 46.101.131.212:1026/v1/queryContext -s -S \
(curl http://46.101.131.212:1026/v1/queryContext -s -S \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
@ -8,7 +8,12 @@
{
"type": "type_one",
"isPattern": "false",
"id": "rtds_sub1"
"id": "rtds_sub3"
},
{
"type": "type_two",
"isPattern": "false",
"id": "rtds_sub4"
}
]
}

28
contrib/fiware-update.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
(curl http://46.101.131.212:1026/v1/updateContext -s -S \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
"contextElements": [
{
"type": "type_one",
"isPattern": "false",
"id": "rtds_sub3",
"attributes": [
{
"name": "v1",
"type": "float",
"value": "26.5"
},
{
"name": "v2",
"type": "float",
"value": "763"
}
]
}
],
"updateAction": "UPDATE"
}
EOF