Filter non-standard nodes from NETCONF monitoring schemas 50/101850/5
authorSangwook Ha <sangwook.ha@verizon.com>
Thu, 14 Jul 2022 08:03:54 +0000 (01:03 -0700)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 17 Jul 2022 22:15:14 +0000 (00:15 +0200)
commitc3d40c5e4485e95b9307fcdff1833ca1568f9321
treee5e0789b54e238dbb236aa420cf259a5b40fcea1
parent257e446be87818dab8f29a5286f2694fc718b4a6
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>
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]