Possible bug in Core-metadata / EdgeX C SDK file metadata.c function edgex_metadata_client_add_or_modify_device() #77
Closed
satyam1990
started this conversation in
General
Replies: 2 comments
-
Yes, it looks like the add-or-modify function hasn't been updated to fully take into account the move to a multiple-object call at that endpoint. Please file an issue against device-sdk-c |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks @iain-anderson . Raised bug request for the same. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The function edgex_metadata_client_add_or_modify_device() does not works as expected. Reason stated below:
This function is supposed to add or update an existing device in core-metadata. But the function is unable to update device, reason being.
First in this function createdevice request is sent to core-metadata and it is assumed that if device already exists core-metadata will send HTTP 409, as written in metadata.c:
But I could see core-metadata instead returns HTTP 207 Multi-Status. But if one looks at HTTP Response Text it is something as below:
Due to this above if check never returns true and PATCH request is never initiated.
Hence, either we need to
EdgeX foundry version I am using is: 2.1.1
EdgeX C SDK I am using is: 2.2.0
For now I have modified C SDK to make things work but I guess it would be better if edgeX team can incorporate the fix if not already done.
Please do let me know if i need to raise a bug request for the same.
Beta Was this translation helpful? Give feedback.
All reactions