]> git.puffer.fish Git - mirror/frr.git/commitdiff
yang: mark a couple of prefix-list/access-list leafs as mandatory 9366/head
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 10 Aug 2021 19:10:56 +0000 (22:10 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 10 Aug 2021 19:39:32 +0000 (22:39 +0300)
The code assumes that these leafs always exist when their complementary
leafs exist. For example, when processing `ipv4-exact-match`, the code
always expects to have access to `ipv4-prefix`. If those leafs are not
provided, code crashes. It doesn't happen when using the CLI because it
always does the right thing, but it can happen when using other
frontends.

Also fix incorrect description for prefix-list sequence leaf.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
yang/frr-filter.yang

index 9a864213ee9befada9ece98ff8aae82110e06593..46a9100ab2cb92972a56e5e57c7dde54e746833b 100644 (file)
@@ -145,6 +145,7 @@ module frr-filter {
                 leaf ipv4-prefix {
                   description "Configure IPv4 prefix to match";
                   type inet:ipv4-prefix;
+                  mandatory true;
                 }
 
                 leaf ipv4-exact-match {
@@ -216,6 +217,7 @@ module frr-filter {
             leaf ipv6-prefix {
               description "Configure IPv6 prefix to match";
               type inet:ipv6-prefix;
+              mandatory true;
             }
 
             leaf ipv6-exact-match {
@@ -277,7 +279,7 @@ module frr-filter {
         key "sequence";
 
         leaf sequence {
-          description "Access list sequence value";
+          description "Prefix list sequence value";
           type access-list-sequence;
         }
 
@@ -295,6 +297,7 @@ module frr-filter {
             leaf ipv4-prefix {
               description "Configure IPv4 prefix to match";
               type inet:ipv4-prefix;
+              mandatory true;
             }
 
             leaf ipv4-prefix-length-greater-or-equal {
@@ -319,6 +322,7 @@ module frr-filter {
             leaf ipv6-prefix {
               description "Configure IPv6 prefix to match";
               type inet:ipv6-prefix;
+              mandatory true;
             }
 
             leaf ipv6-prefix-length-greater-or-equal {