From 556d50069421175b42bda9a360431a7bc47701ac Mon Sep 17 00:00:00 2001 From: vdhingra Date: Fri, 24 Apr 2020 05:32:59 -0700 Subject: [PATCH] yang: staticd yang modification staticd yang has been modified to support below use cases 1. src-table for IPV6 address family. 2. distance,tag and table-id would be the key for a given prefix. Signed-off-by: VishalDhingra --- yang/frr-staticd.yang | 87 +++++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 36 deletions(-) diff --git a/yang/frr-staticd.yang b/yang/frr-staticd.yang index f59158a0fd..d7a6b1d041 100644 --- a/yang/frr-staticd.yang +++ b/yang/frr-staticd.yang @@ -1,11 +1,10 @@ module frr-staticd { - yang-version "1.1"; + yang-version 1.1; namespace "http://frrouting.org/yang/staticd"; - prefix frr-staticd; import frr-routing { - prefix "frr-rt"; + prefix frr-rt; } import frr-nexthop { @@ -18,11 +17,9 @@ module frr-staticd { organization "FRRouting"; - contact "FRR Users List: FRR Development List: "; - description "This module defines a model for managing FRR staticd information. This YANG module augments the ietf-routing with additional @@ -58,52 +55,70 @@ module frr-staticd { "Initial revision."; } - identity static { + identity staticd { base frr-rt:routing-protocol; description - "'Static' routing pseudo-protocol."; + "'Staticd' routing pseudo-protocol."; } - augment "/frr-rt:routing/frr-rt:control-plane-protocols/" - + "frr-rt:control-plane-protocol" { + grouping staticd-prefix-attributes { + list path-list { + key "distance"; + leaf distance { + type frr-rt:administrative-distance; + description + "Admin distance associated with this route."; + } + + leaf tag { + type uint32; + default "0"; + description + "Route tag"; + } + + leaf table-id { + type uint32; + default "0"; + description + "Table-id"; + } + + uses frr-nexthop:frr-nexthop; + } + } + + augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" { container staticd { - when "../frr-rt:type = 'frr-staticd:static'" { + when "../frr-rt:type = 'frr-staticd:staticd'" { description - "This container is only valid for the 'static' routing + "This container is only valid for the 'staticd' routing protocol."; } description - "Support for a 'static' pseudo-protocol instance - consists of a list of routes."; - - list prefix-list { - key "destination-prefix"; + "Support for a 'staticd' pseudo-protocol instance + consists of a list of routes."; + list route-list { + key "prefix"; description - "List of static IP routes."; - - leaf destination-prefix { - type inet:ip-address; + "List of staticd IP routes."; + leaf prefix { + type inet:ip-prefix; description - "IP destination prefix."; + "IP prefix."; } - leaf distance { - type frr-rt:administrative-distance; - description - "Admin distance associated with this route."; - } + uses staticd-prefix-attributes; - leaf tag { - type uint32 { - range "1..4294967295"; + list src-list { + key "src-prefix"; + leaf src-prefix { + type inet:ipv6-prefix; + description + "IPv6 source prefix"; } - description - "Route tag"; - } - container frr-staticd-next-hop { - description - "Augment static route configuration 'nexthop-list'."; - uses frr-nexthop:frr-nexthop; + + uses staticd-prefix-attributes; } } } -- 2.39.5