Skip to content

Commit

Permalink
Switching to user-context
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jul 10, 2024
1 parent e51ccc8 commit 42f87a0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
6 changes: 6 additions & 0 deletions NGSI-LD QuantumLeap.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,12 @@
"key": "ngsi-context.jsonld",
"value": "http://context/ngsi-context.jsonld",
"type": "string"
},
,
{
"key": "user-context.jsonld",
"value": "http://context/user-context.jsonld",
"type": "string"
}
]
}
11 changes: 5 additions & 6 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
]
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```
<a name="sample-gps-readings"></a>
Expand Down Expand Up @@ -435,7 +435,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
}
},
"throttling": 10,
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand All @@ -451,6 +451,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
```console
curl -X GET \
'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'NGSILD-Tenant: openiot'
```

Expand Down Expand Up @@ -481,8 +482,7 @@ curl -X GET \
}
]
}
},
"@context": "http://context/ngsi-context.jsonld"
}
},
{
"id": "urn:ngsi-ld:Subscription:601157e3bc8ec912978db6e5",
Expand All @@ -508,8 +508,7 @@ curl -X GET \
]
}
},
"throttling": 10,
"@context": "http://context/ngsi-context.jsonld"
"throttling": 10
}
]
```
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
]
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -426,7 +426,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
}
},
"throttling": 10,
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand All @@ -440,6 +440,7 @@ each was sent).
```console
curl -X GET \
'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'NGSILD-Tenant: openiot'
```

Expand Down Expand Up @@ -470,8 +471,7 @@ curl -X GET \
}
]
}
},
"@context": "http://context/ngsi-context.jsonld"
}
},
{
"id": "urn:ngsi-ld:Subscription:601157e3bc8ec912978db6e5",
Expand All @@ -497,8 +497,7 @@ curl -X GET \
]
}
},
"throttling": 10,
"@context": "http://context/ngsi-context.jsonld"
"throttling": 10
}
]
```
Expand Down
6 changes: 3 additions & 3 deletions docker-compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
target: /usr/local/apache2/conf/mime.types
read_only: true
healthcheck:
test: (wget --server-response --spider --quiet http://ld-context/ngsi-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1
test: (wget --server-response --spider --quiet http://context/user-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1

# Databases
mongo-db:
Expand Down Expand Up @@ -83,7 +83,7 @@ services:
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
- IOTA_CB_NGSI_VERSION=ld # use NGSI-LD when sending updates for active attributes
- IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld
- IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld
- IOTA_FALLBACK_TENANT=openiot
- IOTA_MULTI_CORE=true
healthcheck:
Expand Down Expand Up @@ -142,7 +142,7 @@ services:
- TWITTER_CONSUMER_KEY=<ADD_YOUR_CONSUMER_KEY>
- TWITTER_CONSUMER_SECRET=<ADD_YOUR_CONSUMER_SECRET>
- MONGO_URL=mongodb://mongo-db:27017
- IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld
- IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld
- "CRATE_DB_SERVICE_URL=http://crate-db:4200/_sql"

- PIG_COUNT=${PIG_COUNT}
Expand Down
6 changes: 3 additions & 3 deletions services
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e
STELLIO="http://stellio:8080/actuator/health"
SCORPIO="http://scorpio:9090/scorpio/"
ORION="http://orion:1026/version"
CONTEXT="http://context/ngsi-context.jsonld"
CONTEXT="http://context/user-context.jsonld"
CORE_CONTEXT="https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld"

dockerCmd="docker compose"
Expand Down Expand Up @@ -125,15 +125,15 @@ loadData () {
docker run --rm -v $(pwd)/import-data:/import-data \
--network fiware_default \
-e CONTEXT_BROKER=${CONTEXT_BROKER} \
-e TUTORIAL_DATA_MODELS_CONTEXT="http://context/ngsi-context.jsonld" \
-e TUTORIAL_DATA_MODELS_CONTEXT="http://context/user-context.jsonld" \
-e PIG_COUNT=${PIG_COUNT:-4} \
-e COW_COUNT=${COW_COUNT:-4} \
--entrypoint /bin/ash quay.io/curl/curl:${CURL_VERSION} /import-data
waitForIoTAgent
docker run --rm -v $(pwd)/provision-devices:/provision-devices \
--network fiware_default \
-e CONTEXT_BROKER=${CONTEXT_BROKER} \
-e TUTORIAL_DATA_MODELS_CONTEXT="http://context/ngsi-context.jsonld" \
-e TUTORIAL_DATA_MODELS_CONTEXT="http://context/user-context.jsonld" \
--entrypoint /bin/ash quay.io/curl/curl:${CURL_VERSION} /provision-devices
docker run --rm -v $(pwd)/link-devices:/link-devices \
--network fiware_default \
Expand Down

0 comments on commit 42f87a0

Please sign in to comment.