]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-pathd.yang
Merge pull request #7639 from qlyoung/frr-lua
[mirror_frr.git] / yang / frr-pathd.yang
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";
87 }
88 leaf sid-value {
89 type rt-types:mpls-label;
90 mandatory true;
91 description "MPLS label value";
92 }
93 container nai {
94 presence "The segement has a Node or Adjacency Identifier";
95 leaf type {
96 description "NAI type";
97 mandatory true;
98 type enumeration {
99 enum ipv4_node {
100 value 1;
101 description "IPv4 node identifier";
102 }
103 enum ipv6_node {
104 value 2;
105 description "IPv6 node identifier";
106 }
107 enum ipv4_adjacency {
108 value 3;
109 description "IPv4 adjacency";
110 }
111 enum ipv6_adjacency {
112 value 4;
113 description "IPv6 adjacency";
114 }
115 enum ipv4_unnumbered_adjacency {
116 value 5;
117 description "IPv4 unnumbered adjacency";
118 }
119 }
120 }
121 leaf local-address {
122 type inet:ip-address;
123 mandatory true;
124 }
125 leaf local-interface {
126 type uint32;
127 mandatory true;
128 when "../type = 'ipv4_unnumbered_adjacency'";
129 }
130 leaf remote-address {
131 type inet:ip-address;
132 mandatory true;
133 when "../type = 'ipv4_adjacency' or ../type = 'ipv6_adjacency' or ../type = 'ipv4_unnumbered_adjacency'";
134 }
135 leaf remote-interface {
136 type uint32;
137 mandatory true;
138 when "../type = 'ipv4_unnumbered_adjacency'";
139 }
140 }
141 }
142 }
143 list policy {
144 key "color endpoint";
145 unique "name";
146 leaf color {
147 type uint32;
148 description
149 "Color of the SR Policy.";
150 }
151 leaf endpoint {
152 type inet:ip-address;
153 description
154 "Indication for the endpoint of the SR Policy.";
155 }
156 leaf name {
157 type string {
158 length "1..64";
159 }
160 description
161 "Name of the SR Policy.";
162 }
163 leaf binding-sid {
164 type rt-types:mpls-label;
165 description
166 "BSID of the SR Policy.";
167 }
168 leaf is-operational {
169 type boolean;
170 config false;
171 description
172 "True if a valid candidate path of this policy is operational in zebra, False otherwise";
173 }
174 list candidate-path {
175 unique "name";
176 description
177 "List of Candidate Paths of the SR Policy.";
178 key "preference";
179 leaf preference {
180 type uint32;
181 description
182 "Administrative preference.";
183 }
184 leaf name {
185 type string {
186 length "1..64";
187 }
188 mandatory true;
189 description
190 "Symbolic Name of the Candidate Path.";
191 }
192 leaf is-best-candidate-path {
193 type boolean;
194 config false;
195 description
196 "True if the candidate path is the best candidate path, False otherwise";
197 }
198 leaf protocol-origin {
199 type protocol-origin-type;
200 mandatory true;
201 description
202 "Indication for the protocol origin of the Candidate Path.";
203 }
204 leaf originator {
205 type originator-type;
206 mandatory true;
207 description "Originator of the candidate path";
208 }
209 leaf discriminator {
210 type uint32;
211 config false;
212 description "Candidate path distinguisher";
213 }
214 leaf type {
215 description
216 "Type of the Candidate Path.";
217 mandatory true;
218 type enumeration {
219 enum explicit {
220 value 1;
221 }
222 enum dynamic {
223 value 2;
224 }
225 }
226 }
227 leaf segment-list-name {
228 type leafref {
229 path ../../../segment-list/name;
230 }
231 description
232 "The name of the Segment List to use as LSP.";
233 }
234 container constraints {
235 when "../type = 'dynamic'";
236 description
237 "Generic dynamic path constraints";
238 container bandwidth {
239 presence "If the candidate has a bandwidth constraint";
240 description
241 "The bandwidth needed by the candidate path.";
242 leaf required {
243 type boolean;
244 default "true";
245 description
246 "If the bandwidth limitation is a requirement or only a suggestion";
247 }
248 leaf value {
249 mandatory true;
250 type decimal64 {
251 fraction-digits 6;
252 }
253 }
254 }
255 container affinity {
256 description
257 "Affinity let you configure how the links should be used when calculating a path.";
258 leaf exclude-any {
259 type uint32;
260 description
261 "A 32-bit vector representing a set of attribute filters which renders a link unacceptable.";
262 }
263 leaf include-any {
264 type uint32;
265 description
266 "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.";
267 }
268 leaf include-all {
269 type uint32;
270 description
271 "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.";
272 }
273 }
274 list metrics {
275 key "type";
276 leaf type {
277 description
278 "Type of the metric.";
279 type enumeration {
280 enum igp {
281 value 1;
282 description "IGP metric";
283 }
284 enum te {
285 value 2;
286 description "TE metric";
287 }
288 enum hc {
289 value 3;
290 description "Hop Counts";
291 }
292 enum abc {
293 value 4;
294 description "Aggregate bandwidth consumption";
295 }
296 enum lmll {
297 value 5;
298 description "Load of the most loaded link";
299 }
300 enum cigp {
301 value 6;
302 description "Cumulative IGP cost";
303 }
304 enum cte {
305 value 7;
306 description "Cumulative TE cost";
307 }
308 enum pigp {
309 value 8;
310 description "P2MP IGP metric";
311 }
312 enum pte {
313 value 9;
314 description "P2MP TE metric";
315 }
316 enum phc {
317 value 10;
318 description "P2MP hop count metric";
319 }
320 enum msd {
321 value 11;
322 description "Segment-ID (SID) Depth";
323 }
324 enum pd {
325 value 12;
326 description "Path Delay metric";
327 }
328 enum pdv {
329 value 13;
330 description "Path Delay Variation metric";
331 }
332 enum pl {
333 value 14;
334 description "Path Loss metric";
335 }
336 enum ppd {
337 value 15;
338 description "P2MP Path Delay metric";
339 }
340 enum ppdv {
341 value 16;
342 description "P2MP Path Delay variation metric";
343 }
344 enum ppl {
345 value 17;
346 description "P2MP Path Loss metric";
347 }
348 enum nap {
349 value 18;
350 description "Number of adaptations on a path";
351 }
352 enum nlp {
353 value 19;
354 description "Number of layers on a path";
355 }
356 enum dc {
357 value 20;
358 description "Domain Count metric";
359 }
360 enum bnc {
361 value 21;
362 description "Border Node Count metric";
363 }
364 }
365 }
366 leaf required {
367 type boolean;
368 default "true";
369 description
370 "If the metric is a requirement, or if it is only a suggestion";
371 }
372 leaf is-bound {
373 type boolean;
374 description
375 "Defines if the value is a bound (a maximum) for the path metric that must not be exceeded.";
376 }
377 leaf is-computed {
378 type boolean;
379 description
380 "Defines if the value has been generated by the originator of the path.";
381 }
382 leaf value {
383 mandatory true;
384 type decimal64 {
385 fraction-digits 6;
386 }
387 }
388 }
389 container objective-function {
390 presence "If the candidate has an objective function constraint";
391 description
392 "Define objective function constraint as a list of prefered functions";
393 leaf required {
394 type boolean;
395 default "true";
396 description
397 "If an objective function is a requirement, or if it is only a suggestion";
398 }
399 leaf type {
400 description
401 "Type of objective function.";
402 mandatory true;
403 type enumeration {
404 enum mcp {
405 value 1;
406 description "Minimum Cost Path";
407 }
408 enum mlp {
409 value 2;
410 description "Minimum Load Path";
411 }
412 enum mbp {
413 value 3;
414 description "Maximum residual Bandwidth Path";
415 }
416 enum mbc {
417 value 4;
418 description "Minimize aggregate Bandwidth Consumption";
419 }
420 enum mll {
421 value 5;
422 description "Minimize the Load of the most loaded Link";
423 }
424 enum mcc {
425 value 6;
426 description "Minimize the Cumulative Cost of a set of paths";
427 }
428 enum spt {
429 value 7;
430 description "Shortest Path Tree";
431 }
432 enum mct {
433 value 8;
434 description "Minimum Cost Tree";
435 }
436 enum mplp {
437 value 9;
438 description "Minimum Packet Loss Path";
439 }
440 enum mup {
441 value 10;
442 description "Maximum Under-Utilized Path";
443 }
444 enum mrup {
445 value 11;
446 description "Maximum Reserved Under-Utilized Path";
447 }
448 enum mtd {
449 value 12;
450 description "Minimize the number of Transit Domains";
451 }
452 enum mbn {
453 value 13;
454 description "Minimize the number of Border Nodes";
455 }
456 enum mctd {
457 value 14;
458 description "Minimize the number of Common Transit Domains";
459 }
460 enum msl {
461 value 15;
462 description "Minimize the number of Shared Links";
463 }
464 enum mss {
465 value 16;
466 description "Minimize the number of Shared SRLGs";
467 }
468 enum msn {
469 value 17;
470 description "Minimize the number of Shared Nodes";
471 }
472 }
473 }
474 }
475 }
476 }
477 }
478 }
479 }
480 }