diff --git a/README.md b/README.md index 8df77e5..15fa060 100644 --- a/README.md +++ b/README.md @@ -916,7 +916,7 @@ The concise format is also available for the GeoJSON format which can be request ```console curl -G -iX GET \ - 'http://localhost:1026//ngsi-ld/v1/entities/' \ + 'http://localhost:1026/ngsi-ld/v1/entities/' \ -H 'Link: ; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/geo+json' \ -H 'NGSILD-Tenant: openiot' \ @@ -1141,7 +1141,7 @@ curl -iX POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/update?options= "type": "TemperatureSensor", "temperature": { "value": 16, - "unitCode": "CEL" + "unitCode": "CEL", "observedAt": "2022-03-01T15:00:00.000Z" } } diff --git a/link-devices b/link-devices index 2de7b84..11562ac 100755 --- a/link-devices +++ b/link-devices @@ -42,7 +42,7 @@ do fi done -curl -s -o /dev/null -X POST \ +curl -s -o /dev/null --retry 10 --retry-all-errors --retry-delay 10 -X POST \ 'http://iot-agent:4041/iot/devices' \ -H 'Content-Type: application/json' \ -H 'fiware-service: openiot' \ @@ -74,7 +74,7 @@ do fi done -curl -s -o /dev/null -X POST \ +curl -s -o /dev/null --retry 10 --retry-all-errors --retry-delay 10 -X POST \ 'http://iot-agent:4041/iot/devices' \ -H 'Content-Type: application/json' \ -H 'fiware-service: openiot' \ diff --git a/services b/services index 234fdb1..8b29836 100755 --- a/services +++ b/services @@ -125,9 +125,9 @@ waitForMongo () { waitForIoTAgent () { echo -e "\n⏳ Waiting for \033[1;36mIoT-Agent\033[0m to be available\n" - while [ "$(docker run --network fiware_default --rm quay.io/curl/curl:${CURL_VERSION} -s -o /dev/null -w %{http_code} 'http://iot-agent:4041/version')" -eq 000 ] + while ! [ "$(docker inspect --format='{{.State.Health.Status}}' fiware-iot-agent 2>/dev/null)" == "healthy" ] do - echo -e "IoT Agent HTTP state: " $(curl -s -o /dev/null -w %{http_code} 'http://localhost:4041/version') " (waiting for 200)" + echo -e "IoT Agent health: $(docker inspect --format='{{.State.Health.Status}}' fiware-iot-agent 2>/dev/null) (waiting for healthy)" sleep 6 done }