Node Prefix Issue Analysis

Description

None

Activity

Show:

Former user November 11, 2022 at 11:30 AM
Edited

Analysis details:

Prefix required for

  • root node of a parent yang

  • direct leaves of external/augment yang

  • direct leaf lists of external/augment yang

  • direct containers of of external/augment yang

Prefix not required for

  • any direct nodes (leafs, leaf lists, containers, lists) of parent yang

  • container inside container in augmented yang models

  • containers inside list

  • lists


Approach to store prefix of containers

  • add new field prefix in yangresourcesentity

  • create many-to-many relationship between fragment and yangresourcesentity

  • Store Yangresourceentity in storeschemaset. Changes required in CPSModulePersistenceServiceImpl

Approach to store prefix for leaves:

  • CPSDataServiceImpl - DatanodeBuilder - addYangLeaf method can be modified to find the prefix from schemacontext and frame DataNode leaves (costly operation - time consuming)

  • add the prefix only for augmented nodes. This can be identified by module.getAugmentations() method


How to identify a field is on particular yang module?

  • iterate the modules of schemacontext

  • compare the node's schemespecficpart with each module's schemespecificpart

  • matching yang module is that the field's yang module


Prefix Retrieval

Containers:

  • find the prefix from yangresources table using xpath(fragment)

  • skip the above step for MapEntryNode ( to avoid prefix for lists and containers)

  • skip for inner containers. Find approach to find a container is nested.


Leaves of augmented/external modules:

  • No changes are required

Done

Details

Assignee

Reporter

Fix versions

Priority

Created November 11, 2022 at 11:27 AM
Updated April 28, 2023 at 5:56 AM
Resolved April 28, 2023 at 5:56 AM

Flag notifications