09-09-2020 02:15 AM
Is the difference in behaviour on these two restconf requests intended?
Platform is NSO 4.7.x
The first will produce 500 Internal Server - the latter works as expected.
{ "ietf-yang-patch:yang-patch":{ "patch-id":"deleteitnowplease", "edit":[ { "operation":"delete", "target":"/loopback-service:loopback-service=test1242", "edit-id":"remove-test" } ] } }
{ "ietf-yang-patch:yang-patch":{ "patch-id":"deleteitnowplease", "edit":[ { "edit-id":"remove-test", "operation":"delete",
"target":"/loopback-service:loopback-service=test1242", } ] } }
09-09-2020 06:49 AM
If you are below 4.7.4.1 they did have an error that produced the 500 response.
- restconf: Corrected the body format of yang-patch-status response
message in success cases.
(ENG-20606, RT:36346, PS-31425)
https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-response/td-p/3900972
09-09-2020 07:04 AM
Both 4.7.7.4 and 4.7.7.6 gives me error 500
09-16-2020 06:52 AM
This seems to be a bug actually. I have created an internal ticket for it.
Specifically, JSON encoding of lists [0] states that:
Unlike the XML encoding, where list keys are required to precede any other siblings within a list entry and appear in the order specified by the data model, the order of members in a JSON-encoded list entry is arbitrary because JSON objects are fundamentally unordered collections of members.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide