Coverage Report

Created: 2025-08-26 06:20

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