From ebf8b885dee7eaf0fde220d349ce49d8b70313dd Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Sun, 23 Jan 2022 20:54:11 -0500 Subject: 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 --- yang/frr-bfdd.yang | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'yang') 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"; -- cgit v1.2.3