]>
Commit | Line | Data |
---|---|---|
41db488c | 1 | // SPDX-License-Identifier: BSD-2-Clause |
56822e76 | 2 | module frr-staticd { |
556d5006 | 3 | yang-version 1.1; |
56822e76 | 4 | namespace "http://frrouting.org/yang/staticd"; |
56822e76 | 5 | prefix frr-staticd; |
6 | ||
7 | import frr-routing { | |
556d5006 | 8 | prefix frr-rt; |
56822e76 | 9 | } |
10 | ||
11 | import frr-nexthop { | |
12 | prefix frr-nexthop; | |
13 | } | |
14 | ||
15 | import ietf-inet-types { | |
16 | prefix inet; | |
17 | } | |
18 | ||
73df597f RZ |
19 | import frr-bfdd { |
20 | prefix frr-bfdd; | |
21 | } | |
22 | ||
56822e76 | 23 | organization |
78891caf | 24 | "FRRouting"; |
56822e76 | 25 | contact |
26 | "FRR Users List: <mailto:frog@lists.frrouting.org> | |
27 | FRR Development List: <mailto:dev@lists.frrouting.org>"; | |
56822e76 | 28 | description |
29 | "This module defines a model for managing FRR staticd information. | |
30 | This YANG module augments the ietf-routing with additional | |
fe3b629a RW |
31 | nexthop information |
32 | ||
33 | Copyright 2020 FRRouting | |
34 | ||
35 | Redistribution and use in source and binary forms, with or without | |
36 | modification, are permitted provided that the following conditions | |
37 | are met: | |
38 | ||
39 | 1. Redistributions of source code must retain the above copyright notice, | |
40 | this list of conditions and the following disclaimer. | |
41 | ||
42 | 2. Redistributions in binary form must reproduce the above copyright | |
43 | notice, this list of conditions and the following disclaimer in the | |
44 | documentation and/or other materials provided with the distribution. | |
45 | ||
46 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
47 | \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
48 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
49 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
50 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
51 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
52 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
53 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
54 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
55 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
56 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; | |
56822e76 | 57 | |
58 | revision 2019-12-03 { | |
59 | description | |
60 | "Initial revision."; | |
61 | } | |
62 | ||
556d5006 | 63 | identity staticd { |
56822e76 | 64 | base frr-rt:routing-protocol; |
65 | description | |
556d5006 | 66 | "'Staticd' routing pseudo-protocol."; |
56822e76 | 67 | } |
68 | ||
556d5006 | 69 | grouping staticd-prefix-attributes { |
70 | list path-list { | |
ad6149e3 | 71 | key "table-id distance"; |
72 | leaf table-id { | |
73 | type uint32; | |
74 | description | |
75 | "Table-id"; | |
76 | } | |
77 | ||
556d5006 | 78 | leaf distance { |
79 | type frr-rt:administrative-distance; | |
80 | description | |
81 | "Admin distance associated with this route."; | |
82 | } | |
83 | ||
84 | leaf tag { | |
85 | type uint32; | |
86 | default "0"; | |
87 | description | |
88 | "Route tag"; | |
89 | } | |
90 | ||
556d5006 | 91 | uses frr-nexthop:frr-nexthop; |
92 | } | |
93 | } | |
94 | ||
95 | augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" { | |
56822e76 | 96 | container staticd { |
556d5006 | 97 | when "../frr-rt:type = 'frr-staticd:staticd'" { |
56822e76 | 98 | description |
556d5006 | 99 | "This container is only valid for the 'staticd' routing |
56822e76 | 100 | protocol."; |
101 | } | |
102 | description | |
556d5006 | 103 | "Support for a 'staticd' pseudo-protocol instance |
104 | consists of a list of routes."; | |
105 | list route-list { | |
314825ff | 106 | key "prefix afi-safi"; |
56822e76 | 107 | description |
556d5006 | 108 | "List of staticd IP routes."; |
109 | leaf prefix { | |
110 | type inet:ip-prefix; | |
56822e76 | 111 | description |
556d5006 | 112 | "IP prefix."; |
56822e76 | 113 | } |
314825ff | 114 | leaf afi-safi { |
115 | type identityref { | |
116 | base frr-rt:afi-safi-type; | |
117 | } | |
118 | description | |
119 | "AFI-SAFI type."; | |
120 | } | |
56822e76 | 121 | |
73df597f RZ |
122 | uses staticd-prefix-attributes { |
123 | augment "path-list/frr-nexthops/nexthop" { | |
124 | container bfd-monitoring { | |
125 | description "BFD monitoring options."; | |
126 | presence | |
127 | "Present if BFD configuration is available."; | |
128 | ||
129 | when "../nh-type = 'ip4' or ../nh-type = 'ip4-ifindex' or | |
130 | ../nh-type = 'ip6' or ../nh-type = 'ip6-ifindex'"; | |
131 | uses frr-bfdd:bfd-monitoring; | |
132 | } | |
133 | } | |
134 | } | |
56822e76 | 135 | |
556d5006 | 136 | list src-list { |
137 | key "src-prefix"; | |
138 | leaf src-prefix { | |
139 | type inet:ipv6-prefix; | |
140 | description | |
141 | "IPv6 source prefix"; | |
56822e76 | 142 | } |
556d5006 | 143 | |
144 | uses staticd-prefix-attributes; | |
56822e76 | 145 | } |
146 | } | |
147 | } | |
148 | } | |
149 | } |