]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-bgp-route-map.yang
bgpd: Implement Accumulated IGP Metric Attribute for BGP
[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-soo {
190 base frr-route-map:rmap-set-type;
191 description
192 "Set BGP extended community attribute";
193 }
194
195 identity set-extcommunity-lb {
196 base frr-route-map:rmap-set-type;
197 description
198 "Set BGP extended community attribute";
199 }
200
201 identity set-ipv4-nexthop {
202 base frr-route-map:rmap-set-type;
203 description
204 "Set the IPv4 next-hop to peer-address/unchanged";
205 }
206
207 identity ipv4-vpn-address {
208 base frr-route-map:rmap-set-type;
209 description
210 "Set IPv4 VPN next-hop address";
211 }
212
213 identity ipv6-nexthop-global {
214 base frr-route-map:rmap-set-type;
215 description
216 "Set IPv6 next-hop global address";
217 }
218
219 identity ipv6-prefer-global {
220 base frr-route-map:rmap-set-type;
221 description
222 "Set IPv6 next-hop to prefer global address";
223 }
224
225 identity ipv6-peer-address {
226 base frr-route-map:rmap-set-type;
227 description
228 "Set IPv6 next-hop peer address";
229 }
230
231 identity ipv6-vpn-address {
232 base frr-route-map:rmap-set-type;
233 description
234 "Set IPv6 VPN next-hop address";
235 }
236
237 identity label-index {
238 base frr-route-map:rmap-set-type;
239 description
240 "Set the label index to associate with the prefixs";
241 }
242
243 identity set-local-preference {
244 base frr-route-map:rmap-set-type;
245 description
246 "Set the BGP local preference path attribute";
247 }
248
249 identity set-origin {
250 base frr-route-map:rmap-set-type;
251 description
252 "Set BGP route origin code";
253 }
254
255 identity weight {
256 base frr-route-map:rmap-set-type;
257 description
258 "Set the BGP weight attribute";
259 }
260
261 identity originator-id {
262 base frr-route-map:rmap-set-type;
263 description
264 "Set the BGP originator ID attribute";
265 }
266
267 identity table {
268 base frr-route-map:rmap-set-type;
269 description
270 "Export route to non-main kernel table";
271 }
272
273 identity atomic-aggregate {
274 base frr-route-map:rmap-set-type;
275 description
276 "Set BGP atomic-aggregate attribute";
277 }
278
279 identity aigp-metric {
280 base frr-route-map:rmap-set-type;
281 description
282 "Set BGP AIGP attribute (AIGP TLV Metric)";
283 }
284
285 identity as-path-prepend {
286 base frr-route-map:rmap-set-type;
287 description
288 "Set the BGP AS-path attribute";
289 }
290
291 identity as-path-exclude {
292 base frr-route-map:rmap-set-type;
293 description
294 "Set the BGP AS-path attribute";
295 }
296
297 identity as-path-replace {
298 base frr-route-map:rmap-set-type;
299 description
300 "Replace ASNs to local AS number";
301 }
302
303 identity set-community {
304 base frr-route-map:rmap-set-type;
305 description
306 "Set the BGP community attribute";
307 }
308
309 identity set-large-community {
310 base frr-route-map:rmap-set-type;
311 description
312 "Set the BGP large-community attribute";
313 }
314
315 identity aggregator {
316 base frr-route-map:rmap-set-type;
317 description
318 "Set the BGP aggregator attribute";
319 }
320
321 identity comm-list-delete {
322 base frr-route-map:rmap-set-type;
323 description
324 "Set BGP community list (for deletion)";
325 }
326
327 identity large-comm-list-delete {
328 base frr-route-map:rmap-set-type;
329 description
330 "Set BGP large community list (for deletion)";
331 }
332
333 identity set-evpn-gateway-ip-ipv4 {
334 base frr-route-map:rmap-set-type;
335 description
336 "Set EVPN gateway IP overlay index IPv4";
337 }
338
339 identity set-evpn-gateway-ip-ipv6 {
340 base frr-route-map:rmap-set-type;
341 description
342 "Set EVPN gateway IP overlay index IPv6";
343 }
344
345 identity set-l3vpn-nexthop-encapsulation {
346 base frr-route-map:rmap-set-type;
347 description
348 "Accept L3VPN traffic over other than LSP encapsulation";
349 }
350
351 grouping extcommunity-non-transitive-types {
352 leaf two-octet-as-specific {
353 type boolean;
354 description
355 "Non-Transitive Two-Octet AS-Specific Extended Community";
356 }
357 }
358
359 typedef extcommunity-lb-type {
360 type enumeration {
361 enum "explicit-bandwidth" {
362 value 0;
363 description
364 "Bandwidth value in Mbps";
365 }
366 enum "cumulative-bandwidth" {
367 value 1;
368 description
369 "Cumulative bandwidth of all multipaths (outbound-only)";
370 }
371 enum "computed-bandwidth" {
372 value 2;
373 description
374 "Internally computed bandwidth based on number of multipaths (outbound-only)";
375 }
376 }
377 description
378 "ext-community link bandwidth types.";
379 }
380
381 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" {
382 case local-preference {
383 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')";
384 leaf local-preference {
385 type uint32 {
386 range "0..4294967295";
387 }
388 }
389 }
390
391 case alias {
392 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')";
393 leaf alias {
394 type string;
395 }
396 }
397
398 case script {
399 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')";
400 leaf script {
401 type string;
402 }
403 }
404
405 case origin {
406 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')";
407 leaf origin {
408 type enumeration {
409 enum "egp" {
410 value 0;
411 description
412 "Remote EGP";
413 }
414 enum "igp" {
415 value 1;
416 description
417 "Local IGP";
418 }
419 enum "incomplete" {
420 value 2;
421 description
422 "Unknown heritage";
423 }
424 }
425 }
426 }
427
428 case rpki {
429 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')";
430 leaf rpki {
431 type enumeration {
432 enum "invalid" {
433 value 0;
434 description
435 "Invalid prefix";
436 }
437 enum "notfound" {
438 value 1;
439 description
440 "Prefix not found";
441 }
442 enum "valid" {
443 value 2;
444 description
445 "Valid prefix";
446 }
447 }
448 }
449 }
450
451 case rpki-extcommunity {
452 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')";
453 leaf rpki-extcommunity {
454 type enumeration {
455 enum "valid" {
456 value 0;
457 description
458 "Valid prefix";
459 }
460 enum "notfound" {
461 value 1;
462 description
463 "Prefix not found";
464 }
465 enum "invalid" {
466 value 2;
467 description
468 "Invalid prefix";
469 }
470 }
471 }
472 }
473
474 case probability {
475 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')";
476 leaf probability {
477 type uint8 {
478 range "0..100";
479 }
480 }
481 }
482
483 case source-vrf {
484 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')";
485 leaf source-vrf {
486 type string;
487 }
488 }
489
490 case peer {
491 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')";
492 choice peer {
493 description
494 "Value of the peer";
495 case peer-ipv4-address {
496 description
497 "IP address of peer";
498 leaf peer-ipv4-address {
499 type inet:ipv4-address;
500 }
501 }
502
503 case peer-interface {
504 description
505 "Interface name of peer";
506 leaf peer-interface {
507 type string;
508 }
509 }
510
511 case peer-ipv6-address {
512 description
513 "IPv6 address of peer";
514 leaf peer-ipv6-address {
515 type inet:ipv6-address;
516 }
517 }
518
519 case peer-local {
520 description
521 "Static or Redistributed routes";
522 leaf peer-local {
523 type boolean;
524 }
525 }
526 }
527 }
528
529 case access-list-name {
530 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 "
531 + "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 "
532 + "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 "
533 + "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')";
534 description
535 "Access-list name";
536 leaf list-name {
537 type filter:access-list-name;
538 }
539 }
540
541 case evpn-default-route {
542 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')";
543 description
544 "Match default EVPN type-5 route";
545 leaf evpn-default-route {
546 type empty;
547 }
548 }
549
550 case evpn-vni {
551 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')";
552 description
553 "Match eVPN VNI";
554 leaf evpn-vni {
555 type uint32 {
556 range "1..16777215";
557 }
558 }
559 }
560
561 case evpn-route-type {
562 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')";
563 description
564 "Match eVPN route-type";
565 leaf evpn-route-type {
566 type enumeration {
567 enum "macip" {
568 value 0;
569 description
570 "Mac-IP route";
571 }
572 enum "multicast" {
573 value 1;
574 description
575 "IMET route";
576 }
577 enum "prefix" {
578 value 2;
579 description
580 "Prefix route";
581 }
582 enum "ead" {
583 value 3;
584 description
585 "Ethernet Auto-Discovery route";
586 }
587 enum "es" {
588 value 4;
589 description
590 "Ethernet Segment route";
591 }
592 }
593 }
594 }
595
596 case evpn-rd {
597 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')";
598 description
599 "Match eVPN route-distinguisher";
600 leaf route-distinguisher {
601 type rt-types:route-distinguisher;
602 }
603 }
604
605 case comm-list-name {
606 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 "
607 + "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 "
608 + "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')";
609 container comm-list {
610 leaf comm-list-name {
611 type bgp-filter:bgp-list-name;
612 }
613
614 leaf comm-list-name-exact-match {
615 type boolean;
616 description
617 "Do exact matching of communities";
618 }
619 }
620 }
621
622 case ipv4-address {
623 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')";
624 leaf ipv4-address {
625 type inet:ipv4-address;
626 description
627 "IPv4 address";
628 }
629 }
630
631 case ipv6-address {
632 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')";
633 leaf ipv6-address {
634 type inet:ipv6-address;
635 description
636 "IPv6 address";
637 }
638 }
639 }
640
641 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" {
642 case distance {
643 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')";
644 leaf distance {
645 type uint8 {
646 range "0..255";
647 }
648 }
649 }
650
651 case extcommunity-none {
652 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')";
653 description
654 "Value of the BGP extended community attribute";
655 leaf extcommunity-none {
656 type boolean;
657 description "No extended community attribute";
658 }
659 }
660
661 case extcommunity-rt {
662 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')";
663 description
664 "Value of the ext-community";
665 leaf extcommunity-rt {
666 type string;
667 description
668 "Set BGP ext-community route-target attribute";
669 }
670 }
671
672 case extcommunity-soo {
673 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')";
674 description
675 "Value of the ext-community";
676 leaf extcommunity-soo {
677 type string;
678 description
679 "Set BGP ext-community site-of-origin attribute";
680 }
681 }
682
683 case extcommunity-lb {
684 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')";
685 container extcommunity-lb {
686 description
687 "Value of the ext-community.";
688 leaf lb-type {
689 type frr-bgp-route-map:extcommunity-lb-type;
690 }
691
692 leaf bandwidth {
693 when "../lb-type = 'explicit-bandwidth'";
694 type uint16 {
695 range "1..25600";
696 }
697 description
698 "Bandwidth value in Mbps";
699 }
700 uses extcommunity-non-transitive-types;
701 }
702 }
703
704 case ipv4-address {
705 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')";
706 description
707 "Set the IPv4 address";
708 leaf ipv4-address {
709 type inet:ipv4-address;
710 }
711 }
712
713 case ipv4-nexthop {
714 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')";
715 leaf ipv4-nexthop {
716 type string;
717 }
718 }
719
720 case ipv6-address {
721 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 "
722 + "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')";
723 description
724 "Set the IPv6 address";
725 leaf ipv6-address {
726 type inet:ipv6-address;
727 }
728 }
729
730 case preference {
731 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 "
732 + "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')";
733 leaf preference {
734 type boolean;
735 }
736 }
737
738 case label-index {
739 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')";
740 leaf label-index {
741 type uint32 {
742 range "0..1048560";
743 }
744 }
745 }
746
747 case local-pref {
748 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')";
749 leaf local-pref {
750 type string;
751 }
752 }
753
754 case weight {
755 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')";
756 leaf weight {
757 type uint32 {
758 range "0..4294967295";
759 }
760 }
761 }
762
763 case origin {
764 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')";
765 leaf origin {
766 type enumeration {
767 enum "egp" {
768 value 0;
769 description
770 "Remote EGP";
771 }
772 enum "igp" {
773 value 1;
774 description
775 "Local IGP";
776 }
777 enum "incomplete" {
778 value 2;
779 description
780 "Unknown heritage";
781 }
782 }
783 }
784 }
785
786 case originator-id {
787 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')";
788 leaf originator-id {
789 type inet:ipv4-address;
790 }
791 }
792
793 case table {
794 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')";
795 leaf table {
796 type uint32 {
797 range "1..4294967295";
798 }
799 }
800 }
801
802 case atomic-aggregate {
803 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')";
804 leaf atomic-aggregate {
805 type empty;
806 }
807 }
808
809 case aigp-metric {
810 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')";
811 leaf aigp-metric {
812 type string;
813 description
814 "Set BGP AIGP attribute (AIGP Metric TLV)";
815 }
816 }
817
818 case as-path-prepend {
819 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')";
820 choice as-path-prepend {
821 description
822 "Value of the BGP AS-path attribute";
823 case prepend-as {
824 description
825 "Prepend the mentioned AS-path";
826 leaf prepend-as-path {
827 type string;
828 }
829 }
830
831 case last-as {
832 description
833 "Prepend the last ASN in the AS-path";
834 leaf last-as {
835 type uint8 {
836 range "1..10";
837 }
838 }
839 }
840 }
841 }
842
843 case as-path-exclude {
844 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')";
845 leaf exclude-as-path {
846 type string;
847 description
848 "Exclude the mentioned AS-path";
849 }
850 }
851
852 case as-path-replace {
853 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')";
854 leaf replace-as-path {
855 type string;
856 description
857 "Replace ASNs to local AS number";
858 }
859 }
860
861 case community {
862 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')";
863 choice community {
864 description
865 "Value of the BGP community attribute";
866 case none {
867 description
868 "No community attribute";
869 leaf community-none {
870 type boolean;
871 }
872 }
873
874 case community-string {
875 description
876 "Community string";
877 leaf community-string {
878 type string;
879 }
880 }
881 }
882 }
883
884 case large-community {
885 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')";
886 choice large-community {
887 description
888 "Value of the BGP large-community attribute";
889 case none {
890 description
891 "No large-community attribute";
892 leaf large-community-none {
893 type boolean;
894 }
895 }
896
897 case large-community-string {
898 description
899 "Large-Community string";
900 leaf large-community-string {
901 type string;
902 }
903 }
904 }
905 }
906
907 case aggregator {
908 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')";
909 container aggregator {
910 leaf aggregator-asn {
911 type uint32 {
912 range "1..4294967295";
913 }
914 description
915 "ASN of the aggregator";
916 }
917
918 leaf aggregator-address {
919 when "../aggregator-asn > 0 or "
920 + "../aggregator-asn <= 4294967295";
921 type inet:ipv4-address;
922 description
923 "IPv4 address of the aggregator";
924 }
925 }
926 }
927
928 case comm-list-name {
929 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 "
930 + "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')";
931 leaf comm-list-name {
932 type bgp-filter:bgp-list-name;
933 }
934 }
935 case evpn-gateway-ip-ipv4 {
936 when
937 "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,
938 'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')";
939 description
940 "Set EVPN gateway IP overlay index IPv4";
941 leaf evpn-gateway-ip-ipv4 {
942 type inet:ipv4-address;
943 }
944 }
945 case evpn-gateway-ip-ipv6 {
946 when
947 "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,
948 'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')";
949 description
950 "Set EVPN gateway IP overlay index IPv6";
951 leaf evpn-gateway-ip-ipv6 {
952 type inet:ipv6-address;
953 }
954 }
955 case l3vpn-nexthop-encapsulation {
956 when
957 "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,
958 'frr-bgp-route-map:set-l3vpn-nexthop-encapsulation')";
959 description
960 "Accept L3VPN traffic over other than LSP encapsulation";
961 leaf l3vpn-nexthop-encapsulation {
962 type enumeration {
963 enum "gre" {
964 value 0;
965 description
966 "GRE protocol";
967 }
968 }
969 }
970 }
971 }
972 }