[NETCONF-205] PATCH with "target":"/" error Created: 19/May/16 Updated: 15/Mar/19 Resolved: 05/Aug/16 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Vratko Polak | Assignee: | Ivan Hrasko |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 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 |
| Comments |
| Comment by Ivan Hrasko [ 25/May/16 ] |
|
Patch: https://git.opendaylight.org/gerrit/#/c/39361/ |
| Comment by Ivan Hrasko [ 25/May/16 ] |
|
(In reply to Ivan Hrasko from comment #1) The above does not belong to this bug. |
| Comment by Abbas P Pareedkunju [ 31/May/16 ] |
|
On the latest build it seems working fine. Am I running it in the right way? opendaylight-user@root>shell:exec 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"}]}}}]}' localhost:8080/restconf/config/car:cars ;echo opendaylight-user@root> |
| Comment by Vratko Polak [ 31/May/16 ] |
|
This is how distribution-karaf-0.4.3-20160531.093344-196.zip behaves for me: opendaylight-user@root>feature:install odl-restconf odl-clustering-test-app ]}}}]}' localhost:8080/restconf/config/car:cars ;echo |
| Comment by Ivan Hrasko [ 29/Jun/16 ] |
| Comment by Ivan Hrasko [ 11/Jul/16 ] |
|
Needs to be adapted also for XML |
| Comment by Ivan Hrasko [ 18/Jul/16 ] |
|
adapted for both json and xml: |
| Comment by Ivan Hrasko [ 19/Jul/16 ] |
|
Merged to Be, needs port to Boron. |
| Comment by Ivan Hrasko [ 27/Jul/16 ] |
|
Cherry pick to Boron old Restconf: |
| Comment by Ivan Hrasko [ 29/Jul/16 ] |
|
Cherry pick merged to Boron. |
| Comment by Ivan Hrasko [ 05/Aug/16 ] |
|
patch for new restconf has been merged to master: |