From 1fca062a250335b24b9010987276059844f40c9b Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Mon, 2 Mar 2020 07:22:45 -0800 Subject: [PATCH] yang: zebra rib model remove grouping for ip route 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 --- yang/frr-zebra.yang | 52 ++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/yang/frr-zebra.yang b/yang/frr-zebra.yang index d3a9d88968..205109d8ae 100644 --- a/yang/frr-zebra.yang +++ b/yang/frr-zebra.yang @@ -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; } } } -- 2.39.5