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
94 stars 80 forks source link

Some deprecated or non-described fields are made mandatory in Yang #594

Open roshan-joyce-fujitsu opened 4 months ago

roshan-joyce-fujitsu commented 4 months ago

Please see https://github.com/Open-Network-Models-and-Interfaces-ONMI/TAPI/blob/v2.5.0/YANG/tapi-topology.yang#L701 Because it says min-elements 1, a data store that enforces Yang rules will mandate that there is at least one validation-mechanism specified in the list in each Link. However, there is no definition of validation-mechanism in RIA.

Please see https://github.com/Open-Network-Models-and-Interfaces-ONMI/TAPI/blob/v2.5.0/YANG/tapi-topology.yang#L528 Because it says min-elements 2, a data store that enforces Yang rules will mandate that there is at least one entry in the transitioned-layer-protocol-name list in each Link, even if it is not representing a tranisitonal-link. Please note that transitional-link concept has been deprecated in the RIA.

I think we need to remove the min-elements constraint from these list definitions.

CC: @amazzini

amazzini commented 4 months ago

The UML2YANG tool translated 1 to 1 and 1 to 0..1 compositions into "uses" statement, which is essentially mandatory, hence the optionality is lost. This may imply the need of a systematic review, to remove some "min-elements" which contradicts main statement.