This fixes the http error status 500 when trying to read
the whole mounted datastore using the new restconf
implementation based on RFC8040.
When serializing a NormalizedNode that represents
the data root we need to serialize only its children.
Change-Id: Ibd7bd71fe6f36674f62b9d974c85045c359cc6b1
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
boolean processedAsCompositeNode = false;
if (node instanceof ContainerNode) {
final ContainerNode n = (ContainerNode) node;
- if (!n.getNodeType().equals(ROOT_DATA_QNAME)) {
+ if (!n.getNodeType().withoutRevision().equals(ROOT_DATA_QNAME)) {
if (writer instanceof NormalizedNodeStreamAttributeWriter) {
((NormalizedNodeStreamAttributeWriter) writer).startContainerNode(
n.getIdentifier(), childSizeHint(n.getValue()), n.getAttributes());