From abf1ba08e325ed550953e8ea4ee6cb8c8a1c01ba Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Fri, 15 May 2020 17:35:42 -0300 Subject: [PATCH] yang: support BFD session profiles Allow sessions to use BFD profile configurations instead of having to clone the configuration per peer. If using a profile and setting a peer configuration, the peer configuration will take precedence over the profile. Signed-off-by: Rafael Zalamena --- yang/frr-bfdd.yang | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/yang/frr-bfdd.yang b/yang/frr-bfdd.yang index 19e36fdfd7..13bad27b19 100644 --- a/yang/frr-bfdd.yang +++ b/yang/frr-bfdd.yang @@ -139,6 +139,21 @@ module frr-bfdd { } } + typedef profile-name { + type string { + length "1..64"; + } + description "Profile name format"; + } + + typedef profile-ref { + type leafref { + path "/frr-bfdd:bfdd/frr-bfdd:bfd/frr-bfdd:profile/frr-bfdd:name"; + require-instance false; + } + description "Reference to a BFD profile"; + } + /* * Shared BFD items. */ @@ -337,6 +352,19 @@ module frr-bfdd { container bfd { presence "Present if the BFD protocol is enabled"; + list profile { + key "name"; + description "BFD pre configuration profiles"; + + leaf name { + type profile-name; + description "Profile name"; + } + + uses session-common; + uses session-echo; + } + container sessions { list single-hop { key "dest-addr interface vrf"; @@ -364,6 +392,11 @@ module frr-bfdd { description "Local IP address"; } + leaf profile { + type profile-ref; + description "Override defaults with profile."; + } + uses session-common; uses session-echo; @@ -399,6 +432,11 @@ module frr-bfdd { description "Virtual Routing Domain name"; } + leaf profile { + type profile-ref; + description "Override defaults with profile."; + } + uses session-common; container stats { -- 2.39.5