-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yang: introduce gs-static-route model
- Loading branch information
KazuyaAnazawa
committed
Dec 27, 2022
1 parent
3398d06
commit c8c9581
Showing
1 changed file
with
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
module goldstone-static-route { | ||
|
||
yang-version "1"; | ||
|
||
namespace "http://goldstone.net/yang/goldstone-static-route"; | ||
prefix gs-static-route; | ||
|
||
import goldstone-routing { | ||
prefix gs-rt; | ||
} | ||
|
||
import goldstone-nexthop { | ||
prefix nexthop; | ||
} | ||
|
||
import ietf-inet-types { | ||
prefix inet; | ||
} | ||
|
||
organization | ||
"GoldStone"; | ||
|
||
description | ||
"This module contains a collection of YANG definitions for | ||
managing and configuring static route"; | ||
|
||
revision 2022-12-14 { | ||
description | ||
"Initial revision."; | ||
} | ||
|
||
grouping static-route-config { | ||
description | ||
"Configuration data for static routes."; | ||
|
||
leaf prefix { | ||
type inet:ipv4-prefix; | ||
description | ||
"Destination IPv4 prefix for the static route"; | ||
} | ||
} | ||
|
||
grouping static-route-state { | ||
} | ||
|
||
augment "/gs-rt:routing" { | ||
container static-route { | ||
when "../gs-rt:config/gs-rt:type = 'STATIC'" { | ||
description | ||
"This container is only valid for the static routing | ||
protocol in goldstone."; | ||
} | ||
description | ||
"List of configured static routes"; | ||
|
||
list route-list { | ||
key "prefix"; | ||
description | ||
"List of configured static routes"; | ||
|
||
leaf prefix { | ||
type leafref { | ||
path "../config/prefix"; | ||
} | ||
} | ||
|
||
container config { | ||
uses static-route-config; | ||
} | ||
container state { | ||
config false; | ||
uses static-route-config; | ||
uses static-route-state; | ||
} | ||
|
||
uses nexthop:nexthops-top; | ||
} | ||
} | ||
} | ||
} |