File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -220,4 +220,49 @@ curl -s -o /dev/null -X POST 'http://'"${CONTEXT_BROKER}"'/ngsi-ld/v1/entityOper
220
220
}
221
221
]'
222
222
223
+ echo -e " Registering Farmer and Devices as data sources.\n"
224
+
225
+ curl -s -o /dev/null -X POST ' http://' " ${CONTEXT_BROKER} " ' /ngsi-ld/v1/csourceRegistrations/' \
226
+ -H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \
227
+ -H ' Content-Type: application/json' \
228
+ -d ' {
229
+ "type": "ContextSourceRegistration",
230
+ "information": [
231
+ {
232
+ "entities": [
233
+ {
234
+ "type": "Animal"
235
+ }
236
+ ]
237
+ }
238
+ ],
239
+ "mode": "redirect",
240
+ "operations": [
241
+ "redirectionOps"
242
+ ],
243
+ "endpoint": "http://farmer"
244
+ }'
245
+
246
+
247
+ curl -s -o /dev/null -X POST ' http://farmer/ngsi-ld/v1/csourceRegistrations/' \
248
+ -H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' \
249
+ -H ' Content-Type: application/json' \
250
+ -d ' {
251
+ "type": "ContextSourceRegistration",
252
+ "information": [
253
+ {
254
+ "entities": [
255
+ {
256
+ "type": "Animal"
257
+ }
258
+ ]
259
+ }
260
+ ],
261
+ "mode": "inclusive",
262
+ "operations": [
263
+ "federationOps"
264
+ ],
265
+ "endpoint": "http://devices"
266
+ }'
267
+
223
268
echo -e " \033[1;32mdone\033[0m"
You can’t perform that action at this time.
0 commit comments