Do not serialize the unchanged for child-nodes-only 74/107774/2
authorSangwook Ha <sangwook.ha@verizon.com>
Fri, 8 Sep 2023 15:52:54 +0000 (08:52 -0700)
committerRobert Varga <nite@hq.sk>
Sun, 10 Sep 2023 14:44:17 +0000 (14:44 +0000)
commit263f663751686d091b7792414d885439938e1d8d
treef48c18088e42d602f327235f47a06f03fde52c6e
parent13f1786f2b40fb032b31f424d5c9c70d94845520
Do not serialize the unchanged for child-nodes-only

Subscribing data change notification with the child-nodes-only mode may
generate notifications with unnecessary data change events for the list
key nodes in the data path.

Serialize only data tree nodes with effective changes. This filters out
unnecessary data change events and prevents notification of data updates
without any real changes.

Also, add missing test cases for the child-nodes-only mode.

JIRA: NETCONF-1153
Change-Id: I2ed388ee2e5c364a96240d8b5a519651cf2f5b47
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/AbstractWebsocketSerializer.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/ListenerAdapterTest.java
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-create.json [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-create.xml [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-delete.json [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-delete.xml [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-update1.json [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-update1.xml [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-update2.json [new file with mode: 0644]
restconf/restconf-nb/src/test/resources/listener-adapter-test/notif-child-nodes-only-update2.xml [new file with mode: 0644]