Define a generic BFD monitoring group template and use it to add support
for static route monitoring.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
}
}
+ 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.
prefix inet;
}
+ import frr-bfdd {
+ prefix frr-bfdd;
+ }
+
organization
"FRRouting";
contact
"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";