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

PATCH with "target":"/" error

    XMLWordPrintable

Details

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

    • 5915

    Description

      Beryllium bug, this is what happens when attempting to replace the whole car:cars container:

      $ 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":"/","value":{"car:cars":{"car-entry":[

      {"id":"0"}

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

      {"errors":{"error":[{"error-type":"protocol","error-tag":"malformed-message","error-message":"Error parsing json input: Could not parse Instance Identifier '/car:cars/'. Offset: 10 : Reason: Identifier cannot end with '/'.","error-info":"java.lang.IllegalArgumentException: Could not parse Instance Identifier '/car:cars/'. Offset: 10 : Reason: Identifier cannot end with '/'.\n\tat com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)\n\tat org.opendaylight.yangtools.yang.data.util.XpathStringParsingPathArgumentBuilder.checkValid(XpathStringParsingPathArgumentBuilder.java:255)\n
      (and so on)

      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:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: