...
It's an assumption the list node cannot be a root level element, so the parent data node is always expected.
Addressing the List Node
TBD
Single node vs multiple nodes
...
On data conversion from String to DataNode object there is an intermediate stage of data being represented as
a NormalizedNode instance which is a Yang Tools library artifact.
The NormalizedNode represents the list node element as a single object. It means the data fragment which
represents the list element with multiple entries can be successfully converted into NormalizedNode.
However the subsequent NormalizedNode to DataNode conversion performed by CPS internal logic supports only
single DataNode object as top level element. The functionality of DataNodeBuilder require to be extended
in order to convert the list element data (fragment) into collection of DataNode objects
The JSON String to NormalizedNode conversion
then followed by NormalizedNode to DataNode conversion.
These data structures are different.
draw.io Diagram border false diagramName cps-list-node-transformation-diagram simpleViewer false width links auto tbstyle inline diagramDisplayName lbox false diagramWidth 741 revision 2
While list node element is a single node within a NormalizedNode structure, on transformation to DataNode
the original list node wrapper is omitted (as containing no actual data) and list elements became a nodes belonging
to upper level parent node.
In a context of a data fragment the single root level node became a collection of nodes after transformation,
so all the subsequent operations require to be performed using a collection of nodes, not the single one.
In current implementation the CPS conversion to DataNode always returns single node result even if multiple
data nodes were built. In order to support operations with list node elements (as single entity) the functionality
require to be updated (fixed).
RelatedCreated: Jira server ONAP JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 425b2b0a-557c-3c0c-b515-579789cceedb key CPS-358
...