Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
naiades-platform-poc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
naiades
naiades-platform-poc
Commits
4ba792a9
Commit
4ba792a9
authored
Oct 05, 2020
by
Federico Sismondi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'admin_scripts' into 'master'
Add() scripts for orion entities administration See merge request
!12
parents
cc65e678
e7080cd9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
1 deletion
+98
-1
scripts-admin/discover_all_susbcriptions.sh
scripts-admin/discover_all_susbcriptions.sh
+26
-0
scripts-admin/historic_api_get_tables.sh
scripts-admin/historic_api_get_tables.sh
+1
-1
scripts-admin/historic_api_subscribe_to_device.sh
scripts-admin/historic_api_subscribe_to_device.sh
+34
-0
scripts-admin/historic_api_subscribe_to_flower_bed.sh
scripts-admin/historic_api_subscribe_to_flower_bed.sh
+37
-0
scripts-admin/historic_api_subscribe_to_weather_observed.sh
scripts-admin/historic_api_subscribe_to_weather_observed.sh
+0
-0
No files found.
scripts
/admin_get_all_orion
_susbcriptions.sh
→
scripts
-admin/discover_all
_susbcriptions.sh
View file @
4ba792a9
...
...
@@ -3,8 +3,24 @@
[[
-z
"
$ORION_HOST
"
]]
&&
echo
"Please set ORION_HOST env var. E.g. export ORION_HOST=127.0.0.1"
&&
exit
echo
"Querying context broker at:
${
ORION_HOST
}
"
echo
"--"
echo
"Carouge suscriptions:"
curl
--location
--request
GET
\
"http://
$ORION_HOST
:1026/v2/subscriptions/"
\
--header
"Fiware-Service: carouge"
\
| python
-mjson
.tool
echo
"--"
echo
"Braila suscriptions:"
curl
--location
--request
GET
\
"http://
$ORION_HOST
:1026/v2/subscriptions/"
\
--header
"Fiware-Service: braila"
\
| python
-mjson
.tool
echo
"--"
echo
"Alicante suscriptions:"
curl
--location
--request
GET
\
"http://
$ORION_HOST
:1026/v2/subscriptions/"
\
--header
"Fiware-Service: alicante"
\
| python
-mjson
.tool
scripts
/admin_historic
_get_tables.sh
→
scripts
-admin/historic_api
_get_tables.sh
View file @
4ba792a9
...
...
@@ -4,7 +4,7 @@
echo
"Querying historical data at:
${
CRATE_HOST
}
"
curl
--location
--request
POST
\
"http://CRATE_HOST:4200/_sql"
\
"http://
$
CRATE_HOST
:4200/_sql"
\
--header
"Fiware-Service: carouge"
\
--header
"Content-Type: application/json"
\
--header
"Accept: application/json"
\
...
...
scripts-admin/historic_api_subscribe_to_device.sh
0 → 100755
View file @
4ba792a9
#!/usr/bin/env bash
[[
-z
"
$ORION_HOST
"
]]
&&
echo
"Please set ORION_HOST env var. E.g. export ORION_HOST=127.0.0.1"
&&
exit
echo
"Querying context broker at:
${
ORION_HOST
}
"
# API NOTES:
# "condition": { "attrs": [] } -> means monitor all the attributes in the entity
curl
--location
--request
POST
\
"http://
$ORION_HOST
:1026/v2/subscriptions/"
\
--header
"Fiware-Service: carouge"
\
--header
"Content-Type: application/json"
\
--header
"Accept: application/json"
\
--data
'{
"description": "Notify QuantumLeap, the historic API, of some Device entity changes",
"subject": {
"entities": [
{
"idPattern": ".*",
"type": "Device"
}
],
"condition": {
"attrs": ["value","serialNumber","name","location","rssi"]
}
},
"notification": {
"http": {
"url": "http://172.18.1.7:8668/v2/notify"
},
"attrs": ["value","serialNumber","name","location","rssi"],
"metadata": ["dateCreated", "dateModified"]
}
}'
scripts-admin/historic_api_subscribe_to_flower_bed.sh
0 → 100755
View file @
4ba792a9
#!/usr/bin/env bash
[[
-z
"
$ORION_HOST
"
]]
&&
echo
"Please set ORION_HOST env var. E.g. export ORION_HOST=127.0.0.1"
&&
exit
echo
"Querying context broker at:
${
ORION_HOST
}
"
# API NOTES:
# "condition": { "attrs": [] } -> means monitor all the attributes in the entity
curl
--location
--request
POST
\
"http://
$ORION_HOST
:1026/v2/subscriptions/"
\
--header
"Fiware-Service: carouge"
\
--header
"Content-Type: application/json"
\
--header
"Accept: application/json"
\
--data
'{
"description": "Notify QuantumLeap, the historic API, of all FlowerBed changes",
"subject": {
"entities": [
{
"idPattern": ".*",
"type": "FlowerBed"
}
],
"condition": {
"attrs": []
}
},
"notification": {
"http": {
"url": "http://172.18.1.7:8668/v2/notify"
},
"attrs": [],
"attrsFormat" : "keyValues",
"metadata": ["dateCreated", "dateModified"]
}
}'
scripts
/admin_susbcription_for_historic_data_weather
.sh
→
scripts
-admin/historic_api_subscribe_to_weather_observed
.sh
View file @
4ba792a9
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment