[YANGTOOLS-984] Reordering of augmented and direct children in containers Created: 24/Apr/19 Updated: 30/Apr/19 Resolved: 30/Apr/19 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.1, 2.0.19, 2.1.11 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Jakub Toth | Assignee: | Jakub Toth |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Some devices are unreasonably touchy about the order of children we send them – i.e. they expect to encounter direct container children before seeing any augmented children. While we push them to NormalizedNode builders in this order, the builders are using plain HashMaps (and rightfully so) to track them, which means they can get reordered. Based on this, the device doesn't accept the result sent from Netconf cause the order of children is changed. |
| Comments |
| Comment by Robert Varga [ 30/Apr/19 ] |
|
In case the system property "org.opendaylight.yangtools.yang.data.impl.schema.builder.retain-child-order" is set to "true", such as running java with -Dorg.opendaylight.yangtools.yang.data.impl.schema.builder.retain-child-order=true, all container-like NormalizedNodes will retain the initial child insertion order. This does not extend to DataTree operations, where the order can be lost afterwards. |