Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-431

Yang Data Codec Gson: null pointer exception when trying to deserialize leafref value

    XMLWordPrintable

Details

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

    • 2894

    Description

      When trying to call Rpc with input that has extended types referencing leafref nodes from another module, parsing of Json fails with null pointer exception.

      example model:
      (nt is network-topology module)
      leaf node

      { mandatory true; type nt:node-ref; description "Network node end point."; }

      leaf-list supporting-tp

      { type nt:tp-ref; description "List of termination points that support end point TP. If forwarding adjacency announcement triggers termination point creation, this list is used to fill tp-ref attribute."; }

      leaf tp-id

      { type nt:tp-id; description "Forwarding adjacency interface unique identifier. If forwarding adjacency announcement triggers termination point creation, this id is used for TP creation."; }

      Bug can be reproduced by calling this rpc from topoproccessing project: http://127.0.0.1:8181/restconf/operations/multilayer-topology:forwarding-adj-announce

      input:
      {
      "input": {
      "head-end":

      { "node": "A", "supporting-tp": [ "/network-topology/topology[topology-id='TOPO']/node[node-id='1']/termination-point[network-topology:tp-id='1:3']" ], "tp-id": "A:1" }

      ,
      "tail-end":

      { "node": "B", "supporting-tp": [ "/network-topology/topology[topology-id='TOPO']/node[node-id='2']/termination-point[network-topology:tp-id='2:3']" ], "tp-id": "B:1" }

      ,
      "bidirectional" : {}
      }
      }

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jhajnar@cisco.com Jan Hajnar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: