diff --git a/yang/frr-bfdd.yang b/yang/frr-bfdd.yang index 08b6073479..d3e756e0bf 100644 --- a/yang/frr-bfdd.yang +++ b/yang/frr-bfdd.yang @@ -242,6 +242,36 @@ module frr-bfdd { } } + grouping bfd-monitoring { + description + "BFD monitoring template for protocol integration."; + + leaf source { + type inet:ip-address; + description + "Source address to use for liveness check. + + When source is not set and multi-hop is `false` the source + address will be `0.0.0.0` (any). + + When source is not set and multi-hop is `true` the source + address will be automatic selected through Next Hop Tracking (NHT)."; + } + + leaf multi-hop { + description + "Use multi hop session instead of single hop."; + type boolean; + default false; + } + + leaf profile { + description + "BFD pre configured profile."; + type frr-bfdd:profile-ref; + } + } + grouping session-states { /* * Local settings. diff --git a/yang/frr-staticd.yang b/yang/frr-staticd.yang index 98ff3a83c6..cb5e25b877 100644 --- a/yang/frr-staticd.yang +++ b/yang/frr-staticd.yang @@ -15,6 +15,10 @@ module frr-staticd { prefix inet; } + import frr-bfdd { + prefix frr-bfdd; + } + organization "FRRouting"; contact @@ -114,7 +118,19 @@ module frr-staticd { "AFI-SAFI type."; } - uses staticd-prefix-attributes; + uses staticd-prefix-attributes { + augment "path-list/frr-nexthops/nexthop" { + container bfd-monitoring { + description "BFD monitoring options."; + presence + "Present if BFD configuration is available."; + + when "../nh-type = 'ip4' or ../nh-type = 'ip4-ifindex' or + ../nh-type = 'ip6' or ../nh-type = 'ip6-ifindex'"; + uses frr-bfdd:bfd-monitoring; + } + } + } list src-list { key "src-prefix";