]>
Commit | Line | Data |
---|---|---|
8b043166 | 1 | module frr-routing { |
2 | yang-version "1.1"; | |
3 | namespace "http://frrouting.org/yang/routing"; | |
4 | prefix "rt"; | |
5 | ||
6 | import ietf-yang-types { | |
7 | prefix "yang"; | |
8 | } | |
9 | ||
10 | import frr-vrf { | |
11 | prefix frr-vrf; | |
12 | } | |
13 | ||
14 | organization | |
78891caf | 15 | "FRRouting"; |
8b043166 | 16 | |
17 | contact | |
18 | "FRR Users List: <mailto:frog@lists.frrouting.org> | |
19 | FRR Development List: <mailto:dev@lists.frrouting.org>"; | |
20 | ||
21 | description | |
22 | "This YANG module defines essential components for the management | |
fe3b629a RW |
23 | of a routing subsystem. |
24 | ||
25 | Copyright 2020 FRRouting | |
26 | ||
27 | Redistribution and use in source and binary forms, with or without | |
28 | modification, are permitted provided that the following conditions | |
29 | are met: | |
30 | ||
31 | 1. Redistributions of source code must retain the above copyright notice, | |
32 | this list of conditions and the following disclaimer. | |
33 | ||
34 | 2. Redistributions in binary form must reproduce the above copyright | |
35 | notice, this list of conditions and the following disclaimer in the | |
36 | documentation and/or other materials provided with the distribution. | |
37 | ||
38 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
39 | \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
40 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
41 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
42 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
43 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
44 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
45 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
46 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
47 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
48 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; | |
8b043166 | 49 | |
50 | revision 2019-08-15 { | |
51 | description | |
52 | "Initial revision."; | |
53 | } | |
54 | ||
55 | /* Identities */ | |
56 | ||
57 | identity address-family { | |
58 | description | |
59 | "Base identity from which identities describing address | |
60 | families are derived."; | |
61 | } | |
62 | ||
63 | identity ipv4 { | |
64 | base address-family; | |
65 | description | |
66 | "This identity represents an IPv4 address family."; | |
67 | } | |
68 | ||
69 | identity ipv6 { | |
70 | base address-family; | |
71 | description | |
72 | "This identity represents an IPv6 address family."; | |
73 | } | |
74 | ||
755100ac | 75 | identity afi-safi-type { |
76 | description | |
77 | "Base identity type (AFI,SAFI) tuples for RIB"; | |
78 | } | |
79 | ||
80 | identity ipv4-unicast { | |
81 | base afi-safi-type; | |
82 | description | |
83 | "This identity represents the IPv4 unicast address family."; | |
84 | } | |
85 | ||
86 | identity ipv6-unicast { | |
87 | base afi-safi-type; | |
88 | description | |
89 | "This identity represents the IPv6 unicast address family."; | |
90 | } | |
91 | ||
92 | identity ipv4-multicast { | |
93 | base afi-safi-type; | |
94 | description | |
95 | "This identity represents the IPv4 multicast address family."; | |
96 | } | |
97 | ||
98 | identity ipv6-multicast { | |
99 | base afi-safi-type; | |
100 | description | |
101 | "This identity represents the IPv6 multicast address family."; | |
102 | } | |
103 | ||
2228b116 | 104 | identity ipv4-labeled-unicast { |
105 | base afi-safi-type; | |
106 | description | |
107 | "This identity represents the IPv4 labeled unicast address family."; | |
108 | } | |
109 | ||
110 | ||
111 | identity ipv6-labeled-unicast { | |
112 | base afi-safi-type; | |
113 | description | |
114 | "This identity represents the IPv6 labeled unicast address family."; | |
115 | } | |
116 | ||
117 | ||
118 | identity l3vpn-ipv4-unicast { | |
119 | base afi-safi-type; | |
120 | description | |
121 | "This identity represents the L3vpn IPv4 unicast address family."; | |
122 | } | |
123 | ||
124 | ||
125 | identity l3vpn-ipv6-unicast { | |
126 | base afi-safi-type; | |
127 | description | |
128 | "This identity represents the L3vpn IPv6 unicast address family."; | |
129 | } | |
130 | ||
131 | ||
132 | identity l3vpn-ipv4-multicast { | |
133 | base afi-safi-type; | |
134 | description | |
135 | "This identity represents the L3vpn IPv4 multicast address family."; | |
136 | } | |
137 | ||
138 | ||
139 | identity l3vpn-ipv6-multicast { | |
140 | base afi-safi-type; | |
141 | description | |
142 | "This identity represents the L3vpn IPv6 multicast address family."; | |
143 | } | |
144 | ||
145 | ||
146 | identity l2vpn-vpls { | |
147 | base afi-safi-type; | |
148 | description | |
149 | "This identity represents the L2vpn VPLS address family."; | |
150 | } | |
151 | ||
152 | ||
153 | identity l2vpn-evpn { | |
154 | base afi-safi-type; | |
155 | description | |
156 | "This identity represents the L2vpn EVPN address family."; | |
157 | } | |
158 | ||
159 | ||
160 | identity ipv4-flowspec { | |
161 | base afi-safi-type; | |
162 | description | |
163 | "This identity represents the IPv4 flowspec address family."; | |
164 | } | |
165 | ||
166 | ||
167 | identity ipv6-flowspec { | |
168 | base afi-safi-type; | |
169 | description | |
170 | "This identity represents the IPv6 flowspec address family."; | |
171 | } | |
172 | ||
173 | ||
8b043166 | 174 | identity control-plane-protocol { |
175 | description | |
176 | "Base identity from which control-plane protocol identities are | |
177 | derived."; | |
178 | } | |
179 | ||
180 | identity routing-protocol { | |
181 | base control-plane-protocol; | |
182 | description | |
183 | "Identity from which Layer 3 routing protocol identities are | |
184 | derived."; | |
185 | } | |
186 | ||
187 | /* Type Definitions */ | |
188 | ||
189 | typedef administrative-distance { | |
190 | type uint8 { | |
191 | range "1..255"; | |
192 | } | |
193 | description | |
194 | "Admin distance associated with the route."; | |
195 | } | |
196 | ||
197 | /* Groupings */ | |
198 | ||
199 | grouping address-family { | |
200 | description | |
201 | "This grouping provides a leaf identifying an address | |
202 | family."; | |
203 | leaf address-family { | |
204 | type identityref { | |
205 | base address-family; | |
206 | } | |
207 | mandatory true; | |
208 | description | |
209 | "Address family."; | |
210 | } | |
211 | } | |
212 | ||
213 | grouping router-id { | |
214 | description | |
215 | "This grouping provides a router ID."; | |
216 | leaf router-id { | |
217 | type yang:dotted-quad; | |
218 | description | |
219 | "A 32-bit number in the form of a dotted quad that is used by | |
220 | some routing protocols identifying a router."; | |
221 | reference | |
222 | "RFC 2328: OSPF Version 2"; | |
223 | } | |
224 | } | |
225 | ||
226 | /* Data nodes */ | |
227 | ||
228 | container routing { | |
229 | description | |
230 | "Configuration parameters for the routing subsystem."; | |
231 | container control-plane-protocols { | |
232 | description | |
233 | "Support for control-plane protocol instances."; | |
234 | list control-plane-protocol { | |
235 | key "type name vrf"; | |
236 | description | |
237 | "Each entry contains a control-plane protocol instance."; | |
238 | leaf type { | |
239 | type identityref { | |
240 | base control-plane-protocol; | |
241 | } | |
242 | description | |
243 | "Type of the control-plane protocol"; | |
244 | } | |
245 | leaf name { | |
246 | type string; | |
247 | description | |
248 | "An arbitrary name of the control-plane protocol | |
249 | instance."; | |
250 | } | |
251 | leaf vrf { | |
806defc8 | 252 | type frr-vrf:vrf-ref; |
8b043166 | 253 | description |
254 | "vrf for control-plane protocol"; | |
255 | } | |
256 | } | |
257 | } | |
258 | } | |
259 | } |