]>
Commit | Line | Data |
---|---|---|
4d7b695d SM |
1 | module frr-pathd { |
2 | yang-version 1.1; | |
3 | namespace "http://frrouting.org/yang/pathd"; | |
4 | prefix frr-pathd; | |
5 | ||
6 | import ietf-inet-types { | |
7 | prefix inet; | |
8 | } | |
9 | import ietf-yang-types { | |
10 | prefix yang; | |
11 | } | |
12 | import ietf-routing-types { | |
13 | prefix rt-types; | |
14 | } | |
15 | import frr-interface { | |
16 | prefix frr-interface; | |
17 | } | |
18 | ||
19 | organization | |
20 | "Free Range Routing"; | |
21 | contact | |
22 | "FRR Users List: <mailto:frog@lists.frrouting.org> | |
23 | FRR Development List: <mailto:dev@lists.frrouting.org>"; | |
24 | description | |
25 | "This module defines a model for managing FRR pathd daemon."; | |
26 | ||
27 | revision 2018-11-06 { | |
28 | description | |
29 | "Initial revision."; | |
30 | } | |
31 | ||
32 | typedef protocol-origin-type { | |
33 | description | |
34 | "Indication for the protocol origin of an object."; | |
35 | type enumeration { | |
36 | enum pcep { | |
37 | value 1; | |
38 | description "The object was created through PCEP"; | |
39 | } | |
40 | enum bgp { | |
41 | value 2; | |
42 | description "The object was created through GBP"; | |
43 | } | |
44 | enum local { | |
45 | value 3; | |
46 | description "The object was created through CLI, Yang model via Netconf, gRPC, etc"; | |
47 | } | |
48 | } | |
49 | } | |
50 | ||
51 | typedef originator-type { | |
52 | type string { | |
53 | length "1..64"; | |
54 | } | |
55 | description | |
56 | "Identifier of the originator of an object, could be 'config', '1.1.1.1:4189' or '2001:db8:85a3::8a2e:370:7334:4189'"; | |
57 | } | |
58 | ||
59 | container pathd { | |
60 | container srte { | |
61 | list segment-list { | |
62 | key "name"; | |
63 | description "Segment-list properties"; | |
64 | leaf name { | |
65 | type string { | |
66 | length "1..64"; | |
67 | } | |
68 | description "Segment-list name"; | |
69 | } | |
70 | leaf protocol-origin { | |
71 | type protocol-origin-type; | |
72 | mandatory true; | |
73 | description | |
74 | "Indication for the protocol origin of the segment list."; | |
75 | } | |
76 | leaf originator { | |
77 | type originator-type; | |
78 | mandatory true; | |
79 | description "Originator of the segment list"; | |
80 | } | |
81 | list segment { | |
82 | key "index"; | |
83 | description "Configure Segment/hop at the index"; | |
84 | leaf index { | |
85 | type uint32; | |
86 | description "Segment index"; | |
f2b9485d JG |
87 | } |
88 | leaf sid-value { | |
89 | type rt-types:mpls-label; | |
90 | description "MPLS label value"; | |
91 | } | |
92 | container nai { | |
93 | presence "The segment has a Node or Adjacency Identifier"; | |
94 | leaf type { | |
95 | description "NAI type"; | |
4d7b695d | 96 | mandatory true; |
f2b9485d JG |
97 | type enumeration { |
98 | enum ipv4_node { | |
99 | value 1; | |
100 | description "IPv4 node identifier"; | |
101 | } | |
102 | enum ipv6_node { | |
103 | value 2; | |
104 | description "IPv6 node identifier"; | |
105 | } | |
106 | enum ipv4_adjacency { | |
107 | value 3; | |
108 | description "IPv4 adjacency"; | |
109 | } | |
110 | enum ipv6_adjacency { | |
111 | value 4; | |
112 | description "IPv6 adjacency"; | |
113 | } | |
114 | enum ipv4_unnumbered_adjacency { | |
115 | value 5; | |
116 | description "IPv4 unnumbered adjacency"; | |
117 | } | |
118 | enum ipv4_local_iface { | |
119 | value 7; | |
120 | description "IPv4 prefix with local interface id"; | |
121 | } | |
122 | enum ipv6_local_iface { | |
123 | value 8; | |
124 | description "IPv6 prefix with local interface id"; | |
125 | } | |
126 | enum ipv4_algo { | |
127 | value 9; | |
128 | description "IPv4 prefix with optional algorithm"; | |
129 | } | |
130 | enum ipv6_algo { | |
131 | value 10; | |
132 | description "IPv6 prefix with optional algorithm"; | |
4d7b695d SM |
133 | } |
134 | } | |
f2b9485d JG |
135 | } |
136 | leaf local-address { | |
137 | type inet:ip-address; | |
138 | mandatory true; | |
139 | } | |
140 | leaf local-prefix-len { | |
141 | type uint8; | |
142 | mandatory true; | |
143 | when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_algo' or ../type = 'ipv6_algo'"; | |
144 | } | |
145 | leaf local-interface { | |
146 | type uint32; | |
147 | mandatory true; | |
148 | when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_unnumbered_adjacency'"; | |
149 | } | |
150 | leaf remote-address { | |
151 | type inet:ip-address; | |
4d7b695d SM |
152 | mandatory true; |
153 | when "../type = 'ipv4_adjacency' or ../type = 'ipv6_adjacency' or ../type = 'ipv4_unnumbered_adjacency'"; | |
154 | } | |
155 | leaf remote-interface { | |
156 | type uint32; | |
157 | mandatory true; | |
158 | when "../type = 'ipv4_unnumbered_adjacency'"; | |
159 | } | |
f2b9485d JG |
160 | leaf algorithm { |
161 | type uint8; | |
162 | mandatory true; | |
163 | when "../type = 'ipv4_algo' or ../type = 'ipv6_algo'"; | |
164 | } | |
4d7b695d SM |
165 | } |
166 | } | |
167 | } | |
168 | list policy { | |
169 | key "color endpoint"; | |
170 | unique "name"; | |
171 | leaf color { | |
172 | type uint32; | |
173 | description | |
174 | "Color of the SR Policy."; | |
175 | } | |
176 | leaf endpoint { | |
177 | type inet:ip-address; | |
178 | description | |
179 | "Indication for the endpoint of the SR Policy."; | |
180 | } | |
181 | leaf name { | |
182 | type string { | |
183 | length "1..64"; | |
184 | } | |
185 | description | |
186 | "Name of the SR Policy."; | |
187 | } | |
188 | leaf binding-sid { | |
189 | type rt-types:mpls-label; | |
190 | description | |
191 | "BSID of the SR Policy."; | |
192 | } | |
193 | leaf is-operational { | |
194 | type boolean; | |
195 | config false; | |
196 | description | |
197 | "True if a valid candidate path of this policy is operational in zebra, False otherwise"; | |
198 | } | |
199 | list candidate-path { | |
200 | unique "name"; | |
201 | description | |
202 | "List of Candidate Paths of the SR Policy."; | |
203 | key "preference"; | |
204 | leaf preference { | |
205 | type uint32; | |
206 | description | |
207 | "Administrative preference."; | |
208 | } | |
209 | leaf name { | |
210 | type string { | |
211 | length "1..64"; | |
212 | } | |
213 | mandatory true; | |
214 | description | |
215 | "Symbolic Name of the Candidate Path."; | |
216 | } | |
217 | leaf is-best-candidate-path { | |
218 | type boolean; | |
219 | config false; | |
220 | description | |
221 | "True if the candidate path is the best candidate path, False otherwise"; | |
222 | } | |
223 | leaf protocol-origin { | |
224 | type protocol-origin-type; | |
225 | mandatory true; | |
226 | description | |
227 | "Indication for the protocol origin of the Candidate Path."; | |
228 | } | |
229 | leaf originator { | |
230 | type originator-type; | |
231 | mandatory true; | |
232 | description "Originator of the candidate path"; | |
233 | } | |
234 | leaf discriminator { | |
235 | type uint32; | |
236 | config false; | |
237 | description "Candidate path distinguisher"; | |
238 | } | |
239 | leaf type { | |
240 | description | |
241 | "Type of the Candidate Path."; | |
242 | mandatory true; | |
243 | type enumeration { | |
244 | enum explicit { | |
245 | value 1; | |
246 | } | |
247 | enum dynamic { | |
248 | value 2; | |
249 | } | |
250 | } | |
251 | } | |
252 | leaf segment-list-name { | |
253 | type leafref { | |
254 | path ../../../segment-list/name; | |
255 | } | |
256 | description | |
257 | "The name of the Segment List to use as LSP."; | |
258 | } | |
259 | container constraints { | |
260 | when "../type = 'dynamic'"; | |
261 | description | |
262 | "Generic dynamic path constraints"; | |
263 | container bandwidth { | |
264 | presence "If the candidate has a bandwidth constraint"; | |
265 | description | |
266 | "The bandwidth needed by the candidate path."; | |
267 | leaf required { | |
268 | type boolean; | |
269 | default "true"; | |
270 | description | |
271 | "If the bandwidth limitation is a requirement or only a suggestion"; | |
272 | } | |
273 | leaf value { | |
274 | mandatory true; | |
275 | type decimal64 { | |
276 | fraction-digits 6; | |
277 | } | |
278 | } | |
279 | } | |
280 | container affinity { | |
281 | description | |
282 | "Affinity let you configure how the links should be used when calculating a path."; | |
283 | leaf exclude-any { | |
284 | type uint32; | |
285 | description | |
286 | "A 32-bit vector representing a set of attribute filters which renders a link unacceptable."; | |
287 | } | |
288 | leaf include-any { | |
289 | type uint32; | |
290 | description | |
291 | "A 32-bit vector representing a set of attribute filters which renders a link acceptable. A null set (all bits set to zero) automatically passes."; | |
292 | } | |
293 | leaf include-all { | |
294 | type uint32; | |
295 | description | |
296 | "A 32-bit vector representing a set of attribute filters which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes."; | |
297 | } | |
298 | } | |
299 | list metrics { | |
300 | key "type"; | |
301 | leaf type { | |
302 | description | |
303 | "Type of the metric."; | |
304 | type enumeration { | |
305 | enum igp { | |
306 | value 1; | |
307 | description "IGP metric"; | |
308 | } | |
309 | enum te { | |
310 | value 2; | |
311 | description "TE metric"; | |
312 | } | |
313 | enum hc { | |
314 | value 3; | |
315 | description "Hop Counts"; | |
316 | } | |
317 | enum abc { | |
318 | value 4; | |
319 | description "Aggregate bandwidth consumption"; | |
320 | } | |
321 | enum lmll { | |
322 | value 5; | |
323 | description "Load of the most loaded link"; | |
324 | } | |
325 | enum cigp { | |
326 | value 6; | |
327 | description "Cumulative IGP cost"; | |
328 | } | |
329 | enum cte { | |
330 | value 7; | |
331 | description "Cumulative TE cost"; | |
332 | } | |
333 | enum pigp { | |
334 | value 8; | |
335 | description "P2MP IGP metric"; | |
336 | } | |
337 | enum pte { | |
338 | value 9; | |
339 | description "P2MP TE metric"; | |
340 | } | |
341 | enum phc { | |
342 | value 10; | |
343 | description "P2MP hop count metric"; | |
344 | } | |
345 | enum msd { | |
346 | value 11; | |
347 | description "Segment-ID (SID) Depth"; | |
348 | } | |
349 | enum pd { | |
350 | value 12; | |
351 | description "Path Delay metric"; | |
352 | } | |
353 | enum pdv { | |
354 | value 13; | |
355 | description "Path Delay Variation metric"; | |
356 | } | |
357 | enum pl { | |
358 | value 14; | |
359 | description "Path Loss metric"; | |
360 | } | |
361 | enum ppd { | |
362 | value 15; | |
363 | description "P2MP Path Delay metric"; | |
364 | } | |
365 | enum ppdv { | |
366 | value 16; | |
367 | description "P2MP Path Delay variation metric"; | |
368 | } | |
369 | enum ppl { | |
370 | value 17; | |
371 | description "P2MP Path Loss metric"; | |
372 | } | |
373 | enum nap { | |
374 | value 18; | |
375 | description "Number of adaptations on a path"; | |
376 | } | |
377 | enum nlp { | |
378 | value 19; | |
379 | description "Number of layers on a path"; | |
380 | } | |
381 | enum dc { | |
382 | value 20; | |
383 | description "Domain Count metric"; | |
384 | } | |
385 | enum bnc { | |
386 | value 21; | |
387 | description "Border Node Count metric"; | |
388 | } | |
389 | } | |
390 | } | |
391 | leaf required { | |
392 | type boolean; | |
393 | default "true"; | |
394 | description | |
395 | "If the metric is a requirement, or if it is only a suggestion"; | |
396 | } | |
397 | leaf is-bound { | |
398 | type boolean; | |
399 | description | |
400 | "Defines if the value is a bound (a maximum) for the path metric that must not be exceeded."; | |
401 | } | |
402 | leaf is-computed { | |
403 | type boolean; | |
404 | description | |
405 | "Defines if the value has been generated by the originator of the path."; | |
406 | } | |
407 | leaf value { | |
408 | mandatory true; | |
409 | type decimal64 { | |
410 | fraction-digits 6; | |
411 | } | |
412 | } | |
413 | } | |
414 | container objective-function { | |
415 | presence "If the candidate has an objective function constraint"; | |
416 | description | |
dfd4f44f | 417 | "Define objective function constraint as a list of preferred functions"; |
4d7b695d SM |
418 | leaf required { |
419 | type boolean; | |
420 | default "true"; | |
421 | description | |
422 | "If an objective function is a requirement, or if it is only a suggestion"; | |
423 | } | |
424 | leaf type { | |
425 | description | |
426 | "Type of objective function."; | |
427 | mandatory true; | |
428 | type enumeration { | |
429 | enum mcp { | |
430 | value 1; | |
431 | description "Minimum Cost Path"; | |
432 | } | |
433 | enum mlp { | |
434 | value 2; | |
435 | description "Minimum Load Path"; | |
436 | } | |
437 | enum mbp { | |
438 | value 3; | |
439 | description "Maximum residual Bandwidth Path"; | |
440 | } | |
441 | enum mbc { | |
442 | value 4; | |
443 | description "Minimize aggregate Bandwidth Consumption"; | |
444 | } | |
445 | enum mll { | |
446 | value 5; | |
447 | description "Minimize the Load of the most loaded Link"; | |
448 | } | |
449 | enum mcc { | |
450 | value 6; | |
451 | description "Minimize the Cumulative Cost of a set of paths"; | |
452 | } | |
453 | enum spt { | |
454 | value 7; | |
455 | description "Shortest Path Tree"; | |
456 | } | |
457 | enum mct { | |
458 | value 8; | |
459 | description "Minimum Cost Tree"; | |
460 | } | |
461 | enum mplp { | |
462 | value 9; | |
463 | description "Minimum Packet Loss Path"; | |
464 | } | |
465 | enum mup { | |
466 | value 10; | |
467 | description "Maximum Under-Utilized Path"; | |
468 | } | |
469 | enum mrup { | |
470 | value 11; | |
471 | description "Maximum Reserved Under-Utilized Path"; | |
472 | } | |
473 | enum mtd { | |
474 | value 12; | |
475 | description "Minimize the number of Transit Domains"; | |
476 | } | |
477 | enum mbn { | |
478 | value 13; | |
479 | description "Minimize the number of Border Nodes"; | |
480 | } | |
481 | enum mctd { | |
482 | value 14; | |
483 | description "Minimize the number of Common Transit Domains"; | |
484 | } | |
485 | enum msl { | |
486 | value 15; | |
487 | description "Minimize the number of Shared Links"; | |
488 | } | |
489 | enum mss { | |
490 | value 16; | |
491 | description "Minimize the number of Shared SRLGs"; | |
492 | } | |
493 | enum msn { | |
494 | value 17; | |
495 | description "Minimize the number of Shared Nodes"; | |
496 | } | |
497 | } | |
498 | } | |
499 | } | |
500 | } | |
501 | } | |
502 | } | |
503 | } | |
504 | } | |
505 | } |