Table of Contents:
Addresses:
Investigation into (long and short term) feasibility options for CPS Dta updates. Some possibilities like:
Options 4 and 1 seem the easiest to implement?! Option 3 was mentioned by the E2E slicing team but I suspect it to be harder and require a further break down of the Yang-Path ‘language’ features Out of scope: Validation. The intention is that validation will be handled later using separate study/epic/user stories as required |
Parsing and validation of data fragment
Problem description
Initial implementation of data insertion expects full data tree to be provided as input then it's being validated and parsed
versus root defined model starting from top level defined container element. The root element of a model is determined
automatically with no extra action required.
When not full data tree but just a fragment is passed as input the validation and subsequent arsing of the data fails
because the structure of data no longer matches the model (if compared from roots).
Solution proposal
ODL Yang Tools library provides an option to define a point within a model which will be used as root when data is validated
and parsed. It requires an appropriate DataSchemaNode
instance to be provided to JsonParserStream
instance as a root point.
It assumes the implementation/update of a following logic:
- Extracting the DataSchemaNode (from SchemaContext) matching the xpath requested
- Update the YangUtils.parseJsonData(..) method to utilize additional input
- Update the DataNodeBuilder logic to accept non-empty xpath when building data from NormalizedNode instance