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

Error writing values with XML YANG Patch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 5.0.1
    • None
    • restconf-nb

      Invoking YANG Patch with XML payload (PATCH http://192.168.56.25:8181/rests/data/network-topology:network-topology/topology=topology-netconf/node=17830-sim-device/yang-ext:mount/instance-identifier-patch-module:patch-cont/my-list1=leaf1):

      <yang-patch xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-patch">
      <patch-id>test-patch</patch-id>
      <comment>this is test patch</comment>
      <edit>
          <edit-id>edit1</edit-id>
          <operation>replace</operation>
          <target>/my-leaf11</target>
          <value>
              <my-leaf11>my-leaf11 :: XML value</my-leaf11>
          </value>
      </edit>
      </yang-patch> 

      Results in error and leaf value is not written:

      {
        "errors": {
          "error": [
            {
              "error-tag": "malformed-message",
              "error-message": "Error parsing input: null",
              "error-type": "protocol"
            }
          ]
        }
      }

      Corresponding payload in JSON works.

            PeterSuna Peter Suna
            PeterSuna Peter Suna
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: