-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add Merge-Patch Support Handling #1283
Conversation
When in For example, a payload like this {
"position": [
{
"type": "Property",
"value": [ 1, 2, 3 ],
"datasetId": "urn:ngsi-ld:this"
},
{
"type": "Property",
"value": [ 28, -104, 23 ],
"datasetId": "urn:ngsi-ld:that"
}
]
} Will send two copies of the Without further changes downstream, at the moment, the IoT Agent for JSON and IoT Agent for Ultralight will accept this as two sequential commands on the default |
Update expectation since merge-patch needs to retrieve lazy attributes as well.
This PR will close the remaining issues from #1259
|
| IOTA_LD_SUPPORT_NULL | `server.ldSupport.null` | | ||
| IOTA_LD_SUPPORT_DATASET_ID | `server.ldSupport.datasetId` | |
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.
Those parameters need to be documented
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 af14fde
@@ -363,6 +363,7 @@ function registerDevice(deviceObj, callback) { | |||
deviceObj.type = deviceData.type; | |||
deviceObj.staticAttributes = deviceData.staticAttributes; | |||
deviceObj.commands = deviceData.commands; | |||
deviceObj.lazy = deviceData.lazy; |
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.
Could you explain why you included this line and how it is related with functionalities implemented in this PR (merge patch)
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 is necessary to ensure that a lazy attribute may be merged-patched (see use on line lib/services/northBound/contextServer-NGSI-LD.js - 455)
CHANGES_NEXT_RELEASE entry is missing |
Fixed ce7746b |
@jason-fox please fix the small conflict in CHANGES_NEXT_RELEASE file so this PR becomes mergeable again. |
@jason-fox weirdly, test are failing
|
Co-authored-by: Fermín Galán Márquez <[email protected]>
@mapedraza this is because this PR predates #1302 which has just been merged, and therefore the updated 1.6.1 NGSI-LD registration is required when provisioning - fixed 8510ad2 |
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
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
merge-patch is an advanced operation which would be usefully supported by some robotics IoT Agents - e.g. ROS2, OPC-UA. This PR adds a new merge-patch handler and forwards NGSI-LD merge-patch requests to the handler as necessary.
Not all IoT Agents will need to support advanced services such as merge-patch, NGSI-LD null or datasetId, flags have been included to allow support for these payloads to be withdrawn.