Open-Network-Models-and-Interfaces-ONMI / TAPI

LF ONMI Transport API Repository (TAPI)
https://github.com/Open-Network-Models-and-Interfaces-ONMI/TAPI/wiki
Apache License 2.0
95 stars 80 forks source link

TAPI YANG Augments are missing a corresponding YANG Data Node #356

Closed amazzini closed 5 years ago

amazzini commented 5 years ago

For example, TAPI YANG currently generates the following TAPI OAM Augment:

    augment "/tapi-common:context/tapi-oam:oam-job" {
        uses eth-link-trace-job;
        description "none";
    }

This makes it impossible to further augment the augmenting node (eth-link-trace-job), as necessary e.g. from MEF NRM-OAM model. It is recommended to insert a wrapping YANG container for the YANG uses statement, as below shown:

    augment "/tapi-common:context/tapi-oam:oam-job" {
        container eth-link-trace-job {
          uses eth-link-trace-job;
        }
        description "none";
    }
italobusi commented 5 years ago

That's depend on how the grouping (e.g., the eth-link-trace-job grouping) is defined

If the container (e.g., container eth-link-trace-job) is defined within the grouping, the current augmentation statements will be ok

karthik-sethuraman commented 5 years ago

The Eagle Uml2Yang tool and mapping guidelines have all classes directly mapped to YANG groupings. And the grouping is wrapped with either a list or a container statement when an instance of the class is contained within another class (as an composed attribute). So no further is container defined within grouping as it would create unnecessary level of containers. So changes will be more localized if a wrapper container is created just in case of the augment statements,