From: Chirag Shah Date: Wed, 13 Jan 2021 16:41:25 +0000 (-0800) Subject: yang: remove when condition from static nexthop om X-Git-Tag: base_7.6~22^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=dc40d33703c99fd4587978e92cb9007e7215dda4;p=matthieu%2Ffrr.git yang: remove when condition from static nexthop om Remove when conditions from the yang OM as it degrades the performance in libyang. Instead do the same when conditional check in frr northbound validate phase. Reject the config if condiion do not meet. Ticket:CM-32530 Testing Done: Co-developed-by: VishalDhingra Signed-off-by: Chirag Shah --- diff --git a/yang/frr-nexthop.yang b/yang/frr-nexthop.yang index 619514de7d..2df2e2958e 100644 --- a/yang/frr-nexthop.yang +++ b/yang/frr-nexthop.yang @@ -61,7 +61,7 @@ module frr-nexthop { type union { type inet:ip-address; type string { - pattern ''; + pattern ""; } } } @@ -160,6 +160,7 @@ module frr-nexthop { description "The nexthop vrf name, if different from the route."; } + leaf gateway { type frr-nexthop:optional-ip-address; description @@ -173,15 +174,12 @@ module frr-nexthop { } leaf bh-type { - when "../nh-type = 'blackhole'"; type blackhole-type; description "A blackhole sub-type, if the nexthop is a blackhole type."; } leaf onlink { - when "../nh-type = 'ip4-ifindex' or - ../nh-type = 'ip6-ifindex'"; type boolean; default "false"; description