[NETCONF-497] Json restconf responses does not prepend module name at top level Created: 16/Jan/18 Updated: 16/Jan/19 Resolved: 16/Jan/19 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | Fluorine, Neon, Fluorine SR1 |
| Fix Version/s: | Neon, Fluorine SR2 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Vratko Polak | Assignee: | Tomas Cere |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
manual testing |
||
| Issue Links: |
|
||||||||
| Description |
|
RFC 8040 refers [0] to RFC 7951 which states: Note that ODL already requires the module name in input (PUT, POST, input part of RPC) but this bug is about ODL not prefixing the module name in output (GET, output part of RPC). But examples in RFCs clearly show the MUST also applies on output. To reproduce (on Nitrogen snapshot), start ODL, install odl-restconf and odl-netconf-topology, then: Current: $ curl -u admin:admin http://127.0.0.1:8181/restconf/config/network-topology:network-topology ;echo {"network-topology":{"topology":[{"topology-id":"topology-netconf"}]}} $ curl -u admin:admin http://127.0.0.1:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf ;echo {"topology":[{"topology-id":"topology-netconf"}]} Expected: $ curl -u admin:admin http://127.0.0.1:8181/restconf/config/network-topology:network-topology ;echo {"network-topology:network-topology":{"topology":[{"topology-id":"topology-netconf"}]}} $ curl -u admin:admin http://127.0.0.1:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf ;echo {"network-topology:topology":[{"topology-id":"topology-netconf"}]} The same behavior is present both on draft02 and draft18 (URLs are different) and on Oxygen snapshots. This seems to be an old bug, as Draft 02 [1] examples also do contain the prefix, but even old ODL test data [2] do not expect the prefix. [0] https://tools.ietf.org/html/rfc8040#section-11.3.2 |
| Comments |
| Comment by OpenDaylight Release [ 03/May/18 ] |
|
Since the bug is unassigned I'm currently assigning it to you. Please assign to the relevant person. |
| Comment by Robert Varga [ 28/Aug/18 ] |
|
JakubToth any update on this? |
| Comment by Attila Flach [ 03/Jan/19 ] |
|
JakubToth, rovarga - I am also interested to know the progress on this, it is clearly a problem that ODL does not compy with RFC7951. Are there any commits available to be tested? |