]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-zebra.yang
Merge pull request #6729 from volta-networks/fix_stale_pw_status
[mirror_frr.git] / yang / frr-zebra.yang
CommitLineData
fdd5c6e8
MS
1module frr-zebra {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/zebra";
4 prefix frr-zebra;
5
6 import ietf-yang-types {
7 prefix yang;
8 }
9
10 import ietf-inet-types {
11 prefix inet;
12 }
13
bc77245f
RZ
14 import frr-route-map {
15 prefix frr-route-map;
16 }
17
fdd5c6e8
MS
18 import frr-route-types {
19 prefix frr-route-types;
20 }
21
22 import ietf-routing-types {
23 prefix rt-types;
24 }
25
26 import frr-nexthop {
27 prefix frr-nh;
28 }
29
93a6af75
CS
30 import frr-routing {
31 prefix frr-rt;
32 }
33
fdd5c6e8
MS
34 import frr-interface {
35 prefix frr-interface;
36 }
37
4218384d
CS
38 import frr-vrf {
39 prefix frr-vrf;
40 }
41
fdd5c6e8 42 organization
8678d638 43 "FRRouting";
fdd5c6e8
MS
44 contact
45 "FRR Users List: <mailto:frog@lists.frrouting.org>
46 FRR Development List: <mailto:dev@lists.frrouting.org>";
47 description
fe3b629a
RW
48 "This module defines a model for managing the FRR zebra daemon.
49
50 Copyright 2020 FRRouting
51
52 Redistribution and use in source and binary forms, with or without
53 modification, are permitted provided that the following conditions
54 are met:
55
56 1. Redistributions of source code must retain the above copyright notice,
57 this list of conditions and the following disclaimer.
58
59 2. Redistributions in binary form must reproduce the above copyright
60 notice, this list of conditions and the following disclaimer in the
61 documentation and/or other materials provided with the distribution.
62
63 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
64 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
65 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
66 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
67 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
68 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
69 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
70 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
71 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
72 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
73 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
fdd5c6e8
MS
74
75 revision 2019-06-01 {
76 description
77 "Initial revision.";
78 }
79
80 typedef unix-timestamp {
81 type uint32;
82 units "seconds";
83 description
84 "An absolute time in seconds since the unix epoch.";
85 }
86
93a6af75
CS
87 identity zebra-interface-type {
88 description
89 "zebra interface type.";
90 }
91
92 identity zif-other {
93 base zebra-interface-type;
94 description
95 "Zebra interface type other.";
96 }
97
98 identity zif-bridge {
99 base zebra-interface-type;
100 description
101 "Zebra interface type bridge.";
102 }
103
104 identity zif-vlan {
105 base zebra-interface-type;
106 description
107 "Zebra interface type vlan.";
108 }
109
110 identity zif-vxlan {
111 base zebra-interface-type;
112 description
113 "Zebra interface type vxlan.";
114 }
115
116 identity zif-vrf {
117 base zebra-interface-type;
118 description
119 "Zebra interface type vrf.";
120 }
121
122 identity zif-veth {
123 base zebra-interface-type;
124 description
125 "Zebra interface type veth.";
126 }
127
128 identity zif-bond {
129 base zebra-interface-type;
130 description
131 "Zebra interface type bond.";
132 }
133
134 identity zif-bond-slave {
135 base zebra-interface-type;
136 description
137 "Zebra interface type bond slave.";
138 }
139
140 identity zif-macvlan {
141 base zebra-interface-type;
142 description
143 "Zebra interface type macvlan.";
144 }
145
fdd5c6e8
MS
146 /*
147 * Multicast RPF mode configurable type
148 */
3d2ab385 149
fdd5c6e8
MS
150 typedef mcast-rpf-lookup-mode {
151 type enumeration {
152 enum "none" {
3d2ab385
CS
153 value 0;
154 description
155 "No mode set.";
fdd5c6e8
MS
156 }
157 enum "mrib-only" {
3d2ab385
CS
158 value 1;
159 description
160 "Lookup in unicast RIB only.";
fdd5c6e8
MS
161 }
162 enum "urib-only" {
3d2ab385
CS
163 value 2;
164 description
165 "Lookup in multicast RIB only.";
fdd5c6e8
MS
166 }
167 enum "mrib-then-urib" {
3d2ab385
CS
168 value 3;
169 description
170 "Try multicast RIB first, fall back to unicast RIB.";
fdd5c6e8
MS
171 }
172 enum "lower-distance" {
3d2ab385
CS
173 value 4;
174 description
175 "Lookup both unicast and mcast, use entry with lower distance.";
fdd5c6e8
MS
176 }
177 enum "longer-prefix" {
3d2ab385
CS
178 value 5;
179 description
180 "Lookup both unicast and mcast, use entry with longer prefix.";
fdd5c6e8
MS
181 }
182 }
183 description
184 "Multicast RPF lookup behavior";
185 }
186
3d2ab385
CS
187 // End of ip6-route
188 /*
189 * VxLAN Network Identifier type
190 */
191
192 typedef vni-id-type {
193 type uint32 {
194 range "0..16777215";
195 }
196 description
197 "A VxLAN network identifier value.";
198 }
199
200 typedef vni-vtep-flood-type {
201 type enumeration {
202 enum "head-end-repl" {
203 value 0;
204 description
205 "Head-end replication.";
206 }
207 enum "disabled" {
208 value 1;
209 description
210 "Flooding disabled.";
211 }
212 enum "pim-sm" {
213 value 2;
214 description
215 "Multicast PIM-SM.";
216 }
217 }
218 }
219
fdd5c6e8
MS
220 /*
221 * Common route data, shared by v4 and v6 routes.
222 */
3d2ab385 223
fdd5c6e8
MS
224 grouping route-common {
225 description
226 "Common information about a route.";
fdd5c6e8
MS
227
228 leaf distance {
229 type uint8;
230 description
231 "Admin distance based on routing protocol.";
232 }
3d2ab385 233
fdd5c6e8
MS
234 leaf metric {
235 type uint32;
236 description
237 "Route metric value.";
238 }
3d2ab385 239
fdd5c6e8
MS
240 leaf tag {
241 type uint32 {
242 range "1..4294967295";
243 }
244 description
245 "Route tag value.";
246 }
247
4218384d 248 leaf selected {
fdd5c6e8
MS
249 type empty;
250 description
251 "Route is the selected or preferred route for the prefix.";
252 }
3d2ab385 253
4218384d 254 leaf installed {
fdd5c6e8
MS
255 type empty;
256 description
257 "Route is installed in the FIB.";
258 }
3d2ab385 259
4218384d 260 leaf failed {
fdd5c6e8
MS
261 type empty;
262 description
263 "Route installation in FIB has failed.";
264 }
3d2ab385 265
4218384d 266 leaf queued {
fdd5c6e8
MS
267 type empty;
268 description
269 "Route has a pending FIB operation that has not completed.";
270 }
271
272 leaf internal-flags {
273 type int32;
274 description
275 "Internal flags for the route.";
276 }
3d2ab385 277
fdd5c6e8
MS
278 leaf internal-status {
279 type int32;
280 description
281 "Internal status for the route.";
282 }
283
284 leaf uptime {
4218384d 285 type yang:date-and-time;
fdd5c6e8
MS
286 description
287 "Uptime for the route.";
288 }
289
9670b0b3 290 uses frr-nh:frr-nexthop-group-operational;
3d2ab385 291 }
fdd5c6e8 292
3d2ab385 293 // End of route-common
fdd5c6e8
MS
294 /*
295 * IPv4 Route object.
296 */
3d2ab385 297
fdd5c6e8
MS
298 grouping ip4-route {
299 description
300 "An IPv4 route.";
fdd5c6e8
MS
301 leaf prefix {
302 type inet:ipv4-prefix;
303 description
304 "IP address (in the form A.B.C.D) and prefix length,
305 separated by the slash (/) character. The range of
306 values for the prefix-length is 0 to 32.";
307 }
3d2ab385
CS
308
309 leaf protocol {
fdd5c6e8
MS
310 type frr-route-types:frr-route-types-v4;
311 description
312 "The protocol owning the route.";
313 }
314
315 uses route-common;
3d2ab385 316 }
fdd5c6e8 317
3d2ab385 318 // End of ip4-route
fdd5c6e8
MS
319 /*
320 * IPv6 Route object.
321 */
3d2ab385 322
fdd5c6e8
MS
323 grouping ip6-route {
324 description
325 "An IPv6 route.";
fdd5c6e8
MS
326 leaf prefix {
327 type inet:ipv6-prefix;
328 description
329 "The route's IPv6 prefix.";
330 }
3d2ab385
CS
331
332 leaf protocol {
fdd5c6e8
MS
333 type frr-route-types:frr-route-types-v6;
334 description
335 "The protocol owning the route.";
336 }
337
338 uses route-common;
fdd5c6e8 339 }
4218384d
CS
340 // End of ip6-route
341
fdd5c6e8
MS
342 /*
343 * Information about EVPN VNIs
344 */
3d2ab385 345
fdd5c6e8 346 grouping vni-information {
3d2ab385
CS
347 choice type-choice {
348 case l2 {
349 leaf is-layer2 {
350 type empty;
351 description
352 "Information about an L2 VNI.";
fdd5c6e8 353 }
3d2ab385
CS
354
355 leaf vtep-count {
356 type uint32;
357 description
358 "Number of VTEPs.";
fdd5c6e8
MS
359 }
360 }
3d2ab385
CS
361
362 case l3 {
363 leaf is-layer3 {
364 type empty;
365 description
366 "Information about an L3 VNI.";
367 }
fdd5c6e8 368 }
3d2ab385
CS
369 }
370
371 leaf vni-id {
372 type vni-id-type;
373 description
374 "The VNI identifier.";
375 }
376
377 leaf vxlan-ifname {
378 type frr-interface:interface-ref;
379 description
380 "The VxLAN interface name.";
381 }
382
383 leaf mac-count {
384 type uint32;
385 description
386 "Number of valid MACs.";
387 }
388
389 leaf neighbor-count {
390 type uint32;
391 description
392 "Number of neighbors.";
393 }
394
395 leaf vrf {
1b9468cc
CS
396 type string {
397 length "1..36";
398 }
3d2ab385
CS
399 description
400 "The tenant VRF.";
401 }
402
403 leaf local-vtep-addr {
404 type inet:ipv4-address;
405 description
406 "The local VTEP IP address.";
407 }
fdd5c6e8
MS
408 }
409
410 /*
411 * Detailed EVPN VNI information for L2.
412 */
3d2ab385 413
fdd5c6e8
MS
414 grouping vni-l2-detail {
415 leaf if-index {
416 type uint32;
417 description
418 "The VxLAN ifindex.";
419 }
3d2ab385 420
fdd5c6e8
MS
421 leaf advertise-gw {
422 type empty;
423 description
424 "The gateway MAC-IP is being advertised.";
425 }
3d2ab385 426
93a6af75 427 leaf mcast-group {
fdd5c6e8
MS
428 type rt-types:ipv4-multicast-group-address;
429 description
430 "The VNI multicast group for BUM traffic.";
431 }
3d2ab385 432
fdd5c6e8
MS
433 list remote-vtep-list {
434 leaf remote-vtep {
435 type inet:ipv4-address;
436 description
437 "The remote VTEP IP address.";
438 }
3d2ab385 439
fdd5c6e8
MS
440 leaf vtep-flood {
441 type vni-vtep-flood-type;
442 }
443 }
444 }
445
446 /*
447 * Detailed EVPN VNI information for L3.
448 */
3d2ab385 449
fdd5c6e8
MS
450 grouping vni-l3-detail {
451 leaf svi-interface {
1b9468cc 452 type frr-interface:interface-ref;
fdd5c6e8
MS
453 description
454 "The SVI interface.";
455 }
3d2ab385 456
fdd5c6e8
MS
457 leaf is-up {
458 type empty;
459 description
460 "The state is active.";
461 }
3d2ab385 462
fdd5c6e8
MS
463 leaf prefix-only {
464 type empty;
465 description
466 "Prefix routes only";
467 }
3d2ab385 468
fdd5c6e8
MS
469 leaf router-mac {
470 type yang:mac-address;
471 description
472 "The VNI Router MAC address.";
473 }
3d2ab385 474
fdd5c6e8
MS
475 list vni-list {
476 description
477 "A list of the associated L2 VNIs.";
478 leaf vni-id {
479 type vni-id-type;
480 description
481 "An L2 VNI identifier.";
482 }
483 }
484 }
485
486 /*
487 * Debug options
488 */
3d2ab385 489
fdd5c6e8
MS
490 grouping zebra-debugs {
491 leaf debug-events {
492 type boolean;
3d2ab385
CS
493 description
494 "Debug ZAPI events.";
fdd5c6e8 495 }
3d2ab385 496
fdd5c6e8
MS
497 leaf debug-zapi-send {
498 type boolean;
3d2ab385
CS
499 description
500 "Debug ZAPI messages sent.";
fdd5c6e8 501 }
3d2ab385 502
fdd5c6e8
MS
503 leaf debug-zapi-recv {
504 type boolean;
3d2ab385
CS
505 description
506 "Debug ZAPI messages received.";
fdd5c6e8 507 }
3d2ab385 508
fdd5c6e8
MS
509 leaf debug-zapi-detail {
510 type boolean;
3d2ab385
CS
511 description
512 "Debug ZAPI details.";
fdd5c6e8 513 }
3d2ab385 514
fdd5c6e8
MS
515 leaf debug-kernel {
516 type boolean;
3d2ab385
CS
517 description
518 "Debug kernel events.";
fdd5c6e8 519 }
3d2ab385 520
fdd5c6e8
MS
521 leaf debug-kernel-msg-send {
522 type boolean;
3d2ab385
CS
523 description
524 "Debug kernel messages sent.";
fdd5c6e8 525 }
4218384d 526
fdd5c6e8
MS
527 leaf debug-kernel-msg-recv {
528 type boolean;
3d2ab385
CS
529 description
530 "Debug kernel messages received.";
fdd5c6e8 531 }
3d2ab385 532
fdd5c6e8
MS
533 leaf debug-rib {
534 type boolean;
3d2ab385
CS
535 description
536 "Debug RIB processing.";
fdd5c6e8 537 }
3d2ab385 538
fdd5c6e8
MS
539 leaf debug-rib-detail {
540 type boolean;
3d2ab385
CS
541 description
542 "Debug RIB processing details.";
fdd5c6e8 543 }
3d2ab385 544
fdd5c6e8
MS
545 leaf debug-fpm {
546 type boolean;
fdd5c6e8 547 description
3d2ab385 548 "Debug the FIB Push Interface subsystem.";
fdd5c6e8
MS
549 }
550
3d2ab385 551 leaf debug-nht {
fdd5c6e8
MS
552 type boolean;
553 description
3d2ab385 554 "Debug Nexthop-tracking.";
fdd5c6e8
MS
555 }
556
3d2ab385
CS
557 leaf debug-nht-detail {
558 type boolean;
fdd5c6e8 559 description
3d2ab385 560 "Debug Nexthop-tracking details.";
fdd5c6e8
MS
561 }
562
3d2ab385
CS
563 leaf debug-mpls {
564 type boolean;
fdd5c6e8 565 description
3d2ab385 566 "Debug MPLS.";
fdd5c6e8
MS
567 }
568
3d2ab385
CS
569 leaf debug-vxlan {
570 type boolean;
fdd5c6e8 571 description
3d2ab385 572 "Debug VxLAN.";
fdd5c6e8
MS
573 }
574
3d2ab385
CS
575 leaf debug-pw {
576 type boolean;
fdd5c6e8 577 description
3d2ab385 578 "Debug pseudowires.";
fdd5c6e8
MS
579 }
580
3d2ab385
CS
581 leaf debug-dplane {
582 type boolean;
fdd5c6e8 583 description
3d2ab385 584 "Debug the dataplane subsystem.";
fdd5c6e8
MS
585 }
586
3d2ab385
CS
587 leaf debug-dplane-detail {
588 type boolean;
fdd5c6e8 589 description
3d2ab385 590 "Debug dataplane subsystem details.";
fdd5c6e8
MS
591 }
592
3d2ab385
CS
593 leaf debug-mlag {
594 type boolean;
fdd5c6e8 595 description
3d2ab385 596 "Debug MLAG.";
fdd5c6e8 597 }
3d2ab385 598 }
fdd5c6e8 599
4218384d
CS
600 grouping ribs {
601 container ribs {
602 description
603 "RIBs supported by FRR.";
604 list rib {
605 key "afi-safi-name table-id";
4218384d
CS
606 leaf afi-safi-name {
607 type identityref {
755100ac 608 base frr-rt:afi-safi-type;
4218384d 609 }
4218384d
CS
610 description
611 "AFI, SAFI name.";
612 }
613
00ebe5b5
CS
614 leaf table-id {
615 type uint32;
616 description
617 "Routing Table id (default id - 254).";
618 }
619
4218384d
CS
620 list route {
621 key "prefix";
622 config false;
1fca062a 623 leaf prefix {
00ebe5b5
CS
624 type inet:ip-prefix;
625 description
626 "The route's prefix.";
1fca062a 627 }
56a88b9e 628
303cfba6
CS
629 list route-entry {
630 key "protocol";
631 leaf protocol {
00ebe5b5
CS
632 type frr-route-types:frr-route-types;
633 description
634 "The protocol owning the route.";
303cfba6 635 }
1fca062a 636
303cfba6
CS
637 leaf instance {
638 type uint16;
639 must "../protocol = \"ospf\"";
640 description
00ebe5b5 641 "Retrieve routes from a specific OSPF instance.";
303cfba6 642 }
00ebe5b5 643
303cfba6 644 uses route-common;
1fca062a 645 }
4218384d
CS
646 }
647 }
648 }
649 }
650
3d2ab385 651 // End of zebra container
fdd5c6e8
MS
652 /*
653 * RPCs
654 */
3d2ab385 655
fdd5c6e8
MS
656 rpc get-route-information {
657 description
658 "Retrieve IPv4 or IPv6 unicast routes.";
fdd5c6e8 659 input {
fdd5c6e8
MS
660 choice ip-type {
661 case v4 {
662 leaf ipv4 {
663 type empty;
664 mandatory true;
665 description
666 "Retrieve IPv4 routes.";
667 }
4218384d 668
fdd5c6e8
MS
669 leaf prefix-v4 {
670 type inet:ipv4-prefix;
671 description
672 "Retrieve routes matching a specific prefix.";
673 }
3d2ab385 674
fdd5c6e8
MS
675 leaf supernets-only {
676 type empty;
677 description
678 "Skip routes that are subnets of classful prefix sizes.";
679 }
680 }
3d2ab385 681
fdd5c6e8
MS
682 case v6 {
683 leaf ipv6 {
684 type empty;
685 mandatory true;
686 description
687 "Retrieve IPv6 routes.";
688 }
3d2ab385 689
fdd5c6e8
MS
690 leaf prefix-v6 {
691 type inet:ipv6-prefix;
692 description
693 "Retrieve routes matching a specific prefix.";
694 }
695 }
696 }
697
698 choice vrf-choice {
699 case single {
700 leaf vrf {
1b9468cc
CS
701 type string {
702 length "1..36";
703 }
fdd5c6e8
MS
704 description
705 "Retrieve routes in a non-default vrf.";
706 }
707 }
3d2ab385 708
fdd5c6e8
MS
709 case all {
710 leaf all-vrfs {
711 type empty;
712 description
713 "Retrieve routes from all vrfs.";
714 }
715 }
716 }
717
718 leaf fib-routes {
719 type empty;
720 description
721 "Retrieve FIB routes rather than RIB routes.";
722 }
723
724 leaf table-id {
725 type uint32 {
726 range "1..4294967295";
727 }
728 description
729 "Routing table id to retrieve.";
730 }
731
732 leaf protocol {
733 type frr-route-types:frr-route-types-v4;
734 description
735 "Retrieve routes from a specific protocol daemon.";
736 }
3d2ab385 737
fdd5c6e8
MS
738 leaf ospf-instance {
739 type uint32 {
740 range "1..65535";
741 }
4218384d 742 must "../protocol = \"ospf\"";
fdd5c6e8
MS
743 description
744 "Retrieve routes from a specific OSPF instance.";
745 }
746
747 choice detail {
748 case det {
749 leaf include-detail {
750 type empty;
751 description
752 "Include detailed information.";
753 }
754 }
3d2ab385 755
fdd5c6e8
MS
756 case summ {
757 leaf summary {
758 type empty;
759 description
760 "Include summary information only.";
761 }
762 }
763 }
3d2ab385
CS
764 }
765 // End of input
fdd5c6e8
MS
766 output {
767 choice route-list {
768 case v4 {
769 container routes-v4 {
770 description
771 "IPv4 route information.";
772 list route {
773 uses ip4-route;
774 }
775 }
776 }
3d2ab385 777
fdd5c6e8
MS
778 case v6 {
779 container routes-v6 {
780 description
781 "IPv6 route information.";
782 list route {
783 uses ip6-route;
784 }
785 }
786 }
787 }
3d2ab385
CS
788 }
789 // End of output
790 }
fdd5c6e8 791
3d2ab385 792 // End get-route-information
fdd5c6e8
MS
793
794 rpc get-v6-mroute-info {
795 description
796 "Retrieve IPv6 multicast routes.";
fdd5c6e8
MS
797 input {
798 choice vrf-choice {
799 case single {
800 leaf vrf {
1b9468cc
CS
801 type string {
802 length "1..36";
803 }
fdd5c6e8
MS
804 description
805 "Retrieve routes in a non-default vrf.";
806 }
807 }
3d2ab385 808
fdd5c6e8
MS
809 case all {
810 leaf all-vrfs {
811 type empty;
812 description
813 "Retrieve routes from all vrfs.";
814 }
815 }
816 }
817 }
818
819 output {
820 container routes {
821 description
822 "IPv6 mcast route information.";
823 list route {
824 uses ip6-route;
825 }
826 }
827 }
3d2ab385 828 }
fdd5c6e8 829
3d2ab385 830 // End get-v6-mroute-info
fdd5c6e8
MS
831
832 rpc get-vrf-info {
833 description
834 "Retrieve VRF information; the default VRF is elided.";
fdd5c6e8 835 // Note: no input clause.
fdd5c6e8
MS
836 output {
837 list vrf-list {
838 leaf name {
1b9468cc
CS
839 type string {
840 length "1..36";
841 }
fdd5c6e8
MS
842 description
843 "The VRF name";
844 }
3d2ab385 845
fdd5c6e8
MS
846 leaf is-user-config {
847 type empty;
848 description
849 "The VRF was configured by an admin.";
850 }
3d2ab385 851
fdd5c6e8
MS
852 leaf vrf-id {
853 type uint32;
854 description
855 "The VRF id.";
856 }
3d2ab385 857
fdd5c6e8
MS
858 choice vrf-type {
859 case inactive {
860 leaf is-inactive {
861 type empty;
862 description
863 "The VRF is inactive.";
864 }
865 }
3d2ab385 866
fdd5c6e8
MS
867 case netns {
868 leaf netns-name {
869 type string;
870 description
871 "The net namespace name associated with the VRF.";
872 }
873 }
3d2ab385 874
fdd5c6e8
MS
875 case table {
876 leaf table-id {
877 type uint32;
878 description
879 "The table-id associated with the VRF.";
880 }
881 }
882 }
883 }
884 }
3d2ab385
CS
885 }
886
887 // End get-vrf-info
fdd5c6e8
MS
888
889 rpc get-vrf-vni-info {
890 description
891 "Retrieve mappings between EVPN VNI and VRF.";
fdd5c6e8 892 // Note: no input clause.
fdd5c6e8
MS
893 output {
894 list vrf-vni-list {
895 leaf vrf-name {
1b9468cc
CS
896 type string {
897 length "1..36";
898 }
fdd5c6e8
MS
899 description
900 "The VRF name.";
901 }
3d2ab385 902
fdd5c6e8
MS
903 leaf vni-id {
904 type vni-id-type;
905 description
906 "The EVPN VNI.";
907 }
3d2ab385 908
fdd5c6e8
MS
909 leaf vxlan-if-name {
910 type frr-interface:interface-ref;
911 description
912 "The VxLAN interface name.";
913 }
3d2ab385 914
fdd5c6e8
MS
915 leaf svi-if-name {
916 type frr-interface:interface-ref;
917 description
918 "The SVI interface name.";
919 }
3d2ab385 920
fdd5c6e8
MS
921 leaf router-mac-addr {
922 type yang:mac-address;
923 description
924 "Router MAC address.";
925 }
3d2ab385 926
fdd5c6e8
MS
927 leaf is-up {
928 type empty;
929 description
930 "The state is active.";
931 }
932 }
933 }
3d2ab385
CS
934 }
935
936 // End get-vrf-vni-info
fdd5c6e8
MS
937
938 rpc get-evpn-info {
939 description
940 "Retrieve global information about EVPN.";
fdd5c6e8 941 // Note: No input clause.
fdd5c6e8
MS
942 output {
943 leaf l2vni-count {
944 type uint32;
945 description
946 "Number of L2 VNIs.";
947 }
3d2ab385 948
fdd5c6e8
MS
949 leaf l3vni-count {
950 type uint32;
951 description
952 "Number of L3 VNIs.";
953 }
3d2ab385 954
fdd5c6e8
MS
955 leaf advertise-gateway {
956 type empty;
957 description
958 "Advertise the gateway MAC-IP.";
959 }
3d2ab385 960
fdd5c6e8
MS
961 leaf advertise-svi {
962 type empty;
963 description
964 "Advertise SVI MAC-IP.";
965 }
3d2ab385 966
fdd5c6e8
MS
967 leaf dup-detect {
968 type empty;
969 description
970 "Duplicate address detection is enabled.";
971 }
3d2ab385 972
fdd5c6e8
MS
973 leaf dad-max-moves {
974 type uint32;
975 description
976 "Maximum moves allowed before address is considered duplicate.";
977 }
3d2ab385 978
fdd5c6e8
MS
979 leaf dad-timeout {
980 type uint32;
981 units "seconds";
982 description
983 "Duplicate address detection timeout.";
984 }
3d2ab385 985
fdd5c6e8
MS
986 leaf dad-freeze {
987 type empty;
988 description
989 "Duplicate address detection freeze enabled.";
990 }
991
992 choice dad-freeze-choice {
993 case freeze-permanent {
994 leaf dad-freeze-perm {
995 type empty;
996 description
997 "Duplicate address detection freeze is permanent.";
998 }
999 }
3d2ab385 1000
fdd5c6e8
MS
1001 case freeze-time {
1002 leaf dad-freeze-time {
1003 type uint32;
1004 units "seconds";
1005 description
1006 "Duplicate address detection freeze timer.";
1007 }
1008 }
1009 }
1010 }
3d2ab385
CS
1011 }
1012
1013 // End get-evpn-info
fdd5c6e8
MS
1014
1015 rpc get-vni-info {
1016 // If no vni is specified, retrieve global list.
1017 input {
1018 choice vni-choice {
1019 default "all-vnis";
1020 case all-vnis {
1021 leaf all-vnis {
1022 type empty;
1023 description
1024 "Retrieve information about all VNIs.";
1025 }
1026 }
3d2ab385 1027
fdd5c6e8
MS
1028 case single-vni {
1029 leaf vni-id {
1030 type vni-id-type;
1031 description
1032 "Retrieve information about a specific EVPN VNI.";
1033 }
1034 }
1035 }
3d2ab385 1036
fdd5c6e8
MS
1037 leaf detailed-info {
1038 type empty;
1039 description
1040 "Retrieve detailed information.";
1041 }
1042 }
1043
1044 output {
1045 list vni-list {
1046 description
1047 "Information about EVPN VNI objects.";
fdd5c6e8
MS
1048 uses vni-information;
1049
1050 choice detail-choice {
1051 case l2 {
1052 description
1053 "Detailed L2 information.";
1054 uses vni-l2-detail;
1055 }
3d2ab385 1056
fdd5c6e8
MS
1057 case l3 {
1058 description
1059 "Detailed L3 information.";
1060 uses vni-l3-detail;
1061 }
1062 }
1063 }
1064 }
3d2ab385
CS
1065 }
1066
1067 // End get-vni-info
fdd5c6e8
MS
1068
1069 rpc get-evpn-vni-rmac {
1070 description
1071 "Retrieve information about VxLAN VNI RMACs.";
fdd5c6e8
MS
1072 input {
1073 choice vni-choice {
1074 default "all-vnis";
1075 case all-vnis {
1076 leaf all-vnis {
1077 type empty;
1078 description
1079 "Retrieve information about all VNIs.";
1080 }
1081 }
3d2ab385 1082
fdd5c6e8
MS
1083 case single-vni {
1084 leaf vni-id {
1085 type vni-id-type;
1086 description
1087 "Retrieve information about a specific EVPN VNI.";
1088 }
3d2ab385 1089
fdd5c6e8
MS
1090 leaf vni-rmac {
1091 type yang:mac-address;
1092 description
1093 "A single RMAC address.";
1094 }
1095 }
1096 }
1097 }
1098
1099 output {
1100 list rmac-info-list {
1101 leaf rmac {
1102 type yang:mac-address;
1103 description
1104 "The RMAC address.";
1105 }
3d2ab385 1106
fdd5c6e8
MS
1107 leaf remote-vtep {
1108 type inet:ipv4-address;
1109 description
1110 "The remote VTEP IP address.";
1111 }
3d2ab385 1112
fdd5c6e8
MS
1113 leaf refcount {
1114 type uint32;
1115 description
1116 "The refcount of the RMAC.";
1117 }
3d2ab385 1118
fdd5c6e8
MS
1119 list prefix-list {
1120 leaf prefix-item {
1121 type inet:ip-prefix;
1122 description
1123 "IP prefixes associated with the RMAC.";
1124 }
1125 }
1126 }
1127 }
3d2ab385
CS
1128 }
1129
1130 // End get-evpn-vni-rmac
fdd5c6e8
MS
1131
1132 rpc get-evpn-vni-nexthops {
1133 description
1134 "Retrieve information about EVPN nexthops.";
fdd5c6e8
MS
1135 input {
1136 choice vni-choice {
1137 default "all-vnis";
1138 case all-vnis {
1139 leaf all-vnis {
1140 type empty;
1141 description
1142 "Retrieve information about all VNIs.";
1143 }
1144 }
3d2ab385 1145
fdd5c6e8
MS
1146 case single-vni {
1147 leaf vni-id {
1148 type vni-id-type;
1149 description
1150 "Retrieve information about a specific EVPN VNI.";
1151 }
3d2ab385 1152
fdd5c6e8
MS
1153 leaf vni-ipaddr {
1154 type inet:ip-address;
1155 description
1156 "A single host IP address (v4 or v6).";
1157 }
1158 }
1159 }
1160 }
1161
1162 output {
1163 list nh-info-list {
1164 leaf ip-addr {
1165 type inet:ip-address;
1166 description
1167 "The nexthop IP address.";
1168 }
3d2ab385 1169
fdd5c6e8
MS
1170 leaf mac-addr {
1171 type yang:mac-address;
1172 description
1173 "The nexthop MAC address.";
1174 }
3d2ab385 1175
fdd5c6e8
MS
1176 leaf refcount {
1177 type uint32;
1178 description
1179 "The refcount of the RMAC.";
1180 }
3d2ab385 1181
fdd5c6e8
MS
1182 list prefix-list {
1183 leaf prefix-item {
1184 type inet:ip-prefix;
1185 description
1186 "IP prefixes associated with the RMAC.";
1187 }
1188 }
3d2ab385 1189 }
fdd5c6e8 1190 }
3d2ab385
CS
1191 }
1192
1193 // End get-evpn-vni-vteps
fdd5c6e8
MS
1194
1195 rpc clear-evpn-dup-addr {
1196 description
1197 "Clear duplicate address detection state for one or all VNIs.";
1198 input {
1199 choice clear-dup-choice {
1200 case all-case {
1201 leaf all-vnis {
1202 type empty;
1203 description
1204 "Clear all VNIs.";
1205 }
1206 }
3d2ab385 1207
fdd5c6e8
MS
1208 case single-case {
1209 leaf vni-id {
1210 type vni-id-type;
1211 description
1212 "Clear state for a single EVPN VNI.";
1213 }
3d2ab385 1214
fdd5c6e8
MS
1215 choice ip-mac-choice {
1216 description
1217 "Clear state for a specific MAC or IP address.";
1218 case ip-case {
1219 leaf vni-ipaddr {
1220 type inet:ip-address;
1221 description
1222 "A specific IP address (v4 or v6).";
1223 }
1224 }
3d2ab385 1225
fdd5c6e8
MS
1226 case mac-case {
1227 leaf mac-addr {
1228 type yang:mac-address;
1229 description
1230 "A specific MAC address.";
1231 }
1232 }
1233 }
1234 }
1235 }
1236 }
3d2ab385
CS
1237 }
1238
1239 // End clear-evpn-dup-addr
fdd5c6e8
MS
1240
1241 rpc get-evpn-macs {
1242 description
1243 "Retrieve information about EVPN MAC addresses.";
1244 input {
1245 choice all-choice {
1246 default "all-vni";
fdd5c6e8
MS
1247 case all-vni {
1248 leaf all-vnis {
1249 type empty;
1250 description
1251 "Retrieve information for all VNIs.";
1252 }
3d2ab385 1253
fdd5c6e8
MS
1254 choice all-choices {
1255 case detail-case {
1256 leaf all-detail {
1257 type empty;
1258 description
1259 "Include detailed results.";
1260 }
1261 }
3d2ab385 1262
fdd5c6e8
MS
1263 case vtep-case {
1264 leaf all-vtep-addr {
1265 type inet:ipv4-address;
1266 description
1267 "A single VTEP address.";
1268 }
1269 }
3d2ab385 1270
fdd5c6e8
MS
1271 case dup-case {
1272 leaf all-dup {
1273 type empty;
1274 description
1275 "Show duplicate addresses.";
1276 }
1277 }
1278 }
1279 }
3d2ab385 1280
fdd5c6e8
MS
1281 case single-vni {
1282 leaf vni-id {
1283 type vni-id-type;
1284 description
1285 "Retrieve information for a single VNI.";
1286 }
3d2ab385 1287
fdd5c6e8
MS
1288 choice single-choices {
1289 case detail-case {
1290 leaf single-detail {
1291 type empty;
1292 description
1293 "Include detailed results.";
1294 }
1295 }
3d2ab385 1296
fdd5c6e8
MS
1297 case mac-case {
1298 leaf single-mac {
1299 type yang:mac-address;
1300 description
1301 "A specific MAC address.";
1302 }
1303 }
3d2ab385 1304
fdd5c6e8
MS
1305 case vtep-case {
1306 leaf single-vtep {
1307 type inet:ipv4-address;
1308 description
1309 "A single VTEP address.";
1310 }
1311 }
3d2ab385 1312
fdd5c6e8
MS
1313 case dup-case {
1314 leaf single-dup {
1315 type empty;
1316 description
1317 "Show duplicate addresses.";
1318 }
1319 }
1320 }
1321 }
1322 }
3d2ab385
CS
1323 }
1324 // End of input section
fdd5c6e8
MS
1325 output {
1326 list mac-list {
1327 leaf mac-addr {
1328 type yang:mac-address;
1329 description
1330 "The MAC address.";
1331 }
3d2ab385 1332
fdd5c6e8
MS
1333 leaf vni {
1334 type vni-id-type;
1335 description
1336 "The VNI value.";
1337 }
3d2ab385 1338
fdd5c6e8
MS
1339 leaf local-sequence {
1340 type uint32;
1341 description
1342 "Local sequence number.";
1343 }
3d2ab385 1344
fdd5c6e8
MS
1345 leaf remote-sequence {
1346 type uint32;
1347 description
1348 "Remote sequence number.";
1349 }
3d2ab385 1350
fdd5c6e8
MS
1351 leaf dad-count {
1352 type uint32;
1353 description
1354 "Duplicate detection counter.";
1355 }
3d2ab385 1356
fdd5c6e8
MS
1357 leaf is-duplicate {
1358 type empty;
1359 description
1360 "Duplicate MAC detected.";
1361 }
3d2ab385 1362
fdd5c6e8
MS
1363 leaf dup-detect-time {
1364 type unix-timestamp;
1365 description
1366 "If a duplicate, the detection time.";
1367 }
3d2ab385 1368
fdd5c6e8
MS
1369 container dup-detect-started {
1370 leaf dup-detect-start {
1371 type unix-timestamp;
1372 description
1373 "Duplicate detection process start time.";
1374 }
3d2ab385 1375
fdd5c6e8
MS
1376 leaf dup-count {
1377 type uint32;
1378 description
1379 "Duplicate detection count.";
1380 }
1381 }
1382
1383 leaf is-auto {
1384 type empty;
1385 description
1386 "This is an Auto MAC.";
1387 }
3d2ab385 1388
fdd5c6e8
MS
1389 leaf is-sticky {
1390 type empty;
1391 description
1392 "This is a sticky MAC.";
1393 }
3d2ab385 1394
fdd5c6e8
MS
1395 leaf is-default-gw {
1396 type empty;
1397 description
1398 "This is a default-gateway MAC.";
1399 }
3d2ab385 1400
fdd5c6e8
MS
1401 leaf is-remote-gw {
1402 type empty;
1403 description
1404 "This is a remote-gateway MAC.";
1405 }
3d2ab385 1406
fdd5c6e8
MS
1407 list neighbor-list {
1408 leaf neighbor-addr {
1409 type inet:ip-address;
1410 description
1411 "Neighbor address.";
1412 }
3d2ab385 1413
fdd5c6e8
MS
1414 leaf is-active {
1415 type empty;
1416 description
1417 "Neighbor is active.";
1418 }
1419 }
1420
1421 leaf mac-count {
1422 type uint32;
1423 description
1424 "Number of MACs (local and remote).";
1425 }
3d2ab385 1426
fdd5c6e8
MS
1427 choice local-rem-choice {
1428 case local-case {
1429 leaf intf {
1430 type frr-interface:interface-ref;
1431 description
1432 "The local interface name.";
1433 }
3d2ab385 1434
fdd5c6e8
MS
1435 leaf vlan {
1436 type uint32;
1437 description
1438 "A VLAN id.";
1439 }
1440 }
3d2ab385 1441
fdd5c6e8
MS
1442 case remote-case {
1443 leaf vtep-addr {
1444 type inet:ipv4-address;
1445 description
1446 "The remote VTEP IP address.";
1447 }
1448 }
1449 }
1450 }
1451 }
3d2ab385
CS
1452 }
1453
1454 // End get-evpn-macs
fdd5c6e8
MS
1455
1456 rpc get-evpn-arp-cache {
1457 description
1458 "Retrieve information about EVPN neighbor cache entries.";
1459 input {
1460 choice all-choice {
1461 default "all-vni";
fdd5c6e8
MS
1462 case all-vni {
1463 leaf all-vnis {
1464 type empty;
1465 description
1466 "Retrieve information for all VNIs.";
1467 }
3d2ab385 1468
fdd5c6e8
MS
1469 choice all-choices {
1470 case detail-case {
1471 leaf all-detail {
1472 type empty;
1473 description
1474 "Include detailed results.";
1475 }
1476 }
3d2ab385 1477
fdd5c6e8
MS
1478 case dup-case {
1479 leaf all-dup {
1480 type empty;
1481 description
1482 "Show duplicates.";
1483 }
1484 }
1485 }
1486 }
3d2ab385 1487
fdd5c6e8
MS
1488 case single-vni {
1489 leaf vni-id {
1490 type vni-id-type;
1491 description
1492 "Retrieve information for a single VNI.";
1493 }
3d2ab385 1494
fdd5c6e8
MS
1495 choice single-choices {
1496 case vtep-case {
1497 leaf single-vtep {
1498 type inet:ipv4-address;
1499 description
1500 "A single VTEP address.";
1501 }
1502 }
3d2ab385 1503
fdd5c6e8
MS
1504 case neighbor-case {
1505 leaf neighbor-addr {
1506 type inet:ip-address;
1507 description
1508 "A single neighbor address.";
1509 }
1510 }
3d2ab385 1511
fdd5c6e8
MS
1512 case dup-case {
1513 leaf single-dup {
1514 type empty;
1515 description
1516 "Show duplicates.";
1517 }
1518 }
1519 }
1520 }
1521 }
3d2ab385
CS
1522 }
1523 // End input section
fdd5c6e8
MS
1524 output {
1525 list vni-list {
1526 container vni-container {
1527 description
1528 "Information for one VNI.";
1529 leaf vni-id {
1530 type vni-id-type;
1531 description
1532 "The VNI id.";
1533 }
3d2ab385 1534
fdd5c6e8
MS
1535 list neigh-list {
1536 description
1537 "Information about a VNI's neighbor cache.";
fdd5c6e8
MS
1538 leaf mac-addr {
1539 type yang:mac-address;
1540 description
1541 "A neighbor MAC address.";
1542 }
3d2ab385 1543
fdd5c6e8
MS
1544 leaf ip-addr {
1545 type inet:ip-address;
1546 description
1547 "A neighbor IP address.";
1548 }
3d2ab385 1549
fdd5c6e8
MS
1550 leaf state-active {
1551 type empty;
1552 description
1553 "Indicates whether the entry is active.";
1554 }
1555
1556 choice local-remote-choice {
1557 case local-case {
1558 leaf is-local {
1559 type empty;
1560 description
1561 "The entry is local.";
1562 }
1563 }
3d2ab385 1564
fdd5c6e8
MS
1565 case remote-case {
1566 leaf is-remote {
1567 type empty;
1568 description
1569 "The entry is remote.";
1570 }
1571 }
1572 }
1573
1574 leaf is-dup {
1575 type empty;
1576 description
1577 "The entry is a detected duplicate.";
1578 }
3d2ab385 1579
fdd5c6e8
MS
1580 leaf is-default-gw {
1581 type empty;
1582 description
1583 "The entry is a default gateway.";
1584 }
3d2ab385 1585
fdd5c6e8
MS
1586 leaf is-router {
1587 type empty;
1588 description
1589 "The entry is a router.";
1590 }
3d2ab385 1591
fdd5c6e8
MS
1592 leaf local-sequence {
1593 type uint32;
1594 description
1595 "The local sequence number.";
1596 }
3d2ab385 1597
fdd5c6e8
MS
1598 leaf remote-sequence {
1599 type uint32;
1600 description
1601 "The remote sequence number.";
1602 }
3d2ab385 1603
fdd5c6e8
MS
1604 leaf remote-vtep {
1605 type inet:ipv4-address;
1606 description
1607 "The remote VTEP address.";
1608 }
1609 }
1610 }
1611 }
1612 }
3d2ab385
CS
1613 }
1614
1615 // End get-evpn-arp-cache
fdd5c6e8
MS
1616
1617 rpc get-pbr-ipset {
1618 input {
1619 leaf name {
1b9468cc
CS
1620 type string {
1621 length "1..32";
1622 }
fdd5c6e8
MS
1623 description
1624 "An optional specific IPset name.";
1625 }
1626 }
1627
1628 output {
1629 list ipset-list {
1630 leaf name {
1b9468cc
CS
1631 type string {
1632 length "1..32";
1633 }
fdd5c6e8
MS
1634 description
1635 "The IPset name.";
1636 }
3d2ab385 1637
fdd5c6e8
MS
1638 leaf ipset-type {
1639 type enumeration {
1640 enum "net-net" {
1641 value 1;
1642 description
1643 "";
1644 }
1645 enum "net-port-net" {
1646 value 2;
1647 description
1648 "";
1649 }
1650 enum "net-port" {
1651 value 3;
1652 description
1653 "";
1654 }
1655 enum "net" {
1656 value 4;
1657 description
1658 "";
1659 }
1660 }
1661 }
3d2ab385 1662
fdd5c6e8
MS
1663 leaf src-prefix {
1664 type inet:ip-prefix;
1665 description
1666 "";
1667 }
3d2ab385 1668
fdd5c6e8
MS
1669 leaf dest-prefix {
1670 type inet:ip-prefix;
1671 description
1672 "";
1673 }
3d2ab385 1674
fdd5c6e8
MS
1675 leaf src-port {
1676 type inet:port-number;
1677 description
1678 "";
1679 }
3d2ab385 1680
fdd5c6e8
MS
1681 leaf dest-port {
1682 type inet:port-number;
1683 description
1684 "";
1685 }
1686
1687 choice proto-choice {
1688 description
1689 "Filter UDP/TCP only, or a specific protocol number.";
1690 case udp-tcp-case {
1691 leaf is-udp-tcp {
1692 type empty;
1693 description
1694 "Filter TCP/UDP ports only.";
1695 }
1696 }
3d2ab385 1697
fdd5c6e8
MS
1698 case proto-case {
1699 leaf proto {
1700 type uint32;
1701 description
1702 "Filter a specific protocol number.";
1703 }
1704 }
1705 }
3d2ab385 1706
fdd5c6e8
MS
1707 container icmp-info {
1708 description
1709 "Additional information for ICMP filters.";
1710 leaf type-min {
1711 type uint8;
1712 description
1713 "";
1714 }
3d2ab385 1715
fdd5c6e8
MS
1716 leaf type-max {
1717 type uint8;
1718 description
1719 "";
1720 }
3d2ab385 1721
fdd5c6e8
MS
1722 leaf code-min {
1723 type uint8;
1724 description
1725 "";
1726 }
3d2ab385 1727
fdd5c6e8
MS
1728 leaf code-max {
1729 type uint8;
1730 description
1731 "";
1732 }
1733 }
3d2ab385 1734
fdd5c6e8
MS
1735 container ipset-stats {
1736 leaf is-unique {
1737 type empty;
1738 description
1739 "";
1740 }
3d2ab385 1741
fdd5c6e8
MS
1742 leaf packet-counter {
1743 type uint64;
1744 description
1745 "";
1746 }
3d2ab385 1747
fdd5c6e8
MS
1748 leaf bytes-counter {
1749 type uint64;
1750 description
1751 "";
1752 }
1753 }
1754 }
1755 }
3d2ab385
CS
1756 }
1757
1758 // End get-pbr-ipset
fdd5c6e8
MS
1759
1760 rpc get-pbr-iptable {
1761 input {
1762 leaf name {
1b9468cc
CS
1763 type string {
1764 length "1..32";
1765 }
fdd5c6e8
MS
1766 description
1767 "An optional single IPtable name.";
1768 }
1769 }
1770
1771 output {
1772 list iptable-list {
1773 leaf name {
1b9468cc
CS
1774 type string {
1775 length "1..32";
1776 }
fdd5c6e8
MS
1777 description
1778 "The IPtable name.";
1779 }
3d2ab385 1780
fdd5c6e8
MS
1781 leaf unique-val {
1782 type uint32;
1783 description
1784 "";
1785 }
3d2ab385 1786
fdd5c6e8 1787 choice action-choice {
3d2ab385
CS
1788 description
1789 "The table action.";
fdd5c6e8
MS
1790 case drop-case {
1791 leaf action-drop {
1792 type empty;
3d2ab385
CS
1793 description
1794 "";
fdd5c6e8
MS
1795 }
1796 }
3d2ab385 1797
fdd5c6e8
MS
1798 case redirect-case {
1799 leaf action-redirect {
1800 type empty;
3d2ab385
CS
1801 description
1802 "";
fdd5c6e8
MS
1803 }
1804 }
1805 }
3d2ab385 1806
fdd5c6e8
MS
1807 leaf min-packet {
1808 type uint32;
1809 description
1810 "";
1811 }
3d2ab385 1812
fdd5c6e8
MS
1813 leaf max-packet {
1814 type uint32;
1815 description
1816 "";
1817 }
3d2ab385 1818
fdd5c6e8
MS
1819 leaf lookup-src-port {
1820 type empty;
1821 description
1822 "";
1823 }
3d2ab385 1824
fdd5c6e8
MS
1825 leaf lookup-dst-port {
1826 type empty;
1827 description
1828 "";
1829 }
3d2ab385 1830
fdd5c6e8
MS
1831 leaf tcp-flags {
1832 type uint16;
1833 description
1834 "";
1835 }
3d2ab385 1836
fdd5c6e8
MS
1837 leaf tcp-flags-mask {
1838 type uint16;
1839 description
1840 "";
1841 }
3d2ab385 1842
fdd5c6e8
MS
1843 leaf protocol-val {
1844 type uint32;
3d2ab385
CS
1845 description
1846 "An IP protocol number.";
fdd5c6e8 1847 }
3d2ab385 1848
fdd5c6e8
MS
1849 container dscp-info {
1850 leaf dscp-value {
1851 type uint32;
1852 description
1853 "A DSCP value to match.";
1854 }
3d2ab385 1855
fdd5c6e8
MS
1856 leaf invert-match {
1857 type empty;
1858 description
1859 "If set, exclude the specified value";
1860 }
1861 }
3d2ab385 1862
fdd5c6e8
MS
1863 container fragment-info {
1864 leaf fragment-val {
1865 type uint32;
3d2ab385
CS
1866 description
1867 "An IP fragment value.";
fdd5c6e8 1868 }
3d2ab385 1869
fdd5c6e8
MS
1870 leaf invert-match {
1871 type empty;
1872 description
1873 "If set, exclude the specified value.";
1874 }
1875 }
3d2ab385 1876
fdd5c6e8
MS
1877 container iptable-stats {
1878 leaf packet-counter {
1879 type uint64;
1880 description
1881 "";
1882 }
3d2ab385 1883
fdd5c6e8
MS
1884 leaf bytes-counter {
1885 type uint64;
1886 description
1887 "";
1888 }
1889 }
3d2ab385 1890
fdd5c6e8
MS
1891 container rule-info {
1892 description
1893 "Information about a rule, for redirect tables.";
1894 leaf table-id {
1895 type uint32;
1896 description
1897 "The rule table id.";
1898 }
3d2ab385 1899
fdd5c6e8
MS
1900 leaf table-fwmark {
1901 type uint32;
1902 description
1903 "The firewall mark for the rule.";
1904 }
1905 }
1906 }
1907 }
3d2ab385 1908 }
fdd5c6e8 1909
3d2ab385 1910 // End get-pbr-iptable
fdd5c6e8
MS
1911 /*
1912 * Handy 'all-at-once' api to retrieve debugs
1913 */
3d2ab385 1914
fdd5c6e8
MS
1915 rpc get-debugs {
1916 output {
1917 uses zebra-debugs;
1918 }
3d2ab385
CS
1919 }
1920
1921 // End get-debugs
fdd5c6e8
MS
1922
1923 augment "/frr-interface:lib/frr-interface:interface" {
1924 description
1925 "Extends interface model with Zebra-related parameters.";
1926 container zebra {
93a6af75
CS
1927 list ip-addrs {
1928 key "address-family ip-prefix";
fdd5c6e8 1929 description
93a6af75
CS
1930 "IP prefixes for an interface.";
1931 uses frr-rt:address-family {
fdd5c6e8 1932 description
93a6af75 1933 "Address family of the RIB.";
fdd5c6e8 1934 }
93a6af75
CS
1935
1936 leaf ip-prefix {
1937 type inet:ip-prefix;
fdd5c6e8 1938 description
93a6af75 1939 "IP address prefix.";
fdd5c6e8 1940 }
93a6af75 1941
fdd5c6e8
MS
1942 leaf label {
1943 type string;
1944 description
1945 "Optional string label for the address.";
1946 }
93a6af75
CS
1947
1948 leaf ip4-peer {
1949 when "derived-from-or-self(../address-family, 'ipv4')";
1950 type inet:ipv4-prefix;
fdd5c6e8 1951 description
93a6af75 1952 "Peer prefix, for peer-to-peer interfaces.";
fdd5c6e8
MS
1953 }
1954 }
1955
1956 leaf multicast {
1957 type boolean;
1958 description
1959 "Multicast flag for the interface.";
1960 }
93a6af75 1961
fdd5c6e8
MS
1962 leaf link-detect {
1963 type boolean;
1964 description
1965 "Link-detection for the interface.";
1966 }
93a6af75 1967
fdd5c6e8
MS
1968 leaf shutdown {
1969 type boolean;
1970 description
1971 "Interface admin status.";
1972 }
93a6af75 1973
fdd5c6e8
MS
1974 leaf bandwidth {
1975 type uint32 {
1976 range "1..100000";
1977 }
1978 description
1979 "Link bandwidth informational parameter, in megabits.";
1980 }
fdd5c6e8 1981 // TODO -- link-params for (experimental/partial TE use in IGP extensions)
93a6af75
CS
1982 container state {
1983 config false;
1984 description
1985 "Operational data.";
1986 leaf up-count {
1987 type uint16;
1988 description
1989 "Interface Up count.";
1990 }
1991
1992 leaf down-count {
1993 type uint16;
1994 description
1995 "Interface Down count.";
1996 }
1997
1998 leaf zif-type {
1999 type identityref {
2000 base zebra-interface-type;
2001 }
2002 description
2003 "zebra interface type.";
2004 }
2005
2006 leaf ptm-status {
2007 type string;
2008 default "disabled";
2009 description
2010 "Interface PTM status.";
2011 }
2012
2013 leaf vlan-id {
2014 type uint16 {
2015 range "1..4094";
2016 }
2017 description
2018 "A VLAN id.";
2019 }
2020
2021 leaf vni-id {
2022 type vni-id-type;
2023 }
2024
2025 leaf remote-vtep {
2026 type inet:ipv4-address;
2027 description
2028 "The remote VTEP IP address.";
2029 }
2030
2031 leaf mcast-group {
2032 type rt-types:ipv4-multicast-group-address;
2033 description
2034 "The VNI multicast group for BUM traffic.";
2035 }
2036 }
3d2ab385
CS
2037 }
2038 }
2039
4218384d
CS
2040 augment "/frr-vrf:lib/frr-vrf:vrf" {
2041 description
2042 "Extends VRF model with Zebra-related parameters.";
56a88b9e
CS
2043 container zebra {
2044 uses ribs;
2045 }
4218384d
CS
2046 }
2047
9670b0b3 2048 augment "/frr-vrf:lib/frr-vrf:vrf/frr-zebra:zebra/ribs/rib/route/route-entry/nexthop-group/nexthop" {
4218384d
CS
2049 uses frr-nh:frr-nexthop-operational;
2050 }
2051
3d2ab385
CS
2052 /*
2053 * Main zebra container
2054 */
fdd5c6e8 2055
3d2ab385
CS
2056 container zebra {
2057 description
2058 "Data model for the Zebra daemon.";
2059 leaf mcast-rpf-lookup {
2060 type frr-zebra:mcast-rpf-lookup-mode;
2061 default "mrib-then-urib";
2062 description
2063 "Multicast RPF lookup behavior.";
2064 }
2065 leaf ip-forwarding {
2066 type boolean;
2067 description
2068 "IP forwarding status.";
2069 }
2070 leaf ipv6-forwarding {
2071 type enumeration {
2072 enum unknown {
2073 value -1;
2074 description
2075 "Unknown state.";
2076 }
2077 enum off {
2078 value 0;
2079 description
2080 "IPv6 forwarding disabled.";
2081 }
2082 enum on {
2083 value 1;
2084 description
2085 "IPv6 forwarding enabled.";
2086 }
2087 }
2088 description
2089 "IPv6 forwarding status.";
2090 }
2091 leaf workqueue-hold-timer {
2092 type uint32 {
2093 range "0..10000";
2094 }
2095 units "milliseconds";
2096 default "10";
2097 description
2098 "Work-queue processing hold timer, in milliseconds.";
2099 }
2100 leaf zapi-packets {
2101 type uint32 {
2102 range "1..10000";
2103 }
2104 default "1000";
2105 description
2106 "Number of ZAPI packets to process before relinquishing
2107 the main thread.";
2108 }
2109 container import-kernel-table {
2110 description
2111 "Parameters to use when importing IPv4 routes from a non-main kernel
2112 routing table.";
2113 leaf table-id {
2114 type uint32 {
2115 range "1..252";
2116 }
2117 description
2118 "The kernel table id.";
2119 }
2120 leaf distance {
2121 type uint32 {
2122 range "1..255";
2123 }
2124 default "15";
2125 description
2126 "The admin distance to use for imported routes.";
2127 }
2128 leaf route-map {
2129 type string;
2130 description
2131 "A route-map to filter imported routes.";
2132 }
2133 }
2134 leaf allow-external-route-update {
2135 type empty;
2136 description
2137 "Allow FRR-controlled routes to be overwritten by external processes";
2138 }
2139 leaf dplane-queue-limit {
2140 type uint32 {
2141 range "0..10000";
2142 }
2143 default "200";
2144 description
2145 "Limit on the number of updates queued to the dataplane subsystem.";
2146 }
2147 list vrf-vni-mapping {
2148 key "vrf-id";
2149 description
2150 "EVPN VNI mapping corresponding to a VRF.";
2151 leaf vrf-id {
2152 type uint32;
2153 description
2154 "The identifier for a VRF.";
2155 }
2156 leaf vni-id {
2157 type vni-id-type;
2158 description
2159 "The VNI id to map to the VRF.";
2160 }
2161 leaf prefix-only {
2162 type empty;
2163 description
2164 "Prefix routes only.";
2165 }
2166 }
2167 /*
2168 * Debug options
2169 */
2170 container debugs {
2171 uses zebra-debugs;
2172 }
2173 /* End of debugs */
2174 /*
2175 * End of configuration attributes
2176 */
2177 /*
2178 * Operational data.
2179 */
2180 container state {
2181 config false;
2182 description
2183 "Operational data.";
fdd5c6e8 2184 }
3d2ab385
CS
2185 // End of operational / state container
2186 }
fdd5c6e8 2187
3d2ab385 2188 // End interface model augmentation
bc77245f
RZ
2189
2190 augment "/frr-route-map:lib"
2191 + "/frr-route-map:route-map"
2192 + "/frr-route-map:entry"
2193 + "/frr-route-map:match-condition"
2194 + "/frr-route-map:condition-value" {
2195 case ipv4-prefix-length {
2196 when "./condition = 'ipv4-prefix-length' or
2197 ./condition = 'ipv4-next-hop-prefix-length'";
2198 leaf ipv4-prefix-length {
2199 type uint8 {
2200 range "0..32";
2201 }
2202 }
2203 }
2204 case ipv6-prefix-length {
2205 when "./condition = 'ipv6-prefix-length'";
2206 leaf ipv6-prefix-length {
2207 type uint8 {
2208 range "0..128";
2209 }
2210 }
2211 }
2212 case source-protocol {
2213 when "./condition = 'source-protocol'";
2214 leaf source-protocol {
2215 type frr-route-types:frr-route-types;
2216 }
2217 }
2218 case source-instance {
2219 when "./condition = 'source-instance'";
2220 leaf source-instance {
2221 type uint8 {
2222 range "0..255";
2223 }
2224 }
2225 }
2226 }
2227
2228 augment "/frr-route-map:lib"
2229 + "/frr-route-map:route-map"
2230 + "/frr-route-map:entry"
2231 + "/frr-route-map:set-action"
2232 + "/frr-route-map:action-value" {
2233 case source-v4 {
2234 when "./action = 'source'";
2235 leaf source-v4 {
2236 description "IPv4 address";
2237 type inet:ipv4-address;
2238 }
2239 }
2240 case source-v6 {
2241 when "./action = 'source'";
2242 leaf source-v6 {
2243 description "IPv6 address";
2244 type inet:ipv6-address;
2245 }
2246 }
2247 }
fdd5c6e8 2248}