Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-252

XML POST method not working correctly because of wrong xml reader parsing

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • restconf-nb
    • None
    • Operating System: All
      Platform: All

    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            miroslav.kovac@pantheon.tech Miroslav Kovac
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: