Table of Contents |
---|
References
Jira server ONAP Jira serverId 425b2b0a-557c-3c0c-b515-579789cceedb key CPS-1301 - Sample Yang Module: https://github.com/YangModels/yang/blob/main/vendor/cisco/xr/534/ietf-inet-types.
...
- yan
- PoC by Toine Siebelink to insert prefixes based on schemaContext (ODL Model): https://gerrit.nordix.org/c/onap/cps/+/15553
...
Assumptions
# | Assumption | Notes |
---|---|---|
1 | Sample (wanted) output of: /module1:A/B/module2:C/D | See also decision #3 |
2 | Prefix can be |
inserted before each container but this is optional | See RFC... |
Issues & Decisions
# | Issue | Notes | Decision | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Performance issue with current solution | Current solution used inefficient query to populate (first) prefix property for ALL fragments although only used for top level | Will be handled by separate Jira already in progress, see
| ||||||||||||
2 | Top level container is not always defined in first module | This might not be required as the first short-term solution is delivered first | Will be handled by separate Jira
| ||||||||||||
3 | Add prefix for container in same module | This is allowed but not done normally. Team concerned about performance issues and impact on URLs when using this | |||||||||||||
4 | Add prefix to first container whe when this is not the top level for the module it is defined | Image A and B and C are defined in module with prefix X: so full path to C X:/A/B/C however it is possible to retrieve B or C directly (without parent), in that case should teh the prefix stil be use used ie. XModule1:/B/C | |||||||||||||
5 | Insert prefix or name (, or last token of namespace) | See sample from https://github.com/YangModels/yang/blob/main/vendor/cisco/xr/534/ietf-inet-types.yang
(Unfortunately in above example module name and last token of namespace are the same, not sure if this just convention or mandatory CPS Team (made-up) example
| Ahila P to check RFC to find out what is required | ||||||||||||
6 | Prefix for (additional) leaves that are defined in a separate module then the container itself | Required, not sure how common this is. DB Solution for this might be quite difficult. Toine's POC should handle it (to be tested) | |||||||||||||
7 | How to handle lists (instead of container) | Possibly ignore [@key=value] part. Small neglectable change of same model defined both under same parent... Toine's Poc can be modified to handle this with help from establish regular-expressions from other use cases | |||||||||||||
8 | Performance Considerations | SchemaContext generation is expensive.
| Use Hazelcast to store 'simplified Model' as defined in Poc Toine | ||||||||||||
9 |
Road Map
- Short Term solution
- No DB changes or DB interaction (after retrieving yang resources) Based on Toine's Poc https://gerrit.nordix.org/c/onap/cps/+/15553
- Lazy loading of 'simplified model'
- Cache simplified Module (for performance reasons) Can built on te solution for
here https://gerrit.onap.org/r/c/cps/+/131493Jira server ONAP Jira serverId 425b2b0a-557c-3c0c-b515-579789cceedb key CPS-1326 - This solution should handle Leaf (defined in different module) as well
- Medium term solution
- Update CPS Internal Relation DB Schema and data insert to retain fragment - yang resource relation
- Modify data retrieval to insert module references as required
- retain/modify short term solution for leaves-in-separate modules
- Long term solution
- Modie schema to store attribute module informat when needed i.e. when not defined in same module as container that owns those leaves
- Detailed analysis required
Cost estimates
TBD
Resourcing
TBD
Short Term Solution
Options
- iterator over schemaContext tree to generate (matchers for) all possible paths or 'normalized paths (ie. without list indexes) See also issue #8
- wak three using given paths which need to be resolved as needed (adn and cache once found)
...
Medium Term Solution
- Each Fragment needs a reference to the relevant module (on DB Level)Consider not removing original prefix's from input (could be caused by ODL parser)