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