]> git.puffer.fish Git - mirror/frr.git/commitdiff
yang: support BFD session profiles
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 15 May 2020 20:35:42 +0000 (17:35 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 20 May 2020 13:39:34 +0000 (10:39 -0300)
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 <rzalamena@opensourcerouting.org>
yang/frr-bfdd.yang

index 19e36fdfd7a5582d6b03bb72c952b73d3336b369..13bad27b191dbcb4eb6230dff6b1d5b8d4ef979e 100644 (file)
@@ -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 {