-
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 d2d8a29
Showing
9 changed files
with
2,001 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,150 @@ | ||
module frr-staticd { | ||
yang-version "1.1"; | ||
namespace "http://frrouting.org/yang/staticd"; | ||
|
||
prefix frr-staticd; | ||
|
||
import ietf-routing-types { | ||
prefix "rt-types"; | ||
} | ||
|
||
import ietf-routing { | ||
prefix "rt"; | ||
} | ||
|
||
import ietf-ipv4-unicast-routing { | ||
prefix "v4ur"; | ||
} | ||
|
||
import ietf-ipv6-unicast-routing { | ||
prefix "v6ur"; | ||
} | ||
|
||
import frr-vrf { | ||
prefix frr-vrf; | ||
} | ||
|
||
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 rt-types:mpls-label; | ||
description | ||
"Nexthop's MPLS label stack."; | ||
} | ||
leaf nexthop-vrf { | ||
type string { | ||
length "1..36"; | ||
} | ||
description | ||
"The nexthop vrf name, if different from the route."; | ||
} | ||
} | ||
|
||
grouping frr-staticd-nexthop { | ||
|
||
choice next-hop-type { | ||
case gateway { | ||
leaf gw-interface { | ||
type string { | ||
length "1..16"; | ||
} | ||
description | ||
"Name of the outgoing interface."; | ||
} | ||
leaf is-onlink { | ||
type empty; | ||
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" | ||
+ "/rt:routing/rt:control-plane-protocols/" | ||
+ "rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/" | ||
+ "v4ur:route/v4ur:next-hop/v4ur:next-hop-options/" | ||
+ "v4ur:next-hop-list/v4ur:next-hop-list/v4ur:next-hop" | ||
{ | ||
description | ||
"Augment static route configuration 'next-hop-list'."; | ||
uses frr-staticd-nexthop; | ||
} | ||
augment "/frr-vrf:lib/frr-vrf:vrf" | ||
+ "/rt:routing/rt:control-plane-protocols/" | ||
+ "rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/" | ||
+ "v6ur:route/v6ur:next-hop/v6ur:next-hop-options/" | ||
+ "v6ur:next-hop-list/v6ur:next-hop-list/v6ur:next-hop" | ||
{ | ||
description | ||
"Augment static route configuration 'next-hop-list'."; | ||
uses frr-staticd-nexthop; | ||
} | ||
} |
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,33 @@ | ||
module frr-vrf { | ||
yang-version 1.1; | ||
namespace "http://frrouting.org/yang/vrf"; | ||
prefix frr-vrf; | ||
|
||
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 VRFs."; | ||
|
||
revision 2019-12-03 { | ||
description | ||
"Initial revision."; | ||
} | ||
|
||
container lib { | ||
list vrf { | ||
key "name"; | ||
description | ||
"vrf name."; | ||
leaf name { | ||
type string { | ||
length "1..36"; | ||
} | ||
description | ||
"VRF is associated with frr"; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.