Details
-
Story
-
Status: Closed
-
Low
-
Resolution: Done
-
None
-
None
Description
One anchor could support more then one data tree instance using different independent models provided in the schema-set for that anchor.
This study needs to clarify what we already support or not. It might affect existing api methods
- Currently it is possible to create a seconds instance tree under the same anchor assuming there is a second model.
- most crud operations will works on multiple tree instance with the exception of operation on the anchor 'root'
- get anchor 'root' uses an API that returns only one DataRoot so it needs special consideration (maybe separate REST and Java API methods)
Additional Info from CPS-139:
The YANG specification allows multiple containers (lists etc) to be defined on a module's top level, however the eligible JSON data (having corresponding data sets) is not accepted. When data is parsed using YangUtils.parseJsonData(...) the exception like below occurs
org.opendaylight.yangtools.yang.data.impl.schema.ResultAlreadySetException: Normalized Node result was already set. at org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult.setResult(NormalizedNodeResult.java:39) at org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResultBuilder.addChild(NormalizedNodeResultBuilder.java:57) at org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNormalizedNodeStreamWriter.writeChild(ImmutableNormalizedNodeStreamWriter.java:305) at org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNormalizedNodeStreamWriter.endNode(ImmutableNormalizedNodeStreamWriter.java:283) at org.opendaylight.yangtools.yang.data.util.ContainerNodeDataWithSchema.write(ContainerNodeDataWithSchema.java:37) at org.opendaylight.yangtools.yang.data.util.CompositeNodeDataWithSchema.write(CompositeNodeDataWithSchema.java:273) at org.opendaylight.yangtools.yang.data.util.AbstractNodeDataWithSchema.write(AbstractNodeDataWithSchema.java:74) at org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream.parse(JsonParserStream.java:170) at org.onap.cps.utils.YangUtils.parseJsonData(YangUtils.java:73) ...
The data limitation by single top-level data node (despite it matches the model definition) seems artificial and not justified.
Note:
Please consider the Notification feature when evaluating this feature. https://wiki.onap.org/x/54IEBw
Attachments
Issue Links
- duplicates
-
CPS-139 Support multiple top-level data nodes when parsing JSON
-
- Closed
-
- relates to
-
CPS-1391 Impact analysis on CPS core API's due to changes of CPS-341
-
- Closed
-
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...