[NETCONF-1153] Unnecessary data change events for child-nodes-only Created: 08/Sep/23 Updated: 19/Sep/23 Resolved: 19/Sep/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | 6.0.3 |
| Fix Version/s: | 7.0.0, 6.0.4 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Sangwook Ha | Assignee: | Sangwook Ha |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
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. |
| Comments |
| Comment by Sangwook Ha [ 09/Sep/23 ] |
|
The way child-nodes-only mode works is interesting because data-change-event depends on how the data tree is updated or what is stored in the data tree. |