]> git.proxmox.com Git - mirror_frr.git/commitdiff
yang: simplify filter choice by removing cases
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 1 Aug 2019 22:56:46 +0000 (19:56 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 1 Aug 2019 22:58:52 +0000 (19:58 -0300)
Based on @rwestphal feedback, lets remove `case`s where we don't expect
to add more items or items with more than one `leaf`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
yang/frr-filter.yang

index 92af6aebfd36a9552d640c5f2121f2a262d48316..e79ede87b7e8e0b108b6861e941c8fa7e20a7a0b 100644 (file)
@@ -107,23 +107,17 @@ module frr-filter {
            Extended access list: source value to match.";
         mandatory true;
 
-        case host {
-          leaf host {
-            description "Host to match";
-            type inet:ipv4-address;
-          }
+        leaf host {
+          description "Host to match";
+          type inet:ipv4-address;
         }
-        case network {
-          leaf network {
-            description "Network to match";
-            type inet:ipv4-prefix;
-          }
+        leaf network {
+          description "Network to match";
+          type inet:ipv4-prefix;
         }
-        case any {
-          leaf any {
-            description "Match any";
-            type empty;
-          }
+        leaf any {
+          description "Match any";
+          type empty;
         }
       }
 
@@ -132,23 +126,17 @@ module frr-filter {
               ./sequence >= 2000 and ./sequence <= 2699";
         description "Destination value to match";
 
-        case destination-host {
-          leaf destination-host {
-            description "Host to match";
-            type inet:ipv4-address;
-          }
+        leaf destination-host {
+          description "Host to match";
+          type inet:ipv4-address;
         }
-        case destination-network {
-          leaf destination-network {
-            description "Network to match";
-            type inet:ipv4-prefix;
-          }
+        leaf destination-network {
+          description "Network to match";
+          type inet:ipv4-prefix;
         }
-        case destination-any {
-          leaf destination-any {
-            description "Match any";
-            type empty;
-          }
+        leaf destination-any {
+          description "Match any";
+          type empty;
         }
       }
     }