[NETCONF-252] XML POST method not working correctly because of wrong xml reader parsing Created: 08/Aug/16  Updated: 15/Mar/19  Resolved: 10/Aug/16

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

Type: Bug
Reporter: Miroslav Kovac Assignee: Unassigned
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: 6359

 Description   

karaf installed features:
odl-restconf-all
odl-netconf-topology

When sending post request to create a mountpoint to some device
url:
http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf
and payload:

<node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
<node-id>new-netconf-device</node-id>
<host xmlns="urn:opendaylight:netconf-node-topology">127.0.0.1</host>
<port xmlns="urn:opendaylight:netconf-node-topology">17830</port>
<username xmlns="urn:opendaylight:netconf-node-topology">admin</username>
<password xmlns="urn:opendaylight:netconf-node-topology">admin</password>
<tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only>
<keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay>
</node>

readFrom function in XmlNormalizedNodeBodyReader class will parse to MapEntryNode and postDataViaTransaction in BrokerFacade class will submit the write transaction differently in compare to the request with same url and following payload:

{
"node":

{ "node-id": "new-netconf-device", "host": "0.0.0.0", "port": "9999", "username":"admin", "password":"admin", "tcp-only": "false" }

}

Which is same request in json but read from function in JsonNormalizedNodeBodyReader will parse this payload to MapNode.



 Comments   
Comment by Miroslav Kovac [ 10/Aug/16 ]

Fixed with other patch - https://git.opendaylight.org/gerrit/#/c/43316/1

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