Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
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:
1. When using POST URL [1] and data [2], the mandatory validation actually works
2. But when using POST URL [3] and data [4], the mandatory validation does not work
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
[2] https://github.com/opendaylight/bgpcep/blob/master/bgp/inet/src/main/yang/bgp-inet.yang
[3] https://github.com/opendaylight/bgpcep/blob/master/bgp/parser-api/src/main/yang/bgp-message.yang
[4] https://wiki.opendaylight.org/view/BGP_LS_PCEP:Programmer_Guide#RESTCONF
[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/
[6] http://pastebin.com/wJCgGa7A
[7] http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family
[8] http://pastebin.com/7pKKxQX1