Skip to content

[e2e testing] NGSI-LD #849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 150 commits into from
Nov 26, 2020
Merged

[e2e testing] NGSI-LD #849

merged 150 commits into from
Nov 26, 2020

Conversation

fgalan
Copy link
Member

@fgalan fgalan commented Mar 2, 2020

This PR accumulates the NGSI-LD contribution, previous to its merging in master. It grows with the merging of other PRs into feature/842_ngsi_ld and we can check how travis CI evolve merge after merge. At the end, an e2e CI pass will be done on this PR branch.

PRs included so far:

CC: @jason-fox

This can act as a good regression point for NGSI-v2 and NGSI-LD capabilities.
Only forwarded request tests need to be disabled.
- Remove console.error statements.
- Allow for disabled tests.
- remove unused comparision
Prettify tests and update tests to use ES6 and update Copyrights
…ngsi-ld-measure

Applying #839 and #840 to reduce diff with master
NGSI-LD Specification does not permit a String at the root level
observedAt is only allowed within properties and relationships
- split NGSI-v1, NGSI-v2 and NGSI-LD into separate files
- Move common REST functions into restUtils.js
- ensure that ids are URNS (adding urn:ngsi-ld: where necessary)
- Use Batch Upsert endpoint throughout ( `/ngsi-ld/v1/entityOperations/upsert/`) instead of PATCH update
- Update test expectations
- Split NGSI v2 and NGSI-LD registrations
-  Update CNR
-  Add Docker ENV to docs
-  basic LD set-up documentation
-  amend copy-paste JavaDoc
-  add missing JavaDoc
-  remove blank lines.
-  Update CNR
-  Add Docker ENV to docs
-  basic LD set-up documentation
-  amend copy-paste JavaDoc
-  add missing JavaDoc
-  remove blank lines.
@fgalan
Copy link
Member Author

fgalan commented Oct 14, 2020

I see fiware/iotagent-ul-ngsi-ld is missing from docker hub. Is this published with some other name on it. Please suggest, as its holding our project work.

If you cannot find the image in docker hub you can always built in locally. Have a look to "How to build an image" "Building from your own source files" in https://github.com/telefonicaid/iotagent-ul/tree/master/docker documentation.

Note that before running docker build you have to need to modify package.json to change iotagent-nod-lib depencency to:

     "iotagent-node-lib": "git://github.com/telefonicaid/iotagent-node-lib.git#feature/842_ngsi_ld",

@vistasunil
Copy link

Hello Jason,

Many thanks for your response. I tried building it and getting below error:

chmod: cannot access 'docker/entrypoint.sh': No such file or directory

I tried to find this file on github path and other locations but could not find.

Please suggest.

Thanks & Regards,
Sunil Kumar

@jason-fox
Copy link
Contributor

@vistasunil - you can find some sample dockerfiles here: https://github.com/FIWARE/tutorials.IoT-Agent/tree/NGSI-LD

@vistasunil
Copy link

Hello @jason-fox Jason,

None of the Dockerfile helped as these seems to be compatible for Non-LD Iot-agents. Do I need to do some configuration changes to use this for LD Iot-agent.?

Thanks & Regards,
Sunil Kumar

@jason-fox
Copy link
Contributor

@vistasunil - of course config changes are needed to support NGSI-LD - if you follow the existing tutorial on the NGSI-LD branch it will work as the tutorial uses the docker-compose files found here

The main alteration is the additional ENV attributes found here:

  environment:
      - IOTA_CB_NGSI_VERSION=ld # use NGSI-LD when sending updates for active attributes
      - IOTA_JSON_LD_CONTEXT=http://context:3000/data-models/ngsi-context.jsonld
      - IOTA_FALLBACK_TENANT=openiot

All this has already been fully documented in this PR: https://github.com/telefonicaid/iotagent-node-lib/blob/feature/842_ngsi_ld/doc/installationguide.md - I'm still waiting for progress in merging it.

@vistasunil
Copy link

@jason-fox Many thanks for your help. I got it working 👍

@fgalan
Copy link
Member Author

fgalan commented Oct 19, 2020

Many thanks for your response. I tried building it and getting below error:

chmod: cannot access 'docker/entrypoint.sh': No such file or directory

I tried to find this file on github path and other locations but could not find.

Please suggest.

Do you mean you get that error when following "Building from your own source files" in https://github.com/telefonicaid/iotagent-ul/tree/master/docker documentation? Could you detail which exact steps did you do, please?

It would be great to know, as it could point to some error on the procedure described in documentation (independly of using NGSI-LD or not).

Copy link
Member Author

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We (Telefónica) agree merging this PR under the understanding that the pending part described here will be done by the contributor in the next PR before ending 2020. According to the minutes of the FIWARE TSC meeting on November 23rd 2020, we understand that commitment exists.

@manucarrace manucarrace merged commit 8a98ad1 into master Nov 26, 2020
@manucarrace manucarrace deleted the feature/842_ngsi_ld branch November 26, 2020 14:57
@fgalan fgalan restored the feature/842_ngsi_ld branch November 26, 2020 15:09
@fgalan fgalan deleted the feature/842_ngsi_ld branch November 26, 2020 15:11
@jason-fox jason-fox mentioned this pull request Nov 26, 2020
@fgalan fgalan restored the feature/842_ngsi_ld branch November 26, 2020 15:38
@fgalan fgalan mentioned this pull request Nov 26, 2020
@fgalan fgalan deleted the feature/842_ngsi_ld branch November 26, 2020 15:42
@fgalan fgalan mentioned this pull request Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants