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

YANG Patch target parsing does not work with RFC8072 examples

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 2.0.3, 1.13.5
    • restconf-nb

    Description

      A very simple invocation following RFC8072 examples:

       

      curl -u admin:admin -X PATCH http://localhost:8181/rests/data/network-topology:network-topology/topology=topology-netconf -H "Content-Type: application/yang-patch+json" -H "Accept: application/yang-data+json" -v --data '
      {
         "ietf-yang-patch:yang-patch" : {
            "edit" : [
               {
                  "edit-id" : "test-edit",
                  "operation" : "create",
                  "target" : "/node=test-node",
                  "value" : {
                     "node" : [
                        {
                           "netconf-node-topology:host" : "127.0.0.1",
                           "netconf-node-topology:keepalive-delay" : 0,
                           "netconf-node-topology:password" : "topsecret",
                           "netconf-node-topology:port" : 17830,
                           "netconf-node-topology:tcp-only" : false,
                           "netconf-node-topology:username" : "admin",
                           "node-id" : "test-node"
                        }
                     ]
                  }
               }
            ],
            "patch-id" : "test"
         }
      }'
      

      results in a 400 bad request:

      * Mark bundle as not supporting multiuse
      < HTTP/1.1 400 Bad Request
      < Set-Cookie: JSESSIONID=node0ttrvzsoy0jfmbgck6vo7hinq0.node0; Path=/; HttpOnly
      < Expires: Thu, 01 Jan 1970 00:00:00 GMT
      < Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 12-Aug-2021 14:42:43 GMT; SameSite=lax
      < Content-Type: application/yang-data+json
      < Content-Length: 189
      <  
      * Connection #0 to host localhost left intact
      {"errors":{"error":[{"error-tag":"malformed-message","error-info":"Failed to lookup prefix ","error-message":"Error parsing json input: Failed to lookup prefix ","error-type":"protocol"}]}}
      

       

      Attachments

        Issue Links

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

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: