[MDSAL-70] Binding Specification: Constructor arguments do not preserve statement order as defined in YANG Created: 25/Feb/15  Updated: 09/Jul/21  Resolved: 01/Mar/18

Status: Resolved
Project: mdsal
Component/s: Binding V2 codegen
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Tony Tkacik Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by MDSAL-237 Milestone: Implement Binding Specific... Resolved

 Description   

In Current Binding Specification v1 constructor for list key
does not take arguments in order specified in YANG key statement, but rather in alphabetical order.

This could be considered design bug, since several other drafts / specifications
requires key values to be presented in same order as in yang model.

Also YANG language requires for RPC element to be present in same order
as in YANG model, so removing alphabetically sorted elements in favor
of elements sorted as present in YANG model will provide easier understanding
of Java Bidning and its mapping to YANG.



 Comments   
Comment by Robert Varga [ 25/Feb/15 ]

One key problem, though, can happen if someone decides to reorder leaf declarations between revisions ... that may end up mixing up the ordering, which may silent data mixups.

Comment by Robert Varga [ 24/Sep/15 ]

Low priority and given the problems this will create across model revisions I don't think it's worth the hassle.

Comment by Robert Varga [ 01/Mar/18 ]

As noted, inter-revision compatibility would silently be broken, hence we will not be fixing this.

Generated at Wed Feb 07 20:08:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.