Filter non-standard nodes from NETCONF monitoring schemas 58/101858/1
authorSangwook Ha <sangwook.ha@verizon.com>
Thu, 14 Jul 2022 08:03:54 +0000 (01:03 -0700)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 18 Jul 2022 20:25:41 +0000 (22:25 +0200)
commitdaa1a43cd6e599e31dfe1d0f419baf386aa1017d
tree6a14939aa60f8e477b9e027c2d29a75413f9b8ef
parenta8e6a17e0048863bec61dfe225598d55c5d5dc05
Filter non-standard nodes from NETCONF monitoring schemas

Some NETCONF servers use augmented netconf-monitoring schema and
controller fails to parse XML with strict parsing requirement.

Add a filtering function based on the namespace of the XML node,
and filter out any node not in the netconf-monitoring namespace to
prevent parsing failure.

JIRA: NETCONF-881
Change-Id: I93b7da0baf00de59613d970fd4ec89e47eb26e58
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c3d40c5e4485e95b9307fcdff1833ca1568f9321)
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/NetconfStateSchemas.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/NC881Test.java [new file with mode: 0644]
netconf/sal-netconf-connector/src/test/resources/nc881/netconf-state-filtered.xml [new file with mode: 0644]
netconf/sal-netconf-connector/src/test/resources/nc881/netconf-state.xml [new file with mode: 0644]