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

Problem with HTTP operations on mounted devices

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • netconf
    • None
    • Operating System: All
      Platform: All

    • 6681

    Description

      Environment:
      branch master, stable/boron, beryllium-sr3
      feature-install odl-restconf-all odl-netconf-topology
      install https://github.com/opendaylight/netconf/blob/c0488b3e5a8d1bbe2894eda5eb1254f6ced347a4/restconf/sal-rest-connector/src/main/yang/instance-identifier-patch-module.yang to mounted device

      Invoke two consequent POSTs operations on server:
      POST http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont/my-list1/leaf1

      {
      "my-list2" :

      { "name": "name" }

      }

      then

      POST http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont/my-list1/leaf1

      {
      "my-list2" :

      { "name": "name-2" }

      }

      result:

      GET http://localhost:8181/restconf/config/instance-identifier-patch-module:patch-cont

      {
      "patch-cont": {
      "my-list1": [
      {
      "name": "leaf1",
      "my-list2": [

      { "name": "name" }

      ,

      { "name": "name-2" }

      ]
      }
      ]
      }
      }

      Invoke two consequent POST operations on mounted device:
      POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1/leaf1

      {
      "my-list2" :

      { "name": "name" }

      }

      then

      POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1/leaf1

      {
      "my-list2" :

      { "name": "name-2" }

      }

      result:

      GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont

      {
      "patch-cont": {
      "my-list1": [
      {
      "name": "leaf1",
      "my-list2": [

      { "name": "name-2" }

      ]
      }
      ]
      }
      }

      PROBLEM:
      On mounted device first inserted data is replaced by the second data.
      I expect the result to be the same as when operations are invoked on server because the data in the first and in the second request are not the same (data has different list key (name)).

      Next aspect of this bug is that existence check fails:

      Invoke this POST operation on mounted device two times:
      POST http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/device1/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1/leaf1

      {
      "my-list2" :

      { "name": "name" }

      }

      PROBLEM:
      Data already exists after invoking previous request for the first time. When invoking request for the second time I expect error "Data already exists for path..." but request is successful.
      Data exists check fails only in json, in xml it works.

      This bug blogs create, replace, merge and maybe delete/remove edit operations in YANG PATCH on mounted devices.

      Attachments

        Issue Links

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

          Activity

            People

              andrej.mak@pantheon.tech Andrej Mak
              ivan.hrasko@pantheon.tech Ivan Hrasko
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: