]> git.puffer.fish Git - matthieu/frr.git/commitdiff
yang: zebra rib model remove grouping for ip route
authorChirag Shah <chirag@cumulusnetworks.com>
Mon, 2 Mar 2020 15:22:45 +0000 (07:22 -0800)
committerSantosh P K <sapk@vmware.com>
Thu, 16 Apr 2020 15:17:59 +0000 (08:17 -0700)
Grouping is referencing leaves outside the grouping
from where it is used. Removing it and defining leaves
at the used place.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
yang/frr-zebra.yang

index d3a9d88968fd675aecd2a416d1b101de142dc89a..205109d8aed673a08348e44392288f09974dc443 100644 (file)
@@ -285,36 +285,6 @@ module frr-zebra {
   }
   // End of ip6-route
 
-  /*
-   * IP Prefix Route object.
-   */
-
-  grouping ip-route {
-    description
-      "An IPv4/IPv6 prefix route.";
-    leaf prefix {
-      type inet:ip-prefix;
-      description
-        "The route's prefix.";
-    }
-
-    leaf protocol {
-      when "'../../afi-safi-name' = 'ipv4-unicast'";
-      type frr-route-types:frr-route-types-v4;
-      description
-        "The protocol owning the route.";
-    }
-
-    leaf protocol-v6 {
-      when "'../../afi-safi-name' = 'ipv6-unicast'";
-      type frr-route-types:frr-route-types-v6;
-      description
-        "The protocol owning the route.";
-    }
-
-    uses route-common;
-  }
-
   /*
    * Information about EVPN VNIs
    */
@@ -597,7 +567,27 @@ module frr-zebra {
         list route {
           key "prefix";
           config false;
-          uses ip-route;
+          leaf prefix {
+             type inet:ip-prefix;
+             description
+                "The route's prefix.";
+          }
+
+          leaf protocol {
+             when "'../../afi-safi-name' = 'ipv4-unicast'";
+             type frr-route-types:frr-route-types-v4;
+             description
+                "The protocol owning the route.";
+          }
+
+          leaf protocol-v6 {
+             when "'../../afi-safi-name' = 'ipv6-unicast'";
+             type frr-route-types:frr-route-types-v6;
+             description
+                "The protocol owning the route.";
+          }
+
+          uses route-common;
         }
       }
     }