[NETCONF-794] RESTCONF provide wrong DOMDataTreeIdentifier path for Actions when is invoke Created: 27/Jul/21 Updated: 06/Aug/21 Resolved: 06/Aug/21 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Peter Suna | Assignee: | Ivan Hrasko |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When Action is invoked through RESTCONF, it will provide wrong DOMDataTreeIdentifier path for specific Action. This path will point to the parent of called Action. https://github.com/opendaylight/mdsal/blob/master/dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/DOMRpcRouter.java#L546 path = DOMDataTreeIdentifier{datastore=OPERATIONAL, root=/(instance:identifier:module?revision=2014-01-17)cont/cont1} Registered implementation key is: |
| Comments |
| Comment by Ivan Hrasko [ 05/Aug/21 ] |
|
According to javadoc of org.opendaylight.mdsal.dom.api.DOMActionService#invokeAction In the next iteration of test patch we were able to register and invoke the Reset action. org.opendaylight.yangtools.yang.binding.Action#invoke and DOMActionResult expected by: There are two possibilities: org.opendaylight.restconf.nb.rfc8040.rests.utils.ActionResultFactory 2. we have to rework org.opendaylight.yangtools.yang.binding.Action class |
| Comment by Ivan Hrasko [ 06/Aug/21 ] |
|
In the third iteration of test we have found a way how to translate RpcResult into DOMActionResult using codec. It a responsibility of action implementation to do so. |
| Comment by Ivan Hrasko [ 06/Aug/21 ] |
|
During testing we have found only issue that exception is thrown when action output is empty. This behavior is not according to RFC 8040 which states that in case of rpc/action with no output response with status code 204 and empty body should be returned without any errors. |
| Comment by Ivan Hrasko [ 06/Aug/21 ] |
|
This bug is invalid. We have created another one for the problem when action has no output: https://jira.opendaylight.org/browse/NETCONF-799. |