-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Yang files for staticd to use northbound APIs Signed-off-by: vishaldhingra vdhingra@vmware.com Santosh P K sapk@vmware.com
- Loading branch information
1 parent
a5f271c
commit 54bead9
Showing
10 changed files
with
2,376 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
module frr-staticd { | ||
yang-version "1.1"; | ||
namespace "http://frrouting.org/yang/staticd"; | ||
|
||
prefix frr-staticd; | ||
|
||
import ietf-routing-types { | ||
prefix "ietf-rt-types"; | ||
} | ||
|
||
import ietf-routing { | ||
prefix "ietf-rt"; | ||
} | ||
|
||
import ietf-inet-types { | ||
prefix "ietf-inet"; | ||
} | ||
|
||
import ietf-ipv4-unicast-routing { | ||
prefix "ietf-v4ur"; | ||
} | ||
|
||
import ietf-ipv6-unicast-routing { | ||
prefix "ietf-v6ur"; | ||
} | ||
|
||
import frr-vrf { | ||
prefix "frr-vrf"; | ||
} | ||
|
||
import frr-interface { | ||
prefix "frr-interface"; | ||
} | ||
|
||
organization | ||
"Free Range Routing"; | ||
|
||
contact | ||
"FRR Users List: <mailto:frog@lists.frrouting.org> | ||
FRR Development List: <mailto:dev@lists.frrouting.org>"; | ||
|
||
description | ||
"This module defines a model for managing FRR staticd information. | ||
This YANG module augments the ietf-routing with additional | ||
nexthop information"; | ||
|
||
revision 2019-12-03 { | ||
description | ||
"Initial revision."; | ||
} | ||
|
||
grouping nexthop-common-attributes { | ||
leaf table-id { | ||
type uint32 { | ||
range "1..4294967295"; | ||
} | ||
description | ||
"Routing table id to retrieve."; | ||
} | ||
leaf distance { | ||
type uint8 { | ||
range "1..255"; | ||
} | ||
description | ||
"Admin distance based on routing protocol."; | ||
} | ||
leaf mpls-label { | ||
type ietf-rt-types:mpls-label; | ||
description | ||
"Nexthop's MPLS label stack."; | ||
} | ||
leaf nexthop-vrf { | ||
type string { | ||
length "1..16"; | ||
} | ||
description | ||
"The nexthop vrf name, if different from the route."; | ||
} | ||
} | ||
|
||
grouping frr-staticd-ipv4-nexthop { | ||
|
||
choice next-hop-type { | ||
case gateway { | ||
leaf next-hop-address { | ||
type ietf-inet:ipv4-address; | ||
description | ||
"IPv4 address of the next hop."; | ||
} | ||
leaf gw-interface { | ||
type frr-interface:interface-ref; | ||
description | ||
"Name of the outgoing interface."; | ||
} | ||
leaf onlink { | ||
type boolean; | ||
default false; | ||
description | ||
"Nexthop is directly connected."; | ||
} | ||
} | ||
case ifname { | ||
leaf outgoing-interface { | ||
type frr-interface:interface-ref; | ||
description | ||
"Name of the outgoing interface."; | ||
} | ||
} | ||
case Null0 { | ||
leaf Null0 { | ||
type boolean; | ||
default false; | ||
description | ||
"Null interface"; | ||
} | ||
} | ||
case reject { | ||
leaf reject { | ||
type boolean; | ||
default false; | ||
description | ||
"Emit an ICMP unreachable when matched"; | ||
} | ||
} | ||
case blackhole { | ||
leaf blackhole { | ||
type boolean; | ||
default false; | ||
description | ||
"Silently discard pkts when matched"; | ||
} | ||
} | ||
} | ||
|
||
uses nexthop-common-attributes; | ||
|
||
} | ||
|
||
|
||
grouping frr-staticd-ipv6-nexthop { | ||
|
||
choice next-hop-type { | ||
case gateway { | ||
leaf next-hop-address { | ||
type ietf-inet:ipv6-address; | ||
description | ||
"IPv6 address of the next hop."; | ||
} | ||
leaf gw-interface { | ||
type string { | ||
length "1..16"; | ||
} | ||
description | ||
"Name of the outgoing interface."; | ||
} | ||
leaf onlink { | ||
type boolean; | ||
default false; | ||
description | ||
"Nexthop is directly connected."; | ||
} | ||
} | ||
case ifname { | ||
leaf outgoing-interface { | ||
type string { | ||
length "1..16"; | ||
} | ||
description | ||
"Name of the outgoing interface."; | ||
} | ||
} | ||
case Null0 { | ||
leaf Null0 { | ||
type boolean; | ||
default false; | ||
description | ||
"Null interface"; | ||
} | ||
} | ||
case reject { | ||
leaf reject { | ||
type boolean; | ||
default false; | ||
description | ||
"Emit an ICMP unreachable when matched"; | ||
} | ||
} | ||
case blackhole { | ||
leaf blackhole { | ||
type boolean; | ||
default false; | ||
description | ||
"Silently discard pkts when matched"; | ||
} | ||
} | ||
} | ||
|
||
uses nexthop-common-attributes; | ||
|
||
} | ||
|
||
|
||
|
||
augment "/frr-vrf:lib/frr-vrf:vrf" | ||
+ "/ietf-rt:routing/ietf-rt:control-plane-protocols/" | ||
+ "ietf-rt:control-plane-protocol/ietf-rt:static-routes/ietf-v4ur:ipv4/" | ||
+ "ietf-v4ur:route/ietf-v4ur:next-hop/ietf-v4ur:next-hop-options/" | ||
+ "ietf-v4ur:next-hop-list/ietf-v4ur:next-hop-list/ietf-v4ur:next-hop" | ||
{ | ||
description | ||
"Augment static route configuration 'next-hop-list'."; | ||
uses frr-staticd-ipv4-nexthop; | ||
} | ||
augment "/frr-vrf:lib/frr-vrf:vrf" | ||
+ "/ietf-rt:routing/ietf-rt:control-plane-protocols/" | ||
+ "ietf-rt:control-plane-protocol/ietf-rt:static-routes/ietf-v6ur:ipv6/" | ||
+ "ietf-v6ur:route/ietf-v6ur:next-hop/ietf-v6ur:next-hop-options/" | ||
+ "ietf-v6ur:next-hop-list/ietf-v6ur:next-hop-list/ietf-v6ur:next-hop" | ||
{ | ||
description | ||
"Augment static route configuration 'next-hop-list'."; | ||
uses frr-staticd-ipv6-nexthop; | ||
} | ||
} |
Oops, something went wrong.