Add mixed mode#947
Conversation
|
Includes the usual Documentation and Unit Test Changes and appropriate code coverage. Before reviewing, I'd suggest actioning #943 first so the builds aren't queuing on Travis for hours before each suggested change. I think Travis is also causing the timeout of one test. |
Done. Please sync the PR with master to get the changes. |
| | `explicitAttrs` | `explicitAttrs` | Boolean value to support selective ignore of measures for device so that IOTA doesn’t progress. If not specified default is false. | `true/false` | | ||
|
|
||
| | `explicitAttrs` | `explicitAttrs` | Boolean value to support selective ignore of measures for device so that IOTA doesn’t progress. If not specified default is `false`. | `true/false` | | ||
| | `ngsiVersion` | `ngsiVersion` | optional string value used in mixed mode to switch between **NGSI-v2** and **NGSI-LD**payloads. The default is `v2`. | `v2/ld/mixed` | |
| | `explicitAttrs` | `explicitAttrs` | optional boolean value, to support selective ignore of measures so that IOTA doesn’t progress. If not specified default is false. | | ||
| | `expressionLanguage` | `expresionLanguage` | optional boolean value, to set expression language used to compute expressions, possible values are: legacy or jexl. When not set or wrongly set, `legacy` is used as default value. | | ||
| | `explicitAttrs` | `explicitAttrs` | optional boolean value, to support selective ignore of measures so that IOTA doesn’t progress. If not specified default is `false`. | | ||
| | `ngsiVersion` | `ngsiVersion` | optional string value used in mixed mode to switch between **NGSI-v2** and **NGSI-LD** payloads. The default is `v2`. |
There was a problem hiding this comment.
I'd suggest to enumerate the possible values this field can take.
There was a problem hiding this comment.
In addition, I'd suggest to add the following:
If IOTA doesn't run in mixed mode, then this field is ignored.
If I have understood correctly what mixed mode means :)
| } | ||
| ``` | ||
|
|
||
| - If you want to support a "mixed" mode with both **NGSI-v2** and **NGSI-LD** (experimental): |
There was a problem hiding this comment.
I'd suggest to add an explanation of what mixed mode means. For instance:
In mixed mode the NGSI version to use is chosen at group or device provisioning time, instead of using an static setting for that. The
ngsiVersionfield in the provisioning API is used to specify this, at both group at device level (the device level overriding the group setting).
It is just an example, it can be improved, of course.
| | `expressionLanguage` | `expresionLanguage` | optional boolean value, to set expression language used to compute expressions, possible values are: legacy or jexl. When not set or wrongly set, legacy is used as default value. | | ||
| | `explicitAttrs` | `explicitAttrs` | Boolean value to support selective ignore of measures for device so that IOTA doesn’t progress. If not specified default is false. | `true/false` | | ||
| | `explicitAttrs` | `explicitAttrs` | Boolean value to support selective ignore of measures for device so that IOTA doesn’t progress. If not specified default is `false`. | `true/false` | | ||
| | `ngsiVersion` | `ngsiVersion` | optional string value used in mixed mode to switch between **NGSI-v2** and **NGSI-LD**payloads. The default is `v2`. | `v2/ld/mixed` | |
There was a problem hiding this comment.
I see v2/ld/mixed as possible values. However, what does "mixed" means in this API? Or maybe it's a typo and only "v2/ld" are possible?
| | `expressionLanguage` | `expresionLanguage` | optional boolean value, to set expression language used to compute expressions, possible values are: legacy or jexl. When not set or wrongly set, legacy is used as default value. | | ||
| | `explicitAttrs` | `explicitAttrs` | Boolean value to support selective ignore of measures for device so that IOTA doesn’t progress. If not specified default is false. | `true/false` | | ||
| | `explicitAttrs` | `explicitAttrs` | Boolean value to support selective ignore of measures for device so that IOTA doesn’t progress. If not specified default is `false`. | `true/false` | | ||
| | `ngsiVersion` | `ngsiVersion` | optional string value used in mixed mode to switch between **NGSI-v2** and **NGSI-LD**payloads. The default is `v2`. | `v2/ld`. | |
There was a problem hiding this comment.
As we did with the device API I think "When not running in mixed mode, this field is ignored." should be added here.
| @@ -90,8 +90,9 @@ correspondence between the API resource fields and the same fields in the databa | |||
| | `attributes` | `attributes` | list of common active attributes of the device. For each attribute, its `name` and `type` must be provided, additional `metadata` is optional. | | |||
There was a problem hiding this comment.
I'd suggest to add the mixed mode to the NGSI-LD feature sublist in CHANGES_NEXT_RELEASE. I mean:
Add basic NGSI-LD support as experimental feature (#842)
...
- Commands
- Mixed mode (based in ngsiVersion field in the provisioning API)

This PR adds an additional "mixed" mode to the IoT Agent.