Fixed reading whole list/leaf-list using GET/GET-CONFIG RPC 21/94921/7
authorJaroslav Tóth <jtoth@frinx.io>
Mon, 25 Jan 2021 15:00:20 +0000 (16:00 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 21 Feb 2021 17:19:19 +0000 (17:19 +0000)
commit16e3af45bd9aa72f448e1de29c7336f35422ec45
tree5c6cf91230adc11814a9ae8498c912fb6f578e63
parent923eeb7535a4998375bbc94bc8a1855d0f99ec0b
Fixed reading whole list/leaf-list using GET/GET-CONFIG RPC

- The source of the issue was in skipping of empty list/leaf-list
  nodes in XMLStreamNormalizedNodeStreamWriter - the NETCONF
  filter structure was created correctly, but it wasn't correctly
  serialized into XML. However, in NETCONF, it is valid to read
  whole list/leaf-list - we must be able to build NormalizedNode
  structure from subtree-filter which "ends" by list/leaf-list.
- Fixed by introduction EmptyListXmlWriter which is responsible
  for serialization of empty list/leaf-list. Other operations
  are delegated to XMLStreamNormalizedNodeStreamWriter
  implementation.

JIRA: NETCONF-744
Change-Id: Id4b665aa45a397ab25a53e12f4eb7c1a6539d428
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/EmptyListXmlWriter.java [new file with mode: 0644]
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/NetconfUtil.java
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/StreamingContext.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/schema/mapping/NetconfMessageTransformerTest.java