[YANGTOOLS-617] Mandatory leaf enforcement does not work when RESTCONF call is made is certain way Created: 25/May/16 Updated: 10/Apr/22 Due: 25/Aug/16 Resolved: 01/Dec/16 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Ajay L | Assignee: | Peter Kajsa |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 5968 |
| Description |
|
BGP-PCEP project has bgp-rib model [1]. It defines an application-rib container which uses rib grouping that contains a routes choice which is augmented from other address-family specific models. E.g. bgp-inet model [2] augments it with ipv4-routes-case which uses ipv4-routes grouping. This uses route grouping from [1] which in turn uses path-attributes grouping from bgp-message model [3]. Path-attributes uses origin container which has a value leaf specified as mandatory using "mandatory true" statement When populating data into application-rib using RESTCONF, the mandatory validation for origin seems to work in some cases but not others: Since we cannot control how the user will invoke RESTCONF, the mandatory validation should work in all cases [1] https://github.com/opendaylight/bgpcep/blob/master/bgp/rib-api/src/main/yang/bgp-rib.yang [5] http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ |
| Comments |
| Comment by Ajay L [ 25/May/16 ] |
|
Reference numbers in description are bit off. Please use below When populating data into application-rib using RESTCONF, the mandatory validation for origin seems to work in some cases but not others: |
| Comment by Peter Kajsa [ 05/Aug/16 ] |
| Comment by Peter Kajsa [ 18/Aug/16 ] |
| Comment by Robert Varga [ 04/Nov/16 ] |
| Comment by Robert Varga [ 21/Nov/16 ] |
|
Reopened due to revert. |
| Comment by Robert Varga [ 21/Nov/16 ] |
| Comment by Robert Varga [ 21/Nov/16 ] |
|
The above patch needs to be evaluated for performance impact. |
| Comment by Peter Kajsa [ 22/Nov/16 ] |
|
Luis Gomez: Patch seems to be OK (no impact on REST perf). |
| Comment by Robert Varga [ 01/Dec/16 ] |