]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-bgp-route-map.yang
Merge pull request #12795 from pguibert6WIND/vpnv6_nexthop_encoding
[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 route-distinguisher {
360 type string {
361 pattern
362 '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
363 + '6[0-4][0-9]{3}|'
364 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
365 + '42949672[0-8][0-9]|'
366 + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
367 + '42949[0-5][0-9]{4}|'
368 + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
369 + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
370 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
371 + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
372 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
373 + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
374 + '655[0-2][0-9]|'
375 + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
376 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
377 + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
378 + '4294967[01][0-9]{2}|'
379 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
380 + '4294[0-8][0-9]{5}|'
381 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
382 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
383 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
384 + '6[0-4][0-9]{3}|'
385 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
386 + '(6(:[a-fA-F0-9]{2}){6})|'
387 + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
388 + '[0-9a-fA-F]{1,12})|'
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):(429496729[0-5]|'
392 + '42949672[0-8][0-9]|'
393 + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
394 + '42949[0-5][0-9]{4}|'
395 + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
396 + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
397 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)|'
398 + '((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
399 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
400 + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
401 + '655[0-2][0-9]|'
402 + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
403 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
404 + '((429496729[0-5]|42949672[0-8][0-9]|'
405 + '4294967[01][0-9]{2}|'
406 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
407 + '4294[0-8][0-9]{5}|'
408 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
409 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
410 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
411 + '6[0-4][0-9]{3}|'
412 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
413 + '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
414 + '6[0-4][0-9]{3}|'
415 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|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 + '(429496729[0-5]|42949672[0-8][0-9]|'
420 + '4294967[01][0-9]{2}|'
421 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
422 + '4294[0-8][0-9]{5}|'
423 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
424 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))';
425 }
426
427 description
428 "A Route Distinguisher is an 8-octet value used to
429 distinguish routes from different BGP VPNs (RFC 4364).
430 A Route Distinguisher will have the same format as a
431 Route Target as per RFC 4360 and will consist of
432 two or three fields: a 2-octet Type field, an administrator
433 field, and, optionally, an assigned number field.
434 According to the data formats for types 0, 1, 2, and 6 as
435 defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
436 pattern is defined as:
437 0:2-octet-asn:4-octet-number
438 1:4-octet-ipv4addr:2-octet-number
439 2:4-octet-asn:2-octet-number
440 6:6-octet-mac-address
441 Additionally, a generic pattern is defined for future
442 route discriminator types:
443 2-octet-other-hex-number:6-octet-hex-number
444 Some valid examples are 0:100:100, 1:1.1.1.1:100,
445 2:1234567890:203, and 6:26:00:08:92:78:00.
446 The following route distinguisher with two fields are also
447 accepted : 10000:44 1.2.3.4:44.";
448 reference
449 "RFC 4360: BGP Extended Communities Attribute.
450 RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
451 RFC 5668: 4-Octet AS Specific BGP Extended Community.
452 RFC 7432: BGP MPLS-Based Ethernet VPN.";
453 }
454
455 typedef extcommunity-lb-type {
456 type enumeration {
457 enum "explicit-bandwidth" {
458 value 0;
459 description
460 "Bandwidth value in Mbps";
461 }
462 enum "cumulative-bandwidth" {
463 value 1;
464 description
465 "Cumulative bandwidth of all multipaths (outbound-only)";
466 }
467 enum "computed-bandwidth" {
468 value 2;
469 description
470 "Internally computed bandwidth based on number of multipaths (outbound-only)";
471 }
472 }
473 description
474 "ext-community link bandwidth types.";
475 }
476
477 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" {
478 case local-preference {
479 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')";
480 leaf local-preference {
481 type uint32 {
482 range "0..4294967295";
483 }
484 }
485 }
486
487 case alias {
488 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')";
489 leaf alias {
490 type string;
491 }
492 }
493
494 case script {
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:match-script')";
496 leaf script {
497 type string;
498 }
499 }
500
501 case origin {
502 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')";
503 leaf origin {
504 type enumeration {
505 enum "egp" {
506 value 0;
507 description
508 "Remote EGP";
509 }
510 enum "igp" {
511 value 1;
512 description
513 "Local IGP";
514 }
515 enum "incomplete" {
516 value 2;
517 description
518 "Unknown heritage";
519 }
520 }
521 }
522 }
523
524 case rpki {
525 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')";
526 leaf rpki {
527 type enumeration {
528 enum "invalid" {
529 value 0;
530 description
531 "Invalid prefix";
532 }
533 enum "notfound" {
534 value 1;
535 description
536 "Prefix not found";
537 }
538 enum "valid" {
539 value 2;
540 description
541 "Valid prefix";
542 }
543 }
544 }
545 }
546
547 case rpki-extcommunity {
548 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')";
549 leaf rpki-extcommunity {
550 type enumeration {
551 enum "valid" {
552 value 0;
553 description
554 "Valid prefix";
555 }
556 enum "notfound" {
557 value 1;
558 description
559 "Prefix not found";
560 }
561 enum "invalid" {
562 value 2;
563 description
564 "Invalid prefix";
565 }
566 }
567 }
568 }
569
570 case probability {
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:probability')";
572 leaf probability {
573 type uint8 {
574 range "0..100";
575 }
576 }
577 }
578
579 case source-vrf {
580 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')";
581 leaf source-vrf {
582 type string;
583 }
584 }
585
586 case peer {
587 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')";
588 choice peer {
589 description
590 "Value of the peer";
591 case peer-ipv4-address {
592 description
593 "IP address of peer";
594 leaf peer-ipv4-address {
595 type inet:ipv4-address;
596 }
597 }
598
599 case peer-interface {
600 description
601 "Interface name of peer";
602 leaf peer-interface {
603 type string;
604 }
605 }
606
607 case peer-ipv6-address {
608 description
609 "IPv6 address of peer";
610 leaf peer-ipv6-address {
611 type inet:ipv6-address;
612 }
613 }
614
615 case peer-local {
616 description
617 "Static or Redistributed routes";
618 leaf peer-local {
619 type boolean;
620 }
621 }
622 }
623 }
624
625 case access-list-name {
626 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 "
627 + "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 "
628 + "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 "
629 + "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')";
630 description
631 "Access-list name";
632 leaf list-name {
633 type filter:access-list-name;
634 }
635 }
636
637 case evpn-default-route {
638 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')";
639 description
640 "Match default EVPN type-5 route";
641 leaf evpn-default-route {
642 type empty;
643 }
644 }
645
646 case evpn-vni {
647 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')";
648 description
649 "Match eVPN VNI";
650 leaf evpn-vni {
651 type uint32 {
652 range "1..16777215";
653 }
654 }
655 }
656
657 case evpn-route-type {
658 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')";
659 description
660 "Match eVPN route-type";
661 leaf evpn-route-type {
662 type enumeration {
663 enum "macip" {
664 value 0;
665 description
666 "Mac-IP route";
667 }
668 enum "multicast" {
669 value 1;
670 description
671 "IMET route";
672 }
673 enum "prefix" {
674 value 2;
675 description
676 "Prefix route";
677 }
678 enum "ead" {
679 value 3;
680 description
681 "Ethernet Auto-Discovery route";
682 }
683 enum "es" {
684 value 4;
685 description
686 "Ethernet Segment route";
687 }
688 }
689 }
690 }
691
692 case evpn-rd {
693 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')";
694 description
695 "Match eVPN route-distinguisher";
696 leaf route-distinguisher {
697 type route-distinguisher;
698 }
699 }
700
701 case comm-list-name {
702 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 "
703 + "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 "
704 + "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')";
705 container comm-list {
706 leaf comm-list-name {
707 type bgp-filter:bgp-list-name;
708 }
709
710 leaf comm-list-name-exact-match {
711 type boolean;
712 description
713 "Do exact matching of communities";
714 }
715 }
716 }
717
718 case ipv4-address {
719 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')";
720 leaf ipv4-address {
721 type inet:ipv4-address;
722 description
723 "IPv4 address";
724 }
725 }
726
727 case ipv6-address {
728 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')";
729 leaf ipv6-address {
730 type inet:ipv6-address;
731 description
732 "IPv6 address";
733 }
734 }
735 }
736
737 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" {
738 case distance {
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:distance')";
740 leaf distance {
741 type uint8 {
742 range "0..255";
743 }
744 }
745 }
746
747 case extcommunity-none {
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-extcommunity-none')";
749 description
750 "Value of the BGP extended community attribute";
751 leaf extcommunity-none {
752 type boolean;
753 description "No extended community attribute";
754 }
755 }
756
757 case extcommunity-rt {
758 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')";
759 description
760 "Value of the ext-community";
761 leaf extcommunity-rt {
762 type string;
763 description
764 "Set BGP ext-community route-target attribute";
765 }
766 }
767
768 case extcommunity-soo {
769 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')";
770 description
771 "Value of the ext-community";
772 leaf extcommunity-soo {
773 type string;
774 description
775 "Set BGP ext-community site-of-origin attribute";
776 }
777 }
778
779 case extcommunity-lb {
780 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')";
781 container extcommunity-lb {
782 description
783 "Value of the ext-community.";
784 leaf lb-type {
785 type frr-bgp-route-map:extcommunity-lb-type;
786 }
787
788 leaf bandwidth {
789 when "../lb-type = 'explicit-bandwidth'";
790 type uint16 {
791 range "1..25600";
792 }
793 description
794 "Bandwidth value in Mbps";
795 }
796 uses extcommunity-non-transitive-types;
797 }
798 }
799
800 case ipv4-address {
801 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')";
802 description
803 "Set the IPv4 address";
804 leaf ipv4-address {
805 type inet:ipv4-address;
806 }
807 }
808
809 case ipv4-nexthop {
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:set-ipv4-nexthop')";
811 leaf ipv4-nexthop {
812 type string;
813 }
814 }
815
816 case ipv6-address {
817 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 "
818 + "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')";
819 description
820 "Set the IPv6 address";
821 leaf ipv6-address {
822 type inet:ipv6-address;
823 }
824 }
825
826 case preference {
827 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 "
828 + "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')";
829 leaf preference {
830 type boolean;
831 }
832 }
833
834 case label-index {
835 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')";
836 leaf label-index {
837 type uint32 {
838 range "0..1048560";
839 }
840 }
841 }
842
843 case local-pref {
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:set-local-preference')";
845 leaf local-pref {
846 type string;
847 }
848 }
849
850 case weight {
851 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')";
852 leaf weight {
853 type uint32 {
854 range "0..4294967295";
855 }
856 }
857 }
858
859 case origin {
860 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')";
861 leaf origin {
862 type enumeration {
863 enum "egp" {
864 value 0;
865 description
866 "Remote EGP";
867 }
868 enum "igp" {
869 value 1;
870 description
871 "Local IGP";
872 }
873 enum "incomplete" {
874 value 2;
875 description
876 "Unknown heritage";
877 }
878 }
879 }
880 }
881
882 case originator-id {
883 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')";
884 leaf originator-id {
885 type inet:ipv4-address;
886 }
887 }
888
889 case table {
890 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')";
891 leaf table {
892 type uint32 {
893 range "1..4294967295";
894 }
895 }
896 }
897
898 case atomic-aggregate {
899 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')";
900 leaf atomic-aggregate {
901 type empty;
902 }
903 }
904
905 case aigp-metric {
906 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')";
907 leaf aigp-metric {
908 type string;
909 description
910 "Set BGP AIGP attribute (AIGP Metric TLV)";
911 }
912 }
913
914 case as-path-prepend {
915 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')";
916 choice as-path-prepend {
917 description
918 "Value of the BGP AS-path attribute";
919 case prepend-as {
920 description
921 "Prepend the mentioned AS-path";
922 leaf prepend-as-path {
923 type string;
924 }
925 }
926
927 case last-as {
928 description
929 "Prepend the last ASN in the AS-path";
930 leaf last-as {
931 type uint8 {
932 range "1..10";
933 }
934 }
935 }
936 }
937 }
938
939 case as-path-exclude {
940 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')";
941 leaf exclude-as-path {
942 type string;
943 description
944 "Exclude the mentioned AS-path";
945 }
946 }
947
948 case as-path-replace {
949 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')";
950 leaf replace-as-path {
951 type string;
952 description
953 "Replace ASNs to local AS number";
954 }
955 }
956
957 case community {
958 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')";
959 choice community {
960 description
961 "Value of the BGP community attribute";
962 case none {
963 description
964 "No community attribute";
965 leaf community-none {
966 type boolean;
967 }
968 }
969
970 case community-string {
971 description
972 "Community string";
973 leaf community-string {
974 type string;
975 }
976 }
977 }
978 }
979
980 case large-community {
981 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')";
982 choice large-community {
983 description
984 "Value of the BGP large-community attribute";
985 case none {
986 description
987 "No large-community attribute";
988 leaf large-community-none {
989 type boolean;
990 }
991 }
992
993 case large-community-string {
994 description
995 "Large-Community string";
996 leaf large-community-string {
997 type string;
998 }
999 }
1000 }
1001 }
1002
1003 case aggregator {
1004 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')";
1005 container aggregator {
1006 leaf aggregator-asn {
1007 type uint32 {
1008 range "1..4294967295";
1009 }
1010 description
1011 "ASN of the aggregator";
1012 }
1013
1014 leaf aggregator-address {
1015 when "../aggregator-asn > 0 or "
1016 + "../aggregator-asn <= 4294967295";
1017 type inet:ipv4-address;
1018 description
1019 "IPv4 address of the aggregator";
1020 }
1021 }
1022 }
1023
1024 case comm-list-name {
1025 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 "
1026 + "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')";
1027 leaf comm-list-name {
1028 type bgp-filter:bgp-list-name;
1029 }
1030 }
1031 case evpn-gateway-ip-ipv4 {
1032 when
1033 "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,
1034 'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')";
1035 description
1036 "Set EVPN gateway IP overlay index IPv4";
1037 leaf evpn-gateway-ip-ipv4 {
1038 type inet:ipv4-address;
1039 }
1040 }
1041 case evpn-gateway-ip-ipv6 {
1042 when
1043 "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,
1044 'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')";
1045 description
1046 "Set EVPN gateway IP overlay index IPv6";
1047 leaf evpn-gateway-ip-ipv6 {
1048 type inet:ipv6-address;
1049 }
1050 }
1051 case l3vpn-nexthop-encapsulation {
1052 when
1053 "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,
1054 'frr-bgp-route-map:set-l3vpn-nexthop-encapsulation')";
1055 description
1056 "Accept L3VPN traffic over other than LSP encapsulation";
1057 leaf l3vpn-nexthop-encapsulation {
1058 type enumeration {
1059 enum "gre" {
1060 value 0;
1061 description
1062 "GRE protocol";
1063 }
1064 }
1065 }
1066 }
1067 }
1068 }