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

Unnecessary data change events for child-nodes-only

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 7.0.0, 6.0.4
    • 6.0.3
    • restconf-nb
    • None

      When subscribing data change notification with the child-nodes-only mode, the notification includes unnecessary data change events for the list key nodes in the data path.

      For example, when the keepalive-delay value of a NETCONF node is updated with the following PUT request

      PUT /rests/data/network-topology:network-topology/topology=topology-netconf/node=netconf-mdsal1/netconf-node-topology:keepalive-delay
      
      {
          "netconf-node-topology:keepalive-delay": 180
      }
      

      A notification message like this is generated:

      {
        "urn-ietf-params-xml-ns-netconf-notification-1.0:notification": {
          "event-time": "2023-09-08T18:12:43.16825253Z",
          "urn-opendaylight-params-xml-ns-yang-controller-md-sal-remote:data-changed-notification": {
            "data-change-event": [
              {
                "path": "/urn-TBD-params-xml-ns-yang-network-topology:network-topology/urn-TBD-params-xml-ns-yang-network-topology:topology/urn-TBD-params-xml-ns-yang-network-topology:topology[urn-TBD-params-xml-ns-yang-network-topology:topology-id='topology-netconf']/urn-TBD-params-xml-ns-yang-network-topology:topology-id",
                "data": {
                  "network-topology:topology-id": "topology-netconf"
                },
                "operation": "updated"
              },
              {
                "path": "/urn-TBD-params-xml-ns-yang-network-topology:network-topology/urn-TBD-params-xml-ns-yang-network-topology:topology/urn-TBD-params-xml-ns-yang-network-topology:topology[urn-TBD-params-xml-ns-yang-network-topology:topology-id='topology-netconf']/urn-TBD-params-xml-ns-yang-network-topology:node/urn-TBD-params-xml-ns-yang-network-topology:node[urn-TBD-params-xml-ns-yang-network-topology:node-id='netconf-mdsal1']/urn-opendaylight-netconf-node-topology:keepalive-delay",
                "data": {
                  "netconf-node-topology:keepalive-delay": 180
                },
                "operation": "updated"
              },
              {
                "path": "/urn-TBD-params-xml-ns-yang-network-topology:network-topology/urn-TBD-params-xml-ns-yang-network-topology:topology/urn-TBD-params-xml-ns-yang-network-topology:topology[urn-TBD-params-xml-ns-yang-network-topology:topology-id='topology-netconf']/urn-TBD-params-xml-ns-yang-network-topology:node/urn-TBD-params-xml-ns-yang-network-topology:node[urn-TBD-params-xml-ns-yang-network-topology:node-id='netconf-mdsal1']/urn-TBD-params-xml-ns-yang-network-topology:node-id",
                "data": {
                  "network-topology:node-id": "netconf-mdsal1"
                },
                "operation": "updated"
              }
            ]
          }
        }
      }
      

      Note that there are data change events for topology-id & node-id, which are the key nodes of topology & node, respectively, in addition to keepalive-delay.

      This is quite confusing and makes it harder to understand what has changed.

            sangwookha Sangwook Ha
            sangwookha Sangwook Ha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: