-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some deprecated or non-described fields are made mandatory in Yang #594
Comments
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. |
Fully agree. We need to remove the min-elements in these cases. Going further, based on our discussion on the TAPI call today, no properties should be mandatory in the YANG. The RIA should state the conditions under which a particular property is needed (for compliance). We should discuss this on a call and then take the necessary action prior to the next delivery. |
We agreed to fix the specific properties identified here. We also need to review the YANG to identify how many more cases there are. If there are sufficiently few we could consider fixing them all. @bcjohnso99 I suggest we attempt do the fix identified here in 2.6. I can review the YANG and identify where all the changes need to be. We could then review the list on a call shortly. If excessive or controversial, perhaps we back off and do in 2.7. |
Agreed to review the YANG and identify where all the changes need to be. Then review the list on the call 4 March. If excessive or controversial, perhaps we back off and do in 2.7. There appear to be approx 22 so may be able to deal with. |
@bcjohnso99, (Kishore has vanished from the list again :( ): We should review this on the call 4 March. The specific issue highlighted by @roshan-joyce-fujitsu and explained by @amazzini is that the UML to YANG tool codes a specific structure in UML to uses in YANG. The structure in UML has a natural optionality such that a mandatory element below this structure is not mandatory overall. This indirection is not present in the YANG. There were more cases of this "uses" problem in Topology YANG than highligh in this issue. In all cases the min-elements has been removed. The full set I have changed in a draft YANG are:
In all cases, I need to check the UML and in some cases will need to fix it (e.g., where there is min-elements 2) On the meaning of validation-mechanism, I have expanded the text to add three sentences (in bold below) to the one present in the original YANG. As follows:
This will require an adjustment to the UML to align. I have not yet made the UML adjustment highlighted here. There are other cases of min-elements in topology.yang:
There are also min-elements statements in common (2), connectivity (2), equipment (1), oam (2), path-computation (4) and streaming (1) which I plan to detail in this issue. |
Moving on to the other models: tapi-common.yang
tapi-connectivity.yang
tapi-equipment.yang
tapi-notification.yang
tapi-oam.yang
tapi-path-computation
tapi-streaming.yang
tapi-virtual-network.yang
|
tapi-digital-otn.yang has several max-elements that I need to explore. All other models are covered above. |
Note that some of the fixes will cause changes to the UML. These changes are simple and the UML can be manually aligned with the YANG. Once we have agreed the changes, I will take an action to align the UML. None of the fixes related to this issue will cause changes to the OAS. <-- Need to confirm with the team. |
tapi-digital-otn
@bcjohnso99 We should discuss on the call 4 March. |
Agreed that we should do a more aggresive removal of min-elements and max-elements so for example we will remove it for link /layer-protocol-name... remove all for second bullet list. 4 March : Agreed to keep the tcm mep and mip max-elements in otn. Hence, no changes to tapi-digital-otn.yang. |
I have fixed the transitionedLayerProtocolName string in UML to * (from 2..*). |
The specific issue is that the UML to YANG tool codes a specific structure in UML to uses in YANG. The structure in UML has a natural optionality such that a mandatory element below this structure is not mandatory overall. This indirection is not present in the YANG. The cases of this "uses" problem in the topology model have all had the min-elements removed (from tapi-topology.yang): - layer-protocol-transition-pac / transitioned-layer-protocol-name (min-elements 2;) - risk-parameter-pac / risk-characteristic (min-elements 1) - risk-characteristic / risk-identifier-list (min-elements 1) - transfer-cost-pac /cost-characteristic (min-elements 1) - transfer-timing-pac / latency-characteristic (min-elements 1) - validation-pac / validation-mechanism (min-elements 1) The UML has also been updated (converting 2..* and 1..* to 0..*).
The specific issue is that the UML to YANG tool codes a specific structure in UML to uses in YANG. The structure in UML has a natural optionality such that a mandatory element below this structure is not mandatory overall. This indirection is not present in the YANG. The cases of this "uses" problem in the topology model have all had the min-elements removed (from tapi-topology.yang): - layer-protocol-transition-pac / transitioned-layer-protocol-name (min-elements 2;) - risk-parameter-pac / risk-characteristic (min-elements 1) - risk-characteristic / risk-identifier-list (min-elements 1) - transfer-cost-pac /cost-characteristic (min-elements 1) - transfer-timing-pac / latency-characteristic (min-elements 1) - validation-pac / validation-mechanism (min-elements 1) The UML has also been updated (converting 2..* and 1..* to 0..*).
My earlier comment
Was not correct as neither are parts of key. On that basis there is no reason for the min-elements. Considering the positioning on the call, I will remove these min-elements. Note that the key for connector-pin list (which is read only) is a list of elements where some elements are conditional. Whilst this looks reasonable conceptually, it is not clear whether this is YANG conformant. As this has been there for several releases without causing an issue reports, it is probably OK (and certainly OK for 2.6). We should readdress this in 2.7. @bcjohnso99: We need to add this final part for 2.7. To be discussed on the call 11 March. |
Continuing with fixes for issue Open-Network-Models-and-Interfaces-ONMI#594 max-elements and min-elements statements removed (as agreed) as follows: tapi-common.yang - service-interface-point has a supported-cep-layer-protocol-qualifier (min-elements 1) - time-interval (min-elements 1, max-elements 5) tapi-connectivity.yang - connection / connection-end-point-ref (min-elements 2) - connectivity-service / end-point (min-elements 2) - route / connection-end-point-ref (min-elements 2) tapi-equipment.yang - access-port / connector-pin (min-elements 1) - abstract-strand / connector-pin (max-elements 2) - abstract-strand / spliced-strand (max-elements 2)) tapi-oam.yang - oam-profile / pm-parameter-config (min-elements 1)
I have completed the agreed (and corrected) changes to the YANG and UML for this issue (as described above). I have also updated the comment for validation-machanism in the YAML (found in 4 places and corrected in all). The changes are currently in https://github.com/nigel-r-davis/TAPI develop. Note that I have not changed the .tree as it has no indication of min-elements/max-elements. Each list is simply "*". I will complete a pull request once all other changes agreed at meeting 4 March have been done. |
The comment in topology.yaml has been updated to align with the YANG/UML. This is also part of Open-Network-Models-and-Interfaces-ONMI#594. Note: no changes are required to be made to the YAML for other parts of Open-Network-Models-and-Interfaces-ONMI#594 because the YAML does not (appear to) constrain number of elements of a list.
I have just found one min elements statement in the RIA which I have removed. There are no references to validation-mechanism in the RIA. We should consider documenting this in 2.7. The pm-parameter-config had a statement in the RIA I have modified this to conditional and added a lead in "Where the profile is used to control PMs, the profile...". and We will need to review use of profiles in general in detail in 2.7. A careful review of OAM leading to some refinement is also necessary in 2.7 as OAM was still work in progress. I am going to do a single update to the RIA will all changes captured from this and other issues. @bcjohnso99 We need to collect any actions for 2.7 from the various 2.6 issues and create new issues to track through 2.7. We should do a pass through the issues once 2.6 delivery to TST is completed. |
Hi @nigel-r-davis , @bcjohnso99 I am fine with the yang changes made so far. |
There are other YANG changes underway covered by other issues. This can be moved to approved. |
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 onevalidation-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 thetransitioned-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
The text was updated successfully, but these errors were encountered: