]>
Commit | Line | Data |
---|---|---|
b702f424 SP |
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 | ||
2690f18c DA |
39 | identity match-alias { |
40 | base frr-route-map:rmap-match-type; | |
41 | description | |
42 | "Match BGP community alias name"; | |
43 | } | |
44 | ||
b702f424 SP |
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 | ||
bb4dcdd1 DA |
171 | identity set-extcommunity-none { |
172 | base frr-route-map:rmap-set-type; | |
173 | description | |
174 | "Set BGP extended community attribute"; | |
175 | } | |
176 | ||
b702f424 SP |
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 set-community { | |
286 | base frr-route-map:rmap-set-type; | |
287 | description | |
288 | "Set the BGP community attribute"; | |
289 | } | |
290 | ||
291 | identity set-large-community { | |
292 | base frr-route-map:rmap-set-type; | |
293 | description | |
294 | "Set the BGP large-community attribute"; | |
295 | } | |
296 | ||
297 | identity aggregator { | |
298 | base frr-route-map:rmap-set-type; | |
299 | description | |
300 | "Set the BGP aggregator attribute"; | |
301 | } | |
302 | ||
303 | identity comm-list-delete { | |
304 | base frr-route-map:rmap-set-type; | |
305 | description | |
306 | "Set BGP community list (for deletion)"; | |
307 | } | |
308 | ||
309 | identity large-comm-list-delete { | |
310 | base frr-route-map:rmap-set-type; | |
311 | description | |
312 | "Set BGP large community list (for deletion)"; | |
313 | } | |
314 | ||
d0a4ee60 AD |
315 | identity set-evpn-gateway-ip-ipv4 { |
316 | base frr-route-map:rmap-set-type; | |
317 | description | |
318 | "Set EVPN gateway IP overlay index IPv4"; | |
319 | } | |
320 | ||
321 | identity set-evpn-gateway-ip-ipv6 { | |
322 | base frr-route-map:rmap-set-type; | |
323 | description | |
324 | "Set EVPN gateway IP overlay index IPv6"; | |
325 | } | |
326 | ||
b702f424 SP |
327 | grouping extcommunity-non-transitive-types { |
328 | leaf two-octet-as-specific { | |
329 | type boolean; | |
330 | description | |
331 | "Non-Transitive Two-Octet AS-Specific Extended Community"; | |
332 | } | |
333 | } | |
334 | ||
335 | typedef extcommunity-lb-type { | |
336 | type enumeration { | |
337 | enum "explicit-bandwidth" { | |
338 | value 0; | |
339 | description | |
340 | "Bandwidth value in Mbps"; | |
341 | } | |
342 | enum "cumulative-bandwidth" { | |
343 | value 1; | |
344 | description | |
345 | "Cumulative bandwidth of all multipaths (outbound-only)"; | |
346 | } | |
347 | enum "computed-bandwidth" { | |
348 | value 2; | |
349 | description | |
350 | "Internally computed bandwidth based on number of multipaths (outbound-only)"; | |
351 | } | |
352 | } | |
353 | description | |
354 | "ext-community link bandwidth types."; | |
355 | } | |
356 | ||
357 | 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" { | |
358 | case local-preference { | |
3bb513c3 | 359 | 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')"; |
b702f424 SP |
360 | leaf local-preference { |
361 | type uint32 { | |
362 | range "0..4294967295"; | |
363 | } | |
364 | } | |
365 | } | |
366 | ||
2690f18c DA |
367 | case alias { |
368 | 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')"; | |
369 | leaf alias { | |
370 | type string; | |
371 | } | |
372 | } | |
373 | ||
374 | case script { | |
3bb513c3 | 375 | 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')"; |
b702f424 SP |
376 | leaf script { |
377 | type string; | |
378 | } | |
379 | } | |
380 | ||
381 | case origin { | |
3bb513c3 | 382 | 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')"; |
b702f424 SP |
383 | leaf origin { |
384 | type enumeration { | |
385 | enum "egp" { | |
386 | value 0; | |
387 | description | |
388 | "Remote EGP"; | |
389 | } | |
390 | enum "igp" { | |
391 | value 1; | |
392 | description | |
393 | "Local IGP"; | |
394 | } | |
395 | enum "incomplete" { | |
396 | value 2; | |
397 | description | |
398 | "Unknown heritage"; | |
399 | } | |
400 | } | |
401 | } | |
402 | } | |
403 | ||
404 | case rpki { | |
3bb513c3 | 405 | 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')"; |
b702f424 SP |
406 | leaf rpki { |
407 | type enumeration { | |
408 | enum "invalid" { | |
409 | value 0; | |
410 | description | |
411 | "Invalid prefix"; | |
412 | } | |
413 | enum "notfound" { | |
414 | value 1; | |
415 | description | |
416 | "Prefix not found"; | |
417 | } | |
418 | enum "valid" { | |
419 | value 2; | |
420 | description | |
421 | "Valid prefix"; | |
422 | } | |
423 | } | |
424 | } | |
425 | } | |
426 | ||
427 | case probability { | |
3bb513c3 | 428 | 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')"; |
b702f424 SP |
429 | leaf probability { |
430 | type uint8 { | |
431 | range "0..100"; | |
432 | } | |
433 | } | |
434 | } | |
435 | ||
436 | case source-vrf { | |
3bb513c3 | 437 | 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')"; |
b702f424 SP |
438 | leaf source-vrf { |
439 | type string; | |
440 | } | |
441 | } | |
442 | ||
443 | case peer { | |
3bb513c3 | 444 | 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')"; |
b702f424 SP |
445 | choice peer { |
446 | description | |
447 | "Value of the peer"; | |
448 | case peer-ipv4-address { | |
449 | description | |
450 | "IP address of peer"; | |
451 | leaf peer-ipv4-address { | |
452 | type inet:ipv4-address; | |
453 | } | |
454 | } | |
455 | ||
456 | case peer-interface { | |
457 | description | |
458 | "Interface name of peer"; | |
459 | leaf peer-interface { | |
460 | type string; | |
461 | } | |
462 | } | |
463 | ||
464 | case peer-ipv6-address { | |
465 | description | |
466 | "IPv6 address of peer"; | |
467 | leaf peer-ipv6-address { | |
468 | type inet:ipv6-address; | |
469 | } | |
470 | } | |
471 | ||
472 | case peer-local { | |
473 | description | |
474 | "Static or Redistributed routes"; | |
475 | leaf peer-local { | |
476 | type boolean; | |
477 | } | |
478 | } | |
479 | } | |
480 | } | |
481 | ||
482 | case access-list-name { | |
3bb513c3 CH |
483 | 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 " |
484 | + "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 " | |
485 | + "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 " | |
486 | + "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')"; | |
b702f424 SP |
487 | description |
488 | "Access-list name"; | |
489 | leaf list-name { | |
490 | type filter:access-list-name; | |
491 | } | |
492 | } | |
493 | ||
494 | case evpn-default-route { | |
3bb513c3 | 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:evpn-default-route')"; |
b702f424 SP |
496 | description |
497 | "Match default EVPN type-5 route"; | |
498 | leaf evpn-default-route { | |
499 | type empty; | |
500 | } | |
501 | } | |
502 | ||
503 | case evpn-vni { | |
3bb513c3 | 504 | 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')"; |
b702f424 SP |
505 | description |
506 | "Match eVPN VNI"; | |
507 | leaf evpn-vni { | |
508 | type uint32 { | |
509 | range "1..16777215"; | |
510 | } | |
511 | } | |
512 | } | |
513 | ||
514 | case evpn-route-type { | |
3bb513c3 | 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:evpn-route-type')"; |
b702f424 SP |
516 | description |
517 | "Match eVPN route-type"; | |
518 | leaf evpn-route-type { | |
519 | type enumeration { | |
520 | enum "macip" { | |
521 | value 0; | |
522 | description | |
523 | "Mac-IP route"; | |
524 | } | |
525 | enum "multicast" { | |
526 | value 1; | |
527 | description | |
528 | "IMET route"; | |
529 | } | |
530 | enum "prefix" { | |
531 | value 2; | |
532 | description | |
533 | "Prefix route"; | |
534 | } | |
bd44ab08 CS |
535 | enum "ead" { |
536 | value 3; | |
537 | description | |
538 | "Ethernet Auto-Discovery route"; | |
539 | } | |
2514d231 CS |
540 | enum "es" { |
541 | value 4; | |
542 | description | |
543 | "Ethernet Segment route"; | |
544 | } | |
b702f424 SP |
545 | } |
546 | } | |
547 | } | |
548 | ||
549 | case evpn-rd { | |
3bb513c3 | 550 | 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')"; |
b702f424 SP |
551 | description |
552 | "Match eVPN route-distinguisher"; | |
553 | leaf route-distinguisher { | |
554 | type rt-types:route-distinguisher; | |
555 | } | |
556 | } | |
557 | ||
558 | case comm-list-name { | |
3bb513c3 CH |
559 | 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 " |
560 | + "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 " | |
561 | + "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')"; | |
b702f424 SP |
562 | container comm-list { |
563 | leaf comm-list-name { | |
564 | type bgp-filter:bgp-list-name; | |
565 | } | |
566 | ||
567 | leaf comm-list-name-exact-match { | |
568 | type boolean; | |
569 | description | |
570 | "Do exact matching of communities"; | |
571 | } | |
572 | } | |
573 | } | |
574 | ||
575 | case ipv4-address { | |
3bb513c3 | 576 | 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')"; |
b702f424 SP |
577 | leaf ipv4-address { |
578 | type inet:ipv4-address; | |
579 | description | |
580 | "IPv4 address"; | |
581 | } | |
582 | } | |
583 | ||
584 | case ipv6-address { | |
3bb513c3 | 585 | 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')"; |
b702f424 SP |
586 | leaf ipv6-address { |
587 | type inet:ipv6-address; | |
588 | description | |
589 | "IPv6 address"; | |
590 | } | |
591 | } | |
592 | } | |
593 | ||
594 | 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" { | |
595 | case distance { | |
3bb513c3 | 596 | 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')"; |
b702f424 SP |
597 | leaf distance { |
598 | type uint8 { | |
599 | range "0..255"; | |
600 | } | |
601 | } | |
602 | } | |
603 | ||
bb4dcdd1 DA |
604 | case extcommunity-none { |
605 | 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')"; | |
606 | description | |
607 | "Value of the BGP extended community attribute"; | |
608 | leaf extcommunity-none { | |
609 | type boolean; | |
610 | description "No extended community attribute"; | |
611 | } | |
612 | } | |
613 | ||
b702f424 | 614 | case extcommunity-rt { |
3bb513c3 | 615 | 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')"; |
b702f424 SP |
616 | description |
617 | "Value of the ext-community"; | |
618 | leaf extcommunity-rt { | |
619 | type string; | |
620 | description | |
621 | "Set BGP ext-community route-target attribute"; | |
622 | } | |
623 | } | |
624 | ||
625 | case extcommunity-soo { | |
3bb513c3 | 626 | 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')"; |
b702f424 SP |
627 | description |
628 | "Value of the ext-community"; | |
629 | leaf extcommunity-soo { | |
630 | type string; | |
631 | description | |
632 | "Set BGP ext-community site-of-origin attribute"; | |
633 | } | |
634 | } | |
635 | ||
636 | case extcommunity-lb { | |
3bb513c3 | 637 | 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')"; |
b702f424 SP |
638 | container extcommunity-lb { |
639 | description | |
640 | "Value of the ext-community."; | |
641 | leaf lb-type { | |
642 | type frr-bgp-route-map:extcommunity-lb-type; | |
643 | } | |
644 | ||
645 | leaf bandwidth { | |
646 | when "../lb-type = 'explicit-bandwidth'"; | |
647 | type uint16 { | |
648 | range "1..25600"; | |
649 | } | |
650 | description | |
651 | "Bandwidth value in Mbps"; | |
652 | } | |
653 | uses extcommunity-non-transitive-types; | |
654 | } | |
655 | } | |
656 | ||
657 | case ipv4-address { | |
3bb513c3 | 658 | 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')"; |
b702f424 SP |
659 | description |
660 | "Set the IPv4 address"; | |
661 | leaf ipv4-address { | |
662 | type inet:ipv4-address; | |
663 | } | |
664 | } | |
665 | ||
666 | case ipv4-nexthop { | |
3bb513c3 | 667 | 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')"; |
b702f424 SP |
668 | leaf ipv4-nexthop { |
669 | type string; | |
670 | } | |
671 | } | |
672 | ||
673 | case ipv6-address { | |
3bb513c3 CH |
674 | 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 " |
675 | + "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')"; | |
b702f424 SP |
676 | description |
677 | "Set the IPv6 address"; | |
678 | leaf ipv6-address { | |
679 | type inet:ipv6-address; | |
680 | } | |
681 | } | |
682 | ||
683 | case preference { | |
3bb513c3 CH |
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:ipv6-prefer-global') or " |
685 | + "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')"; | |
b702f424 SP |
686 | leaf preference { |
687 | type boolean; | |
688 | } | |
689 | } | |
690 | ||
691 | case label-index { | |
3bb513c3 | 692 | 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')"; |
b702f424 SP |
693 | leaf label-index { |
694 | type uint32 { | |
695 | range "0..1048560"; | |
696 | } | |
697 | } | |
698 | } | |
699 | ||
700 | case local-pref { | |
3bb513c3 | 701 | 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')"; |
b702f424 SP |
702 | leaf local-pref { |
703 | type string; | |
704 | } | |
705 | } | |
706 | ||
707 | case weight { | |
3bb513c3 | 708 | 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')"; |
b702f424 SP |
709 | leaf weight { |
710 | type uint32 { | |
711 | range "0..4294967295"; | |
712 | } | |
713 | } | |
714 | } | |
715 | ||
716 | case origin { | |
3bb513c3 | 717 | 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')"; |
b702f424 SP |
718 | leaf origin { |
719 | type enumeration { | |
720 | enum "egp" { | |
721 | value 0; | |
722 | description | |
723 | "Remote EGP"; | |
724 | } | |
725 | enum "igp" { | |
726 | value 1; | |
727 | description | |
728 | "Local IGP"; | |
729 | } | |
730 | enum "incomplete" { | |
731 | value 2; | |
732 | description | |
733 | "Unknown heritage"; | |
734 | } | |
735 | } | |
736 | } | |
737 | } | |
738 | ||
739 | case originator-id { | |
3bb513c3 | 740 | 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')"; |
b702f424 SP |
741 | leaf originator-id { |
742 | type inet:ipv4-address; | |
743 | } | |
744 | } | |
745 | ||
746 | case table { | |
3bb513c3 | 747 | 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')"; |
b702f424 SP |
748 | leaf table { |
749 | type uint32 { | |
750 | range "1..4294967295"; | |
751 | } | |
752 | } | |
753 | } | |
754 | ||
755 | case atomic-aggregate { | |
3bb513c3 | 756 | 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')"; |
b702f424 SP |
757 | leaf atomic-aggregate { |
758 | type empty; | |
759 | } | |
760 | } | |
761 | ||
762 | case as-path-prepend { | |
3bb513c3 | 763 | 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')"; |
b702f424 SP |
764 | choice as-path-prepend { |
765 | description | |
766 | "Value of the BGP AS-path attribute"; | |
767 | case prepend-as { | |
768 | description | |
769 | "Prepend the mentioned AS-path"; | |
770 | leaf prepend-as-path { | |
771 | type string; | |
772 | } | |
773 | } | |
774 | ||
775 | case last-as { | |
776 | description | |
777 | "Prepend the last ASN in the AS-path"; | |
778 | leaf last-as { | |
779 | type uint8 { | |
780 | range "1..10"; | |
781 | } | |
782 | } | |
783 | } | |
784 | } | |
785 | } | |
786 | ||
787 | case as-path-exclude { | |
3bb513c3 | 788 | 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')"; |
b702f424 SP |
789 | leaf exclude-as-path { |
790 | type string; | |
791 | description | |
792 | "Exclude the mentioned AS-path"; | |
793 | } | |
794 | } | |
795 | ||
796 | case community { | |
3bb513c3 | 797 | 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')"; |
b702f424 SP |
798 | choice community { |
799 | description | |
800 | "Value of the BGP community attribute"; | |
801 | case none { | |
802 | description | |
803 | "No community attribute"; | |
804 | leaf community-none { | |
805 | type boolean; | |
806 | } | |
807 | } | |
808 | ||
809 | case community-string { | |
810 | description | |
811 | "Community string"; | |
812 | leaf community-string { | |
813 | type string; | |
814 | } | |
815 | } | |
816 | } | |
817 | } | |
818 | ||
819 | case large-community { | |
3bb513c3 | 820 | 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')"; |
b702f424 SP |
821 | choice large-community { |
822 | description | |
823 | "Value of the BGP large-community attribute"; | |
824 | case none { | |
825 | description | |
826 | "No large-community attribute"; | |
827 | leaf large-community-none { | |
828 | type boolean; | |
829 | } | |
830 | } | |
831 | ||
832 | case large-community-string { | |
833 | description | |
834 | "Large-Community string"; | |
835 | leaf large-community-string { | |
836 | type string; | |
837 | } | |
838 | } | |
839 | } | |
840 | } | |
841 | ||
842 | case aggregator { | |
3bb513c3 | 843 | 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')"; |
b702f424 SP |
844 | container aggregator { |
845 | leaf aggregator-asn { | |
846 | type uint32 { | |
847 | range "1..4294967295"; | |
848 | } | |
849 | description | |
850 | "ASN of the aggregator"; | |
851 | } | |
852 | ||
853 | leaf aggregator-address { | |
854 | when "../aggregator-asn > 0 or " | |
855 | + "../aggregator-asn <= 4294967295"; | |
856 | type inet:ipv4-address; | |
857 | description | |
858 | "IPv4 address of the aggregator"; | |
859 | } | |
860 | } | |
861 | } | |
862 | ||
863 | case comm-list-name { | |
3bb513c3 CH |
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:comm-list-delete') or " |
865 | + "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')"; | |
b702f424 SP |
866 | leaf comm-list-name { |
867 | type bgp-filter:bgp-list-name; | |
868 | } | |
869 | } | |
d0a4ee60 AD |
870 | case evpn-gateway-ip-ipv4 { |
871 | when | |
872 | "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, | |
873 | 'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')"; | |
874 | description | |
875 | "Set EVPN gateway IP overlay index IPv4"; | |
876 | leaf evpn-gateway-ip-ipv4 { | |
877 | type inet:ipv4-address; | |
878 | } | |
879 | } | |
880 | case evpn-gateway-ip-ipv6 { | |
881 | when | |
882 | "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, | |
883 | 'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')"; | |
884 | description | |
885 | "Set EVPN gateway IP overlay index IPv6"; | |
886 | leaf evpn-gateway-ip-ipv6 { | |
887 | type inet:ipv6-address; | |
888 | } | |
889 | } | |
b702f424 SP |
890 | } |
891 | } |