summaryrefslogtreecommitdiffstats
path: root/yang
diff options
context:
space:
mode:
authoranlan_cs <vic.lan@pica8.com>2022-01-24 02:54:11 +0100
committeranlan_cs <vic.lan@pica8.com>2022-01-25 10:00:49 +0100
commitebf8b885dee7eaf0fde220d349ce49d8b70313dd (patch)
tree010f220568c68f9564320fb5370c79790aa9cf74 /yang
parentdoc: clarify bfd parameters' overriden method (diff)
downloadfrr-ebf8b885dee7eaf0fde220d349ce49d8b70313dd.tar.xz
frr-ebf8b885dee7eaf0fde220d349ce49d8b70313dd.zip
bfdd,yang: optimize nb with YANG
A few optimizations for bfd NB: - Remove unuseful checks for parameters with the same values - Replace checking values of bfd parameters with YANG's "range" - Append "required-echo-receive-interval" with 0 for it can be disabled Signed-off-by: anlan_cs <vic.lan@pica8.com>
Diffstat (limited to 'yang')
-rw-r--r--yang/frr-bfdd.yang16
1 files changed, 12 insertions, 4 deletions
diff --git a/yang/frr-bfdd.yang b/yang/frr-bfdd.yang
index 3877e20bd..08b607347 100644
--- a/yang/frr-bfdd.yang
+++ b/yang/frr-bfdd.yang
@@ -170,14 +170,18 @@ module frr-bfdd {
}
leaf desired-transmission-interval {
- type uint32;
+ type uint32 {
+ range "10000..60000000";
+ }
units microseconds;
default 300000;
description "Minimum desired control packet transmission interval";
}
leaf required-receive-interval {
- type uint32;
+ type uint32 {
+ range "10000..60000000";
+ }
units microseconds;
default 300000;
description "Minimum required control packet receive interval";
@@ -207,14 +211,18 @@ module frr-bfdd {
}
leaf desired-echo-transmission-interval {
- type uint32;
+ type uint32 {
+ range "10000..60000000";
+ }
units microseconds;
default 50000;
description "Minimum desired echo packet transmission interval";
}
leaf required-echo-receive-interval {
- type uint32;
+ type uint32 {
+ range "0 | 10000..60000000";
+ }
units microseconds;
default 50000;
description "Minimum required echo packet receive interval";