-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fix/explicit attributes true: just measures in active attrs and active attrs with expressions #1355
Fix/explicit attributes true: just measures in active attrs and active attrs with expressions #1355
Conversation
AlvaroVega
commented
Apr 28, 2023
•
edited
Loading
edited
- Add more tests about explicitAttributes: true
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.
LGTM
…ctive_attrs_and_active_attrs_with_expressions
@@ -1,2 +1,3 @@ | |||
- Fix: explicitAttributes true case: should progress just active attributes which receives measures and all active attributes with expressions |
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.
This behaviour match the one described in documentation?
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.
According to this:
iotagent-node-lib/doc/advanced-topics.md
Lines 301 to 309 in ea48c80
### Explicitly defined attributes (explicitAttrs) | |
If a given measure element (object_id) is not defined in the mappings of the device or group provision, the measure is | |
stored in the Context Broker by adding a new attribute to the entity with the same name of the undefined measure | |
element. By adding the field `explicitAttrs` with `true` value to device or group provision, the IoTAgent rejects the | |
measure elements that are not defined in the mappings of device or group provision, persisting only the one defined in | |
the mappings of the provision. If `explicitAttrs` is provided both at device and group level, the device level takes | |
precedence. Additionally `explicitAttrs` can be used to define which meassures (identified by their attribute names, not | |
by their object_id) defined in JSON/JEXL array will be propagated to NGSI interface. |
the IoTAgent rejects the measure elements that are not defined in the mappings of device or group provision
From my perspective, yes, it involves that case (since they are defined in the provision)
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.
Case 2:
"explicitAttrs": true
just measures defined in active, static (plus conditionally TimeInstant) will be propagated to NGSI interface.
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.
So, no further changes required in the documentation
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.
NTC
…ctive_attrs_and_active_attrs_with_expressions
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.
LGTM