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

PATCH merge operation does nothing

    XMLWordPrintable

Details

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

    • 5897

    Description

      This is a Beryllium bug, similar to NETCONF-185. Here is what happens when launching curl commands from Bash (ODL has odl-restconf and odl-clustering-test-app features installed).

      $ curl -u'admin:admin' -X PATCH -H "Content-Type:application/yang.patch+json" -d '{"ietf-restconf:yang-patch":{"patch-id":"0","edit":[{"edit-id":"0","operation":"replace","target":"/car:car-entry[car:id='"'"'0'"'"']","value":{"car:car-entry":[

      {"id":"0"}

      ]}}]}' 127.0.0.1:8181/restconf/config/car:cars ;echo

      {"ietf-yang-patch:yang-patch-status":{"patch-id":"0","ok":null}}

      $ curl -u'admin:admin' 127.0.0.1:8181/restconf/config/car:cars ;echo

      {"cars":{"car-entry":[

      {"id":"0"}

      ]}}

      $ curl -u'admin:admin' -X PATCH -H "Content-Type:application/yang.patch+json" -d '{"ietf-restconf:yang-patch":{"patch-id":"0","edit":[{"edit-id":"0","operation":"merge","target":"/car:car-entry[car:id='"'"'1'"'"']","value":{"car:car-entry":[

      {"id":"1"}

      ]}}]}' 127.0.0.1:8181/restconf/config/car:cars ;echo

      {"ietf-yang-patch:yang-patch-status":{"patch-id":"0","ok":null}}

      $ curl -u'admin:admin' 127.0.0.1:8181/restconf/config/car:cars ;echo

      {"cars":{"car-entry":[

      {"id":"0"}

      ]}}

      I was expecting both

      {"id":"1"}

      and

      {"id":"0"}

      entries to be present in the final GET response.

      Attachments

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

        Activity

          People

            ivan.hrasko@pantheon.tech Ivan Hrasko
            vrpolak Vratko Polak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: