]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-bgp-route-map.yang
Merge pull request #13455 from sri-mohan1/srib-ldpd
[mirror_frr.git] / yang / frr-bgp-route-map.yang
1 module frr-bgp-route-map {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/bgp-route-map";
4 prefix frr-bgp-route-map;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9
10 import frr-route-map {
11 prefix frr-route-map;
12 }
13
14 import frr-filter {
15 prefix filter;
16 }
17
18 import frr-bgp-filter {
19 prefix bgp-filter;
20 }
21
22 import ietf-routing-types {
23 prefix rt-types;
24 }
25
26 organization
27 "Free Range Routing";
28 contact
29 "FRR Users List: <mailto:frog@lists.frrouting.org>
30 FRR Development List: <mailto:dev@lists.frrouting.org>";
31 description
32 "This module defines bgp route map settings";
33
34 revision 2020-01-02 {
35 description
36 "Initial revision";
37 }
38
39 identity match-alias {
40 base frr-route-map:rmap-match-type;
41 description
42 "Match BGP community alias name";
43 }
44
45 identity match-local-preference {
46 base frr-route-map:rmap-match-type;
47 description
48 "Match local-preference of routes";
49 }
50
51 identity match-script {
52 base frr-route-map:rmap-match-type;
53 description
54 "Match script of routes";
55 }
56
57 identity match-origin {
58 base frr-route-map:rmap-match-type;
59 description
60 "Match BGP route origin code";
61 }
62
63 identity rpki {
64 base frr-route-map:rmap-match-type;
65 description
66 "Control rpki specific settings";
67 }
68
69 identity rpki-extcommunity {
70 base frr-route-map:rmap-match-type;
71 description
72 "Control rpki specific settings derived from extended community";
73 }
74
75 identity probability {
76 base frr-route-map:rmap-match-type;
77 description
78 "Match portion of routes defined by percentage value";
79 }
80
81 identity source-vrf {
82 base frr-route-map:rmap-match-type;
83 description
84 "Match source vrf of routes";
85 }
86
87 identity peer {
88 base frr-route-map:rmap-match-type;
89 description
90 "Match peer address";
91 }
92
93 identity mac-address-list {
94 base frr-route-map:rmap-match-type;
95 description
96 "Match MAC address access-list";
97 }
98
99 identity ip-route-source {
100 base frr-route-map:rmap-match-type;
101 description
102 "Match advertising source address of route";
103 }
104
105 identity ip-route-source-prefix-list {
106 base frr-route-map:rmap-match-type;
107 description
108 "Match advertising source address of route";
109 }
110
111 identity evpn-route-type {
112 base frr-route-map:rmap-match-type;
113 description
114 "Match EVPN route type";
115 }
116
117 identity evpn-default-route {
118 base frr-route-map:rmap-match-type;
119 description
120 "Match EVPN default Type-5 route";
121 }
122
123 identity evpn-vni {
124 base frr-route-map:rmap-match-type;
125 description
126 "Match EVPN VNI";
127 }
128
129 identity evpn-rd {
130 base frr-route-map:rmap-match-type;
131 description
132 "Match EVPN route distinguisher";
133 }
134
135 identity match-community {
136 base frr-route-map:rmap-match-type;
137 description
138 "Match BGP community list";
139 }
140
141 identity match-large-community {
142 base frr-route-map:rmap-match-type;
143 description
144 "Match BGP large-community list";
145 }
146
147 identity match-extcommunity {
148 base frr-route-map:rmap-match-type;
149 description
150 "Match BGP extcommunity list";
151 }
152
153 identity as-path-list {
154 base frr-route-map:rmap-match-type;
155 description
156 "Match BGP AS path list";
157 }
158
159 identity ipv4-nexthop {
160 base frr-route-map:rmap-match-type;
161 description
162 "Match IPv4 next hop address";
163 }
164
165 identity ipv6-nexthop {
166 base frr-route-map:rmap-match-type;
167 description
168 "Match IPv6 next hop address";
169 }
170
171 identity distance {
172 base frr-route-map:rmap-set-type;
173 description
174 "Set BGP administrative distance to use";
175 }
176
177 identity set-extcommunity-none {
178 base frr-route-map:rmap-set-type;
179 description
180 "Set BGP extended community attribute";
181 }
182
183 identity set-extcommunity-rt {
184 base frr-route-map:rmap-set-type;
185 description
186 "Set BGP extended community attribute";
187 }
188
189 identity set-extcommunity-nt {
190 base frr-route-map:rmap-set-type;
191 description
192 "Set BGP extended community attribute";
193 }
194
195 identity set-extcommunity-soo {
196 base frr-route-map:rmap-set-type;
197 description
198 "Set BGP extended community attribute";
199 }
200
201 identity set-extcommunity-lb {
202 base frr-route-map:rmap-set-type;
203 description
204 "Set BGP extended community attribute";
205 }
206
207 identity set-ipv4-nexthop {
208 base frr-route-map:rmap-set-type;
209 description
210 "Set the IPv4 next-hop to peer-address/unchanged";
211 }
212
213 identity ipv4-vpn-address {
214 base frr-route-map:rmap-set-type;
215 description
216 "Set IPv4 VPN next-hop address";
217 }
218
219 identity ipv6-nexthop-global {
220 base frr-route-map:rmap-set-type;
221 description
222 "Set IPv6 next-hop global address";
223 }
224
225 identity ipv6-prefer-global {
226 base frr-route-map:rmap-set-type;
227 description
228 "Set IPv6 next-hop to prefer global address";
229 }
230
231 identity ipv6-peer-address {
232 base frr-route-map:rmap-set-type;
233 description
234 "Set IPv6 next-hop peer address";
235 }
236
237 identity ipv6-vpn-address {
238 base frr-route-map:rmap-set-type;
239 description
240 "Set IPv6 VPN next-hop address";
241 }
242
243 identity label-index {
244 base frr-route-map:rmap-set-type;
245 description
246 "Set the label index to associate with the prefixs";
247 }
248
249 identity set-local-preference {
250 base frr-route-map:rmap-set-type;
251 description
252 "Set the BGP local preference path attribute";
253 }
254
255 identity set-origin {
256 base frr-route-map:rmap-set-type;
257 description
258 "Set BGP route origin code";
259 }
260
261 identity weight {
262 base frr-route-map:rmap-set-type;
263 description
264 "Set the BGP weight attribute";
265 }
266
267 identity originator-id {
268 base frr-route-map:rmap-set-type;
269 description
270 "Set the BGP originator ID attribute";
271 }
272
273 identity table {
274 base frr-route-map:rmap-set-type;
275 description
276 "Export route to non-main kernel table";
277 }
278
279 identity atomic-aggregate {
280 base frr-route-map:rmap-set-type;
281 description
282 "Set BGP atomic-aggregate attribute";
283 }
284
285 identity aigp-metric {
286 base frr-route-map:rmap-set-type;
287 description
288 "Set BGP AIGP attribute (AIGP TLV Metric)";
289 }
290
291 identity as-path-prepend {
292 base frr-route-map:rmap-set-type;
293 description
294 "Set the BGP AS-path attribute";
295 }
296
297 identity as-path-exclude {
298 base frr-route-map:rmap-set-type;
299 description
300 "Set the BGP AS-path attribute";
301 }
302
303 identity as-path-replace {
304 base frr-route-map:rmap-set-type;
305 description
306 "Replace ASNs to local AS number";
307 }
308
309 identity set-community {
310 base frr-route-map:rmap-set-type;
311 description
312 "Set the BGP community attribute";
313 }
314
315 identity set-large-community {
316 base frr-route-map:rmap-set-type;
317 description
318 "Set the BGP large-community attribute";
319 }
320
321 identity aggregator {
322 base frr-route-map:rmap-set-type;
323 description
324 "Set the BGP aggregator attribute";
325 }
326
327 identity comm-list-delete {
328 base frr-route-map:rmap-set-type;
329 description
330 "Set BGP community list (for deletion)";
331 }
332
333 identity large-comm-list-delete {
334 base frr-route-map:rmap-set-type;
335 description
336 "Set BGP large community list (for deletion)";
337 }
338
339 identity set-evpn-gateway-ip-ipv4 {
340 base frr-route-map:rmap-set-type;
341 description
342 "Set EVPN gateway IP overlay index IPv4";
343 }
344
345 identity set-evpn-gateway-ip-ipv6 {
346 base frr-route-map:rmap-set-type;
347 description
348 "Set EVPN gateway IP overlay index IPv6";
349 }
350
351 identity set-l3vpn-nexthop-encapsulation {
352 base frr-route-map:rmap-set-type;
353 description
354 "Accept L3VPN traffic over other than LSP encapsulation";
355 }
356
357 grouping extcommunity-non-transitive-types {
358 leaf two-octet-as-specific {
359 type boolean;
360 description
361 "Non-Transitive Two-Octet AS-Specific Extended Community";
362 }
363 }
364
365 typedef route-distinguisher {
366 type string {
367 pattern
368 '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
369 + '6[0-4][0-9]{3}|'
370 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
371 + '42949672[0-8][0-9]|'
372 + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
373 + '42949[0-5][0-9]{4}|'
374 + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
375 + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
376 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
377 + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
378 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
379 + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
380 + '655[0-2][0-9]|'
381 + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
382 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
383 + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
384 + '4294967[01][0-9]{2}|'
385 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
386 + '4294[0-8][0-9]{5}|'
387 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
388 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
389 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
390 + '6[0-4][0-9]{3}|'
391 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
392 + '(6(:[a-fA-F0-9]{2}){6})|'
393 + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
394 + '[0-9a-fA-F]{1,12})|'
395 + '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
396 + '6[0-4][0-9]{3}|'
397 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
398 + '42949672[0-8][0-9]|'
399 + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
400 + '42949[0-5][0-9]{4}|'
401 + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
402 + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
403 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)|'
404 + '((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
405 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
406 + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
407 + '655[0-2][0-9]|'
408 + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
409 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
410 + '((429496729[0-5]|42949672[0-8][0-9]|'
411 + '4294967[01][0-9]{2}|'
412 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
413 + '4294[0-8][0-9]{5}|'
414 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
415 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
416 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
417 + '6[0-4][0-9]{3}|'
418 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
419 + '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
420 + '6[0-4][0-9]{3}|'
421 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0).'
422 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
423 + '6[0-4][0-9]{3}|'
424 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):'
425 + '(429496729[0-5]|42949672[0-8][0-9]|'
426 + '4294967[01][0-9]{2}|'
427 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
428 + '4294[0-8][0-9]{5}|'
429 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
430 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))';
431 }
432
433 description
434 "A Route Distinguisher is an 8-octet value used to
435 distinguish routes from different BGP VPNs (RFC 4364).
436 A Route Distinguisher will have the same format as a
437 Route Target as per RFC 4360 and will consist of
438 two or three fields: a 2-octet Type field, an administrator
439 field, and, optionally, an assigned number field.
440 According to the data formats for types 0, 1, 2, and 6 as
441 defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
442 pattern is defined as:
443 0:2-octet-asn:4-octet-number
444 1:4-octet-ipv4addr:2-octet-number
445 2:4-octet-asn:2-octet-number
446 6:6-octet-mac-address
447 Additionally, a generic pattern is defined for future
448 route discriminator types:
449 2-octet-other-hex-number:6-octet-hex-number
450 Some valid examples are 0:100:100, 1:1.1.1.1:100,
451 2:1234567890:203, and 6:26:00:08:92:78:00.
452 The following route distinguisher with two fields are also
453 accepted : 10000:44 1.2.3.4:44.";
454 reference
455 "RFC 4360: BGP Extended Communities Attribute.
456 RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
457 RFC 5668: 4-Octet AS Specific BGP Extended Community.
458 RFC 7432: BGP MPLS-Based Ethernet VPN.";
459 }
460
461 typedef extcommunity-lb-type {
462 type enumeration {
463 enum "explicit-bandwidth" {
464 value 0;
465 description
466 "Bandwidth value in Mbps";
467 }
468 enum "cumulative-bandwidth" {
469 value 1;
470 description
471 "Cumulative bandwidth of all multipaths (outbound-only)";
472 }
473 enum "computed-bandwidth" {
474 value 2;
475 description
476 "Internally computed bandwidth based on number of multipaths (outbound-only)";
477 }
478 }
479 description
480 "ext-community link bandwidth types.";
481 }
482
483 typedef asn-type {
484 type union {
485 type uint32 {
486 range "1..4294967295";
487 }
488 type string {
489 pattern '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|'
490 + '6[0-4][0-9]{3}|65[0-4][0-9]{2}|'
491 + '655[0-2][0-9]|6553[0-5])\.'
492 + '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|'
493 + '65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])' {
494 error-message "AS dot should be in the form [0..65535].[0..65535].";
495 }
496 pattern '^0\.0$' {
497 modifier "invert-match";
498 error-message "AS dot can't be equal to 0.0.";
499 }
500 }
501 }
502 }
503
504 augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:rmap-match-condition/frr-route-map:match-condition" {
505 case local-preference {
506 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-local-preference')";
507 leaf local-preference {
508 type uint32 {
509 range "0..4294967295";
510 }
511 }
512 }
513
514 case alias {
515 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-alias')";
516 leaf alias {
517 type string;
518 }
519 }
520
521 case script {
522 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-script')";
523 leaf script {
524 type string;
525 }
526 }
527
528 case origin {
529 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-origin')";
530 leaf origin {
531 type enumeration {
532 enum "egp" {
533 value 0;
534 description
535 "Remote EGP";
536 }
537 enum "igp" {
538 value 1;
539 description
540 "Local IGP";
541 }
542 enum "incomplete" {
543 value 2;
544 description
545 "Unknown heritage";
546 }
547 }
548 }
549 }
550
551 case rpki {
552 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki')";
553 leaf rpki {
554 type enumeration {
555 enum "invalid" {
556 value 0;
557 description
558 "Invalid prefix";
559 }
560 enum "notfound" {
561 value 1;
562 description
563 "Prefix not found";
564 }
565 enum "valid" {
566 value 2;
567 description
568 "Valid prefix";
569 }
570 }
571 }
572 }
573
574 case rpki-extcommunity {
575 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki-extcommunity')";
576 leaf rpki-extcommunity {
577 type enumeration {
578 enum "valid" {
579 value 0;
580 description
581 "Valid prefix";
582 }
583 enum "notfound" {
584 value 1;
585 description
586 "Prefix not found";
587 }
588 enum "invalid" {
589 value 2;
590 description
591 "Invalid prefix";
592 }
593 }
594 }
595 }
596
597 case probability {
598 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:probability')";
599 leaf probability {
600 type uint8 {
601 range "0..100";
602 }
603 }
604 }
605
606 case source-vrf {
607 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:source-vrf')";
608 leaf source-vrf {
609 type string;
610 }
611 }
612
613 case peer {
614 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:peer')";
615 choice peer {
616 description
617 "Value of the peer";
618 case peer-ipv4-address {
619 description
620 "IP address of peer";
621 leaf peer-ipv4-address {
622 type inet:ipv4-address;
623 }
624 }
625
626 case peer-interface {
627 description
628 "Interface name of peer";
629 leaf peer-interface {
630 type string;
631 }
632 }
633
634 case peer-ipv6-address {
635 description
636 "IPv6 address of peer";
637 leaf peer-ipv6-address {
638 type inet:ipv6-address;
639 }
640 }
641
642 case peer-local {
643 description
644 "Static or Redistributed routes";
645 leaf peer-local {
646 type boolean;
647 }
648 }
649 }
650 }
651
652 case access-list-name {
653 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:mac-address-list') or "
654 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:as-path-list') or "
655 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ip-route-source') or "
656 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ip-route-source-prefix-list')";
657 description
658 "Access-list name";
659 leaf list-name {
660 type filter:access-list-name;
661 }
662 }
663
664 case evpn-default-route {
665 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-default-route')";
666 description
667 "Match default EVPN type-5 route";
668 leaf evpn-default-route {
669 type empty;
670 }
671 }
672
673 case evpn-vni {
674 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-vni')";
675 description
676 "Match eVPN VNI";
677 leaf evpn-vni {
678 type uint32 {
679 range "1..16777215";
680 }
681 }
682 }
683
684 case evpn-route-type {
685 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-route-type')";
686 description
687 "Match eVPN route-type";
688 leaf evpn-route-type {
689 type enumeration {
690 enum "macip" {
691 value 0;
692 description
693 "Mac-IP route";
694 }
695 enum "multicast" {
696 value 1;
697 description
698 "IMET route";
699 }
700 enum "prefix" {
701 value 2;
702 description
703 "Prefix route";
704 }
705 enum "ead" {
706 value 3;
707 description
708 "Ethernet Auto-Discovery route";
709 }
710 enum "es" {
711 value 4;
712 description
713 "Ethernet Segment route";
714 }
715 }
716 }
717 }
718
719 case evpn-rd {
720 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-rd')";
721 description
722 "Match eVPN route-distinguisher";
723 leaf route-distinguisher {
724 type route-distinguisher;
725 }
726 }
727
728 case comm-list-name {
729 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-community') or "
730 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-large-community') or "
731 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-extcommunity')";
732 container comm-list {
733 leaf comm-list-name {
734 type bgp-filter:bgp-list-name;
735 }
736
737 leaf comm-list-name-exact-match {
738 type boolean;
739 description
740 "Do exact matching of communities";
741 }
742 }
743 }
744
745 case ipv4-address {
746 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ipv4-nexthop')";
747 leaf ipv4-address {
748 type inet:ipv4-address;
749 description
750 "IPv4 address";
751 }
752 }
753
754 case ipv6-address {
755 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ipv6-nexthop')";
756 leaf ipv6-address {
757 type inet:ipv6-address;
758 description
759 "IPv6 address";
760 }
761 }
762 }
763
764 augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:rmap-set-action/frr-route-map:set-action" {
765 case distance {
766 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:distance')";
767 leaf distance {
768 type uint8 {
769 range "1..255";
770 }
771 }
772 }
773
774 case extcommunity-none {
775 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-none')";
776 description
777 "Value of the BGP extended community attribute";
778 leaf extcommunity-none {
779 type boolean;
780 description "No extended community attribute";
781 }
782 }
783
784 case extcommunity-rt {
785 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-rt')";
786 description
787 "Value of the ext-community";
788 leaf extcommunity-rt {
789 type string;
790 description
791 "Set BGP ext-community route-target attribute";
792 }
793 }
794
795 case extcommunity-nt {
796 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-nt')";
797 description
798 "Value of the ext-community";
799 leaf extcommunity-nt {
800 type string;
801 description
802 "Set BGP ext-community node-target attribute";
803 }
804 }
805
806 case extcommunity-soo {
807 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-soo')";
808 description
809 "Value of the ext-community";
810 leaf extcommunity-soo {
811 type string;
812 description
813 "Set BGP ext-community site-of-origin attribute";
814 }
815 }
816
817 case extcommunity-lb {
818 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-lb')";
819 container extcommunity-lb {
820 description
821 "Value of the ext-community.";
822 leaf lb-type {
823 type frr-bgp-route-map:extcommunity-lb-type;
824 }
825
826 leaf bandwidth {
827 when "../lb-type = 'explicit-bandwidth'";
828 type uint16 {
829 range "1..25600";
830 }
831 description
832 "Bandwidth value in Mbps";
833 }
834 uses extcommunity-non-transitive-types;
835 }
836 }
837
838 case ipv4-address {
839 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv4-vpn-address')";
840 description
841 "Set the IPv4 address";
842 leaf ipv4-address {
843 type inet:ipv4-address;
844 }
845 }
846
847 case ipv4-nexthop {
848 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-ipv4-nexthop')";
849 leaf ipv4-nexthop {
850 type string;
851 }
852 }
853
854 case ipv6-address {
855 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-nexthop-global') or "
856 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-vpn-address')";
857 description
858 "Set the IPv6 address";
859 leaf ipv6-address {
860 type inet:ipv6-address;
861 }
862 }
863
864 case preference {
865 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-prefer-global') or "
866 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-peer-address')";
867 leaf preference {
868 type boolean;
869 }
870 }
871
872 case label-index {
873 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:label-index')";
874 leaf label-index {
875 type uint32 {
876 range "0..1048560";
877 }
878 }
879 }
880
881 case local-pref {
882 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-local-preference')";
883 leaf local-pref {
884 type string;
885 }
886 }
887
888 case weight {
889 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:weight')";
890 leaf weight {
891 type uint32 {
892 range "0..4294967295";
893 }
894 }
895 }
896
897 case origin {
898 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-origin')";
899 leaf origin {
900 type enumeration {
901 enum "egp" {
902 value 0;
903 description
904 "Remote EGP";
905 }
906 enum "igp" {
907 value 1;
908 description
909 "Local IGP";
910 }
911 enum "incomplete" {
912 value 2;
913 description
914 "Unknown heritage";
915 }
916 }
917 }
918 }
919
920 case originator-id {
921 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:originator-id')";
922 leaf originator-id {
923 type inet:ipv4-address;
924 }
925 }
926
927 case table {
928 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:table')";
929 leaf table {
930 type uint32 {
931 range "1..4294967295";
932 }
933 }
934 }
935
936 case atomic-aggregate {
937 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:atomic-aggregate')";
938 leaf atomic-aggregate {
939 type empty;
940 }
941 }
942
943 case aigp-metric {
944 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:aigp-metric')";
945 leaf aigp-metric {
946 type string;
947 description
948 "Set BGP AIGP attribute (AIGP Metric TLV)";
949 }
950 }
951
952 case as-path-prepend {
953 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-prepend')";
954 choice as-path-prepend {
955 description
956 "Value of the BGP AS-path attribute";
957 case prepend-as {
958 description
959 "Prepend the mentioned AS-path";
960 leaf prepend-as-path {
961 type string;
962 }
963 }
964
965 case last-as {
966 description
967 "Prepend the last ASN in the AS-path";
968 leaf last-as {
969 type uint8 {
970 range "1..10";
971 }
972 }
973 }
974 }
975 }
976
977 case as-path-exclude {
978 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-exclude')";
979 leaf exclude-as-path {
980 type string;
981 description
982 "Exclude the mentioned AS-path";
983 }
984 }
985
986 case as-path-replace {
987 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-replace')";
988 leaf replace-as-path {
989 type string;
990 description
991 "Replace ASNs to local AS number";
992 }
993 }
994
995 case community {
996 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-community')";
997 choice community {
998 description
999 "Value of the BGP community attribute";
1000 case none {
1001 description
1002 "No community attribute";
1003 leaf community-none {
1004 type boolean;
1005 }
1006 }
1007
1008 case community-string {
1009 description
1010 "Community string";
1011 leaf community-string {
1012 type string;
1013 }
1014 }
1015 }
1016 }
1017
1018 case large-community {
1019 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-large-community')";
1020 choice large-community {
1021 description
1022 "Value of the BGP large-community attribute";
1023 case none {
1024 description
1025 "No large-community attribute";
1026 leaf large-community-none {
1027 type boolean;
1028 }
1029 }
1030
1031 case large-community-string {
1032 description
1033 "Large-Community string";
1034 leaf large-community-string {
1035 type string;
1036 }
1037 }
1038 }
1039 }
1040
1041 case aggregator {
1042 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:aggregator')";
1043 container aggregator {
1044 leaf aggregator-asn {
1045 type asn-type;
1046 description
1047 "ASN of the aggregator";
1048 }
1049
1050 leaf aggregator-address {
1051 type inet:ipv4-address;
1052 description
1053 "IPv4 address of the aggregator";
1054 }
1055 }
1056 }
1057
1058 case comm-list-name {
1059 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:comm-list-delete') or "
1060 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:large-comm-list-delete')";
1061 leaf comm-list-name {
1062 type bgp-filter:bgp-list-name;
1063 }
1064 }
1065 case evpn-gateway-ip-ipv4 {
1066 when
1067 "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
1068 'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')";
1069 description
1070 "Set EVPN gateway IP overlay index IPv4";
1071 leaf evpn-gateway-ip-ipv4 {
1072 type inet:ipv4-address;
1073 }
1074 }
1075 case evpn-gateway-ip-ipv6 {
1076 when
1077 "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
1078 'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')";
1079 description
1080 "Set EVPN gateway IP overlay index IPv6";
1081 leaf evpn-gateway-ip-ipv6 {
1082 type inet:ipv6-address;
1083 }
1084 }
1085 case l3vpn-nexthop-encapsulation {
1086 when
1087 "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
1088 'frr-bgp-route-map:set-l3vpn-nexthop-encapsulation')";
1089 description
1090 "Accept L3VPN traffic over other than LSP encapsulation";
1091 leaf l3vpn-nexthop-encapsulation {
1092 type enumeration {
1093 enum "gre" {
1094 value 0;
1095 description
1096 "GRE protocol";
1097 }
1098 }
1099 }
1100 }
1101 }
1102 }