yang: static route BFD monitoring

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>
This commit is contained in:
Rafael Zalamena 2021-03-24 09:39:34 -03:00
parent 4e35b32ee5
commit 73df597f5e
2 changed files with 47 additions and 1 deletions

View File

@ -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.

View File

@ -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";