From bec0aa85b1f404ac9800c7524070fcf8582e82bc Mon Sep 17 00:00:00 2001
From: Rafael Zalamena <rzalamena@opensourcerouting.org>
Date: Thu, 1 Aug 2019 19:56:46 -0300
Subject: [PATCH] yang: simplify filter choice by removing cases

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 | 48 +++++++++++++++++---------------------------
 1 file changed, 18 insertions(+), 30 deletions(-)

diff --git a/yang/frr-filter.yang b/yang/frr-filter.yang
index 92af6aebfd..e79ede87b7 100644
--- a/yang/frr-filter.yang
+++ b/yang/frr-filter.yang
@@ -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;
         }
       }
     }
