-
Notifications
You must be signed in to change notification settings - Fork 91
Basic NGSI-LD active measures support #841
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
fgalan
merged 13 commits into
telefonicaid:feature/842_ngsi_ld
from
jason-fox:feature/ngsi-ld-measure
Mar 2, 2020
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
055d343
Basic NSGI-LD Measures
jason-fox 4d30d69
NGSI-LD Tests
jason-fox f1d0201
Fix tests - disable some additional NGSI-LD test fails.
jason-fox 03779ba
Increase test coverage
jason-fox 68b5f65
Linting codebase
jason-fox 40875e3
Prettify tests and update tests to use ES6
jason-fox dd81751
Merge commit '09048b9f0a799bff3ee394790c23c47bec5af727' into feature/…
jason-fox a2b334a
Tidy JSON response mocks
jason-fox b41a18a
Changes after review.
jason-fox 2d849b0
Amend JavaDoc
jason-fox a027234
More JavaDoc NGSI-v2 => NSGI-LD
jason-fox c70d9ed
More JavaDoc - add missing headers
jason-fox a5c650a
And error handler JavaDoc
jason-fox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,7 +91,8 @@ function processEnvironmentVariables() { | |
| 'IOTA_APPEND_MODE', | ||
| 'IOTA_POLLING_EXPIRATION', | ||
| 'IOTA_POLLING_DAEMON_FREQ', | ||
| 'IOTA_MULTI_CORE' | ||
| 'IOTA_MULTI_CORE', | ||
| 'IOTA_JSON_LD_CONTEXT' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New env var should be described in documentation.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed b41a18a - Minimal Documentation for now. |
||
| ], | ||
| iotamVariables = [ | ||
| 'IOTA_IOTAM_URL', | ||
|
|
@@ -146,6 +147,9 @@ function processEnvironmentVariables() { | |
| if (process.env.IOTA_CB_NGSI_VERSION) { | ||
| config.contextBroker.ngsiVersion = process.env.IOTA_CB_NGSI_VERSION; | ||
| } | ||
| if (process.env.IOTA_JSON_LD_CONTEXT){ | ||
| config.contextBroker.jsonLdContext = process.env.IOTA_JSON_LD_CONTEXT; | ||
| } | ||
|
|
||
| // North Port Configuration (ensuring the configuration sub-object exists before start using it) | ||
| if (config.server === undefined) { | ||
|
|
@@ -377,6 +381,21 @@ function checkNgsi2() { | |
| return false; | ||
| } | ||
|
|
||
| /** | ||
| * It checks if the configuration file states the use of NGSI-LD | ||
| * | ||
| * @return {boolean} Result of the checking | ||
| */ | ||
| function checkNgsiLD() { | ||
| if (config.contextBroker && | ||
| config.contextBroker.ngsiVersion && | ||
| config.contextBroker.ngsiVersion === 'ld') { | ||
| return true; | ||
| } | ||
|
|
||
| return false; | ||
| } | ||
|
|
||
| function setSecurityService(newSecurityService) { | ||
| securityService = newSecurityService; | ||
| } | ||
|
|
@@ -394,5 +413,6 @@ exports.getGroupRegistry = getGroupRegistry; | |
| exports.setCommandRegistry = setCommandRegistry; | ||
| exports.getCommandRegistry = getCommandRegistry; | ||
| exports.checkNgsi2 = checkNgsi2; | ||
| exports.checkNgsiLD = checkNgsiLD; | ||
| exports.setSecurityService = setSecurityService; | ||
| exports.getSecurityService = getSecurityService; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGES_NEXT_RELEASE entry should be provided for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed b41a18a