[NETCONF-366] Output-less RPCs should either return output element or status code 204 Created: 09/Mar/17  Updated: 02/Apr/19  Resolved: 02/Apr/19

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Vratko Polak Assignee: Jakub Morvay
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7941

 Description   

This is a more specific description of the "output" part of NETCONF-361.

Since YANGTOOLS-663 Carbon internally treats Yang modelled RPCs without output statement as containing an empty output statement.

This should be affecting what the Restconf response looks like.
In Boron-SR2, the Restconf POST to such an RPC-modeled URL returns no text reponse (a zero-length string) with HTTP status code 200 (which is wrong, it should be 204, not sure if that has a Bug open).
But after NETCONF-361, the response (for Accept headers implying JSON) should be '{"output":{}}' (without single quotes) and HTTP status code 200.

Currently, Carbon snapshot builds show [0][1] Boron-SR2 behavior.

It is probably too late in the release cycle for changing Carbon behavior (some CSIT tests may be relying on response text and/or status code), so I guess the best thing to do is to document that the Boron-SR2 behavior is kept in Carbon, but it will be fixed in Nitrogen.

[0] https://logs.opendaylight.org/releng/jenkins092/controller-csit-3node-clustering-only-carbon/604/archives/log.html.gz#s1-s8-t2-k2-k4-k7-k1
[1] https://logs.opendaylight.org/releng/jenkins092/controller-csit-3node-clustering-only-carbon/604/archives/log.html.gz#s1-s8-t2-k2-k4-k7-k2


Generated at Wed Feb 07 20:14:50 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.