/src/frr/yang/frr-route-map.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  |  |   "// SPDX-License-Identifier: BSD-2-Clause\n"  | 
8  |  |   "module frr-route-map {\n" | 
9  |  |   "  yang-version 1.1;\n"  | 
10  |  |   "  namespace \"http://frrouting.org/yang/route-map\";\n"  | 
11  |  |   "  prefix frr-route-map;\n"  | 
12  |  |   "\n"  | 
13  |  |   "  import ietf-inet-types {\n" | 
14  |  |   "    prefix inet;\n"  | 
15  |  |   "  }\n"  | 
16  |  |   "\n"  | 
17  |  |   "  import frr-filter {\n" | 
18  |  |   "    prefix filter;\n"  | 
19  |  |   "  }\n"  | 
20  |  |   "\n"  | 
21  |  |   "  import frr-interface {\n" | 
22  |  |   "    prefix frr-interface;\n"  | 
23  |  |   "  }\n"  | 
24  |  |   "\n"  | 
25  |  |   "  organization\n"  | 
26  |  |   "    \"FRRouting\";\n"  | 
27  |  |   "  contact\n"  | 
28  |  |   "    \"FRR Users List:       <mailto:frog@lists.frrouting.org>\n"  | 
29  |  |   "     FRR Development List: <mailto:dev@lists.frrouting.org>\";\n"  | 
30  |  |   "  description\n"  | 
31  |  |   "    \"This module defines route map settings\n"  | 
32  |  |   "\n"  | 
33  |  |   "     Copyright 2020 FRRouting\n"  | 
34  |  |   "\n"  | 
35  |  |   "     Redistribution and use in source and binary forms, with or without\n"  | 
36  |  |   "     modification, are permitted provided that the following conditions\n"  | 
37  |  |   "     are met:\n"  | 
38  |  |   "\n"  | 
39  |  |   "     1. Redistributions of source code must retain the above copyright notice,\n"  | 
40  |  |   "     this list of conditions and the following disclaimer.\n"  | 
41  |  |   "\n"  | 
42  |  |   "     2. Redistributions in binary form must reproduce the above copyright\n"  | 
43  |  |   "     notice, this list of conditions and the following disclaimer in the\n"  | 
44  |  |   "     documentation and/or other materials provided with the distribution.\n"  | 
45  |  |   "\n"  | 
46  |  |   "     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"  | 
47  |  |   "     \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"  | 
48  |  |   "     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"  | 
49  |  |   "     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"  | 
50  |  |   "     HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n"  | 
51  |  |   "     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n"  | 
52  |  |   "     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n"  | 
53  |  |   "     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n"  | 
54  |  |   "     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"  | 
55  |  |   "     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"  | 
56  |  |   "     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\";\n"  | 
57  |  |   "\n"  | 
58  |  |   "  revision 2019-07-01 {\n" | 
59  |  |   "    description\n"  | 
60  |  |   "      \"Initial revision\";\n"  | 
61  |  |   "  }\n"  | 
62  |  |   "\n"  | 
63  |  |   "  identity rmap-match-type {\n" | 
64  |  |   "    description\n"  | 
65  |  |   "      \"Base route-map match-condition\";\n"  | 
66  |  |   "  }\n"  | 
67  |  |   "\n"  | 
68  |  |   "  identity interface {\n" | 
69  |  |   "    base rmap-match-type;\n"  | 
70  |  |   "    description\n"  | 
71  |  |   "      \"Match interface\";\n"  | 
72  |  |   "  }\n"  | 
73  |  |   "\n"  | 
74  |  |   "  identity ipv4-address-list {\n" | 
75  |  |   "    base rmap-match-type;\n"  | 
76  |  |   "    description\n"  | 
77  |  |   "      \"Match an IPv4 access-list\";\n"  | 
78  |  |   "  }\n"  | 
79  |  |   "\n"  | 
80  |  |   "  identity ipv4-prefix-list {\n" | 
81  |  |   "    base rmap-match-type;\n"  | 
82  |  |   "    description\n"  | 
83  |  |   "      \"Match an IPv4 prefix-list\";\n"  | 
84  |  |   "  }\n"  | 
85  |  |   "\n"  | 
86  |  |   "  identity ipv4-next-hop-list {\n" | 
87  |  |   "    base rmap-match-type;\n"  | 
88  |  |   "    description\n"  | 
89  |  |   "      \"Match an IPv4 next-hop\";\n"  | 
90  |  |   "  }\n"  | 
91  |  |   "\n"  | 
92  |  |   "  identity ipv4-next-hop-prefix-list {\n" | 
93  |  |   "    base rmap-match-type;\n"  | 
94  |  |   "    description\n"  | 
95  |  |   "      \"Match an IPv4 next-hop prefix list\";\n"  | 
96  |  |   "  }\n"  | 
97  |  |   "\n"  | 
98  |  |   "  identity ipv4-next-hop-type {\n" | 
99  |  |   "    base rmap-match-type;\n"  | 
100  |  |   "    description\n"  | 
101  |  |   "      \"Match an IPv4 next-hop type\";\n"  | 
102  |  |   "  }\n"  | 
103  |  |   "\n"  | 
104  |  |   "  identity ipv6-address-list {\n" | 
105  |  |   "    base rmap-match-type;\n"  | 
106  |  |   "    description\n"  | 
107  |  |   "      \"Match an IPv6 access-list\";\n"  | 
108  |  |   "  }\n"  | 
109  |  |   "\n"  | 
110  |  |   "  identity ipv6-prefix-list {\n" | 
111  |  |   "    base rmap-match-type;\n"  | 
112  |  |   "    description\n"  | 
113  |  |   "      \"Match an IPv6 prefix-list\";\n"  | 
114  |  |   "  }\n"  | 
115  |  |   "\n"  | 
116  |  |   "  identity ipv6-next-hop-list {\n" | 
117  |  |   "    base rmap-match-type;\n"  | 
118  |  |   "    description\n"  | 
119  |  |   "      \"Match an IPv6 next-hop\";\n"  | 
120  |  |   "  }\n"  | 
121  |  |   "\n"  | 
122  |  |   "  identity ipv6-next-hop-prefix-list {\n" | 
123  |  |   "    base rmap-match-type;\n"  | 
124  |  |   "    description\n"  | 
125  |  |   "      \"Match an IPv6 next-hop prefix list\";\n"  | 
126  |  |   "  }\n"  | 
127  |  |   "\n"  | 
128  |  |   "  identity ipv6-next-hop-type {\n" | 
129  |  |   "    base rmap-match-type;\n"  | 
130  |  |   "    description\n"  | 
131  |  |   "      \"Match an IPv6 next-hop type\";\n"  | 
132  |  |   "  }\n"  | 
133  |  |   "\n"  | 
134  |  |   "  identity match-metric {\n" | 
135  |  |   "    base rmap-match-type;\n"  | 
136  |  |   "    description\n"  | 
137  |  |   "      \"Match a route metric\";\n"  | 
138  |  |   "  }\n"  | 
139  |  |   "\n"  | 
140  |  |   "  identity match-tag {\n" | 
141  |  |   "    base rmap-match-type;\n"  | 
142  |  |   "    description\n"  | 
143  |  |   "      \"Match a route tag\";\n"  | 
144  |  |   "  }\n"  | 
145  |  |   "\n"  | 
146  |  |   "  identity rmap-set-type {\n" | 
147  |  |   "    description\n"  | 
148  |  |   "      \"Base route-map set-action\";\n"  | 
149  |  |   "  }\n"  | 
150  |  |   "\n"  | 
151  |  |   "  identity ipv4-next-hop {\n" | 
152  |  |   "    base rmap-set-type;\n"  | 
153  |  |   "    description\n"  | 
154  |  |   "      \"Set IPv4 address of the next hop\";\n"  | 
155  |  |   "  }\n"  | 
156  |  |   "\n"  | 
157  |  |   "  identity ipv6-next-hop {\n" | 
158  |  |   "    base rmap-set-type;\n"  | 
159  |  |   "    description\n"  | 
160  |  |   "      \"Set IPv6 address of the next hop\";\n"  | 
161  |  |   "  }\n"  | 
162  |  |   "\n"  | 
163  |  |   "  identity set-metric {\n" | 
164  |  |   "    base rmap-set-type;\n"  | 
165  |  |   "    description\n"  | 
166  |  |   "      \"Set prefix/route metric\";\n"  | 
167  |  |   "  }\n"  | 
168  |  |   "\n"  | 
169  |  |   "  identity set-min-metric {\n" | 
170  |  |   "    base rmap-set-type;\n"  | 
171  |  |   "    description\n"  | 
172  |  |   "      \"Set minimum prefix/route metric\";\n"  | 
173  |  |   "  }\n"  | 
174  |  |   "\n"  | 
175  |  |   "    identity set-max-metric {\n" | 
176  |  |   "    base rmap-set-type;\n"  | 
177  |  |   "    description\n"  | 
178  |  |   "      \"Set maximum prefix/route metric\";\n"  | 
179  |  |   "  }\n"  | 
180  |  |   "\n"  | 
181  |  |   "  identity set-tag {\n" | 
182  |  |   "    base rmap-set-type;\n"  | 
183  |  |   "    description\n"  | 
184  |  |   "      \"Set tag\";\n"  | 
185  |  |   "  }\n"  | 
186  |  |   "\n"  | 
187  |  |   "  identity set-sr-te-color {\n" | 
188  |  |   "    base rmap-set-type;\n"  | 
189  |  |   "    description\n"  | 
190  |  |   "      \"Set Color of the SR-TE\";\n"  | 
191  |  |   "  }\n"  | 
192  |  |   "\n"  | 
193  |  |   "  typedef route-map-sequence {\n" | 
194  |  |   "    type uint16 {\n" | 
195  |  |   "      range \"1..65535\";\n"  | 
196  |  |   "    }\n"  | 
197  |  |   "    description\n"  | 
198  |  |   "      \"Route map valid sequence numbers\";\n"  | 
199  |  |   "  }\n"  | 
200  |  |   "\n"  | 
201  |  |   "  typedef route-map-name {\n" | 
202  |  |   "    type string;\n"  | 
203  |  |   "    description\n"  | 
204  |  |   "      \"Route map name format\";\n"  | 
205  |  |   "  }\n"  | 
206  |  |   "\n"  | 
207  |  |   "  typedef route-map-ref {\n" | 
208  |  |   "    type leafref {\n" | 
209  |  |   "      path \"/frr-route-map:lib/frr-route-map:route-map/frr-route-map:name\";\n"  | 
210  |  |   "      require-instance false;\n"  | 
211  |  |   "    }\n"  | 
212  |  |   "    description\n"  | 
213  |  |   "      \"Reference to a route-map.\";\n"  | 
214  |  |   "  }\n"  | 
215  |  |   "\n"  | 
216  |  |   "  grouping rmap-match-condition {\n" | 
217  |  |   "    container rmap-match-condition {\n" | 
218  |  |   "      choice match-condition {\n" | 
219  |  |   "        description\n"  | 
220  |  |   "          \"Value to match (interpretation depends on condition type)\";\n"  | 
221  |  |   "        case interface {\n" | 
222  |  |   "          when \"derived-from-or-self(../condition, \'interface\')\";\n"  | 
223  |  |   "          leaf interface {\n" | 
224  |  |   "            type frr-interface:interface-ref;\n"  | 
225  |  |   "          }\n"  | 
226  |  |   "        }\n"  | 
227  |  |   "\n"  | 
228  |  |   "        case list-name {\n" | 
229  |  |   "          when \"derived-from-or-self(../condition, \'ipv4-address-list\') or \"\n"  | 
230  |  |   "             + \"derived-from-or-self(../condition, \'ipv4-prefix-list\') or \"\n"  | 
231  |  |   "             + \"derived-from-or-self(../condition, \'ipv4-next-hop-list\') or \"\n"  | 
232  |  |   "             + \"derived-from-or-self(../condition, \'ipv4-next-hop-prefix-list\') or \"\n"  | 
233  |  |   "             + \"derived-from-or-self(../condition, \'ipv6-address-list\') or \"\n"  | 
234  |  |   "             + \"derived-from-or-self(../condition, \'ipv6-next-hop-list\') or \"\n"  | 
235  |  |   "             + \"derived-from-or-self(../condition, \'ipv6-next-hop-prefix-list\') or \"\n"  | 
236  |  |   "             + \"derived-from-or-self(../condition, \'ipv6-prefix-list\')\";\n"  | 
237  |  |   "          leaf list-name {\n" | 
238  |  |   "            type filter:access-list-name;\n"  | 
239  |  |   "          }\n"  | 
240  |  |   "        }\n"  | 
241  |  |   "\n"  | 
242  |  |   "        case ipv4-next-hop-type {\n" | 
243  |  |   "          when \"derived-from-or-self(../condition, \'ipv4-next-hop-type\')\";\n"  | 
244  |  |   "          leaf ipv4-next-hop-type {\n" | 
245  |  |   "            type enumeration {\n" | 
246  |  |   "              enum \"blackhole\" {\n" | 
247  |  |   "                value 0;\n"  | 
248  |  |   "              }\n"  | 
249  |  |   "            }\n"  | 
250  |  |   "          }\n"  | 
251  |  |   "        }\n"  | 
252  |  |   "\n"  | 
253  |  |   "        case ipv6-next-hop-type {\n" | 
254  |  |   "          when \"derived-from-or-self(../condition, \'ipv6-next-hop-type\')\";\n"  | 
255  |  |   "          leaf ipv6-next-hop-type {\n" | 
256  |  |   "            type enumeration {\n" | 
257  |  |   "              enum \"blackhole\" {\n" | 
258  |  |   "                value 0;\n"  | 
259  |  |   "              }\n"  | 
260  |  |   "            }\n"  | 
261  |  |   "          }\n"  | 
262  |  |   "        }\n"  | 
263  |  |   "\n"  | 
264  |  |   "        case match-metric {\n" | 
265  |  |   "          when \"derived-from-or-self(../condition, \'match-metric\')\";\n"  | 
266  |  |   "          leaf metric {\n" | 
267  |  |   "            type uint32 {\n" | 
268  |  |   "              range \"1..4294967295\";\n"  | 
269  |  |   "            }\n"  | 
270  |  |   "          }\n"  | 
271  |  |   "        }\n"  | 
272  |  |   "\n"  | 
273  |  |   "        case match-tag {\n" | 
274  |  |   "          when \"derived-from-or-self(../condition, \'match-tag\')\";\n"  | 
275  |  |   "          leaf tag {\n" | 
276  |  |   "            type uint32 {\n" | 
277  |  |   "              range \"1..4294967295\";\n"  | 
278  |  |   "            }\n"  | 
279  |  |   "          }\n"  | 
280  |  |   "        }\n"  | 
281  |  |   "      }\n"  | 
282  |  |   "    }\n"  | 
283  |  |   "  }\n"  | 
284  |  |   "\n"  | 
285  |  |   "  grouping rmap-set-action {\n" | 
286  |  |   "    container rmap-set-action {\n" | 
287  |  |   "      choice set-action {\n" | 
288  |  |   "        description\n"  | 
289  |  |   "          \"Value to set (interpretation depends on action-type)\";\n"  | 
290  |  |   "        case ipv4-address {\n" | 
291  |  |   "          when \"derived-from-or-self(../action, \'ipv4-next-hop\')\";\n"  | 
292  |  |   "          leaf ipv4-address {\n" | 
293  |  |   "            type inet:ipv4-address;\n"  | 
294  |  |   "            description\n"  | 
295  |  |   "              \"IPv4 address\";\n"  | 
296  |  |   "          }\n"  | 
297  |  |   "        }\n"  | 
298  |  |   "\n"  | 
299  |  |   "        case ipv6-address {\n" | 
300  |  |   "          when \"derived-from-or-self(../action, \'ipv6-next-hop\')\";\n"  | 
301  |  |   "          leaf ipv6-address {\n" | 
302  |  |   "            type inet:ipv6-address;\n"  | 
303  |  |   "            description\n"  | 
304  |  |   "              \"IPv6 address\";\n"  | 
305  |  |   "          }\n"  | 
306  |  |   "        }\n"  | 
307  |  |   "\n"  | 
308  |  |   "        case set-metric {\n" | 
309  |  |   "          when \"derived-from-or-self(../action, \'set-metric\')\";\n"  | 
310  |  |   "          choice metric-value {\n" | 
311  |  |   "            description\n"  | 
312  |  |   "              \"Metric to set or use\";\n"  | 
313  |  |   "            case value {\n" | 
314  |  |   "              leaf value {\n" | 
315  |  |   "                type uint32 {\n" | 
316  |  |   "                  range \"0..4294967295\";\n"  | 
317  |  |   "                }\n"  | 
318  |  |   "                description\n"  | 
319  |  |   "                  \"Use the following metric value\";\n"  | 
320  |  |   "              }\n"  | 
321  |  |   "            }\n"  | 
322  |  |   "\n"  | 
323  |  |   "            case add-metric {\n" | 
324  |  |   "              leaf add-metric {\n" | 
325  |  |   "                description \"Add value to metric.\";\n"  | 
326  |  |   "                type uint32 {\n" | 
327  |  |   "                  range \"0..4294967295\";\n"  | 
328  |  |   "                }\n"  | 
329  |  |   "              }\n"  | 
330  |  |   "            }\n"  | 
331  |  |   "\n"  | 
332  |  |   "            case subtract-metric {\n" | 
333  |  |   "              leaf subtract-metric {\n" | 
334  |  |   "                description \"Subtract value from metric.\";\n"  | 
335  |  |   "                type uint32 {\n" | 
336  |  |   "                  range \"0..4294967295\";\n"  | 
337  |  |   "                }\n"  | 
338  |  |   "              }\n"  | 
339  |  |   "            }\n"  | 
340  |  |   "\n"  | 
341  |  |   "            case use-round-trip-time {\n" | 
342  |  |   "              leaf use-round-trip-time {\n" | 
343  |  |   "                type boolean;\n"  | 
344  |  |   "                description\n"  | 
345  |  |   "                  \"Use the round trip time as metric\";\n"  | 
346  |  |   "              }\n"  | 
347  |  |   "            }\n"  | 
348  |  |   "\n"  | 
349  |  |   "            case add-round-trip-time {\n" | 
350  |  |   "              leaf add-round-trip-time {\n" | 
351  |  |   "                type boolean;\n"  | 
352  |  |   "                description\n"  | 
353  |  |   "                  \"Add round trip time to metric\";\n"  | 
354  |  |   "              }\n"  | 
355  |  |   "            }\n"  | 
356  |  |   "\n"  | 
357  |  |   "            case subtract-round-trip-time {\n" | 
358  |  |   "              leaf subtract-round-trip-time {\n" | 
359  |  |   "                type boolean;\n"  | 
360  |  |   "                description\n"  | 
361  |  |   "                  \"Subtract round trip time to metric\";\n"  | 
362  |  |   "              }\n"  | 
363  |  |   "            }\n"  | 
364  |  |   "          }\n"  | 
365  |  |   "        }\n"  | 
366  |  |   "\n"  | 
367  |  |   "        case set-min-metric {\n" | 
368  |  |   "          when \"derived-from-or-self(../action, \'set-min-metric\')\";\n"  | 
369  |  |   "          choice minimun-metric-value {\n" | 
370  |  |   "            description\n"  | 
371  |  |   "              \"Mimimum metric to set or use\";\n"  | 
372  |  |   "            case min-metric {\n" | 
373  |  |   "              leaf min-metric {\n" | 
374  |  |   "                type uint32 {\n" | 
375  |  |   "                  range \"0..4294967295\";\n"  | 
376  |  |   "                }\n"  | 
377  |  |   "                description\n"  | 
378  |  |   "                  \"Use the following mimumn metric value\";\n"  | 
379  |  |   "              }\n"  | 
380  |  |   "            }\n"  | 
381  |  |   "          }\n"  | 
382  |  |   "        }\n"  | 
383  |  |   "\n"  | 
384  |  |   "        case set-max-metric {\n" | 
385  |  |   "          when \"derived-from-or-self(../action, \'set-max-metric\')\";\n"  | 
386  |  |   "          choice maximum-metric-value {\n" | 
387  |  |   "            description\n"  | 
388  |  |   "              \"Maximum metric to set or use\";\n"  | 
389  |  |   "            case max-metric {\n" | 
390  |  |   "              leaf max-metric {\n" | 
391  |  |   "                type uint32 {\n" | 
392  |  |   "                  range \"0..4294967295\";\n"  | 
393  |  |   "                }\n"  | 
394  |  |   "                description\n"  | 
395  |  |   "                  \"Use the following maximum metric value\";\n"  | 
396  |  |   "              }\n"  | 
397  |  |   "            }\n"  | 
398  |  |   "          }\n"  | 
399  |  |   "        }\n"  | 
400  |  |   "        case set-tag {\n" | 
401  |  |   "          when \"derived-from-or-self(../action, \'set-tag\')\";\n"  | 
402  |  |   "          leaf tag {\n" | 
403  |  |   "            type uint32 {\n" | 
404  |  |   "              range \"0..4294967295\";\n"  | 
405  |  |   "            }\n"  | 
406  |  |   "            description\n"  | 
407  |  |   "              \"Tag value\";\n"  | 
408  |  |   "          }\n"  | 
409  |  |   "        }\n"  | 
410  |  |   "\n"  | 
411  |  |   "        case set-sr-te-color {\n" | 
412  |  |   "          when \"derived-from-or-self(../action, \'set-sr-te-color\')\";\n"  | 
413  |  |   "          leaf policy {\n" | 
414  |  |   "            type string;\n"  | 
415  |  |   "            description\n"  | 
416  |  |   "              \"Color of the SR-TE Policies to match with\";\n"  | 
417  |  |   "          }\n"  | 
418  |  |   "        }\n"  | 
419  |  |   "      }\n"  | 
420  |  |   "    }\n"  | 
421  |  |   "  }\n"  | 
422  |  |   "\n"  | 
423  |  |   "  container lib {\n" | 
424  |  |   "    list route-map {\n" | 
425  |  |   "      key \"name\";\n"  | 
426  |  |   "      description\n"  | 
427  |  |   "        \"Route map instance\";\n"  | 
428  |  |   "      leaf name {\n" | 
429  |  |   "        type route-map-name;\n"  | 
430  |  |   "        description\n"  | 
431  |  |   "          \"Route map instance name\";\n"  | 
432  |  |   "      }\n"  | 
433  |  |   "      leaf optimization-disabled {\n" | 
434  |  |   "        type boolean;\n"  | 
435  |  |   "        default false;\n"  | 
436  |  |   "        description \"Disables or enables the optimization\";\n"  | 
437  |  |   "      }\n"  | 
438  |  |   "\n"  | 
439  |  |   "      list entry {\n" | 
440  |  |   "        key \"sequence\";\n"  | 
441  |  |   "        description\n"  | 
442  |  |   "          \"Route map entry\";\n"  | 
443  |  |   "        leaf sequence {\n" | 
444  |  |   "          type route-map-sequence;\n"  | 
445  |  |   "          description\n"  | 
446  |  |   "            \"Route map instance priority (low number means higher priority)\";\n"  | 
447  |  |   "        }\n"  | 
448  |  |   "\n"  | 
449  |  |   "        leaf description {\n" | 
450  |  |   "          type string;\n"  | 
451  |  |   "          description\n"  | 
452  |  |   "            \"Route map description\";\n"  | 
453  |  |   "        }\n"  | 
454  |  |   "\n"  | 
455  |  |   "        leaf action {\n" | 
456  |  |   "          type enumeration {\n" | 
457  |  |   "            enum \"permit\" {\n" | 
458  |  |   "              value 0;\n"  | 
459  |  |   "              description\n"  | 
460  |  |   "                \"Executes configured action and permits the prefix/route\n"  | 
461  |  |   "                 if the conditions matched. An alternative exit action can\n"  | 
462  |  |   "                 be configured to continue processing the route map list\n"  | 
463  |  |   "                 or jump to process another route map.\";\n"  | 
464  |  |   "            }\n"  | 
465  |  |   "            enum \"deny\" {\n" | 
466  |  |   "              value 1;\n"  | 
467  |  |   "              description\n"  | 
468  |  |   "                \"If all conditions are met the prefix/route is denied and\n"  | 
469  |  |   "                 route map processing stops.\";\n"  | 
470  |  |   "            }\n"  | 
471  |  |   "          }\n"  | 
472  |  |   "          mandatory true;\n"  | 
473  |  |   "          description\n"  | 
474  |  |   "            \"Route map actions: permit (executes action), deny (quits evaluation)\";\n"  | 
475  |  |   "        }\n"  | 
476  |  |   "\n"  | 
477  |  |   "        leaf call {\n" | 
478  |  |   "          type route-map-name;\n"  | 
479  |  |   "          description\n"  | 
480  |  |   "            \"Call another route map before calling `exit-policy`. If the\n"  | 
481  |  |   "             called route map returns deny then this route map will also\n"  | 
482  |  |   "             return deny\";\n"  | 
483  |  |   "        }\n"  | 
484  |  |   "\n"  | 
485  |  |   "        leaf exit-policy {\n" | 
486  |  |   "          type enumeration {\n" | 
487  |  |   "            enum \"permit-or-deny\" {\n" | 
488  |  |   "              value 0;\n"  | 
489  |  |   "              description\n"  | 
490  |  |   "                \"End route map evaluation and return\";\n"  | 
491  |  |   "            }\n"  | 
492  |  |   "            enum \"next\" {\n" | 
493  |  |   "              value 1;\n"  | 
494  |  |   "              description\n"  | 
495  |  |   "                \"Proceed evaluating next route map entry per sequence\";\n"  | 
496  |  |   "            }\n"  | 
497  |  |   "            enum \"goto\" {\n" | 
498  |  |   "              value 2;\n"  | 
499  |  |   "              description\n"  | 
500  |  |   "                \"Go to route map entry with the provided sequence number\";\n"  | 
501  |  |   "            }\n"  | 
502  |  |   "          }\n"  | 
503  |  |   "          default \"permit-or-deny\";\n"  | 
504  |  |   "          description\n"  | 
505  |  |   "            \"What do to after route map successful match, set and call\";\n"  | 
506  |  |   "        }\n"  | 
507  |  |   "\n"  | 
508  |  |   "        leaf goto-value {\n" | 
509  |  |   "          when \"../exit-policy = \'goto\'\";\n"  | 
510  |  |   "          type route-map-sequence;\n"  | 
511  |  |   "          mandatory true;\n"  | 
512  |  |   "          description\n"  | 
513  |  |   "            \"Sequence number to jump (when using `goto` exit policy)\";\n"  | 
514  |  |   "        }\n"  | 
515  |  |   "\n"  | 
516  |  |   "        list match-condition {\n" | 
517  |  |   "          key \"condition\";\n"  | 
518  |  |   "          description\n"  | 
519  |  |   "            \"Route map match conditions\";\n"  | 
520  |  |   "          leaf condition {\n" | 
521  |  |   "            type identityref {\n" | 
522  |  |   "              base rmap-match-type;\n"  | 
523  |  |   "            }\n"  | 
524  |  |   "            description\n"  | 
525  |  |   "              \"Match condition\";\n"  | 
526  |  |   "          }\n"  | 
527  |  |   "\n"  | 
528  |  |   "          uses rmap-match-condition;\n"  | 
529  |  |   "        }\n"  | 
530  |  |   "\n"  | 
531  |  |   "        list set-action {\n" | 
532  |  |   "          key \"action\";\n"  | 
533  |  |   "          description\n"  | 
534  |  |   "            \"Route map set actions\";\n"  | 
535  |  |   "          leaf action {\n" | 
536  |  |   "            type identityref {\n" | 
537  |  |   "              base rmap-set-type;\n"  | 
538  |  |   "            }\n"  | 
539  |  |   "            description\n"  | 
540  |  |   "              \"Action to do when the route map matches\";\n"  | 
541  |  |   "          }\n"  | 
542  |  |   "\n"  | 
543  |  |   "          uses rmap-set-action;\n"  | 
544  |  |   "        }\n"  | 
545  |  |   "      }\n"  | 
546  |  |   "    }\n"  | 
547  |  |   "  }\n"  | 
548  |  |   "}\n"  | 
549  |  |   "";  | 
550  |  |  | 
551  |  | static struct yang_module_embed embed = { | 
552  |  |   .mod_name = "frr-route-map",  | 
553  |  |   .mod_rev = "2019-07-01",  | 
554  |  |   .sub_mod_name = "",  | 
555  |  |   .sub_mod_rev = "",  | 
556  |  |   .data = model,  | 
557  |  |   .format = LYS_IN_YANG,  | 
558  |  | };  | 
559  |  |  | 
560  |  | static void embed_register(void) __attribute__((_CONSTRUCTOR(2000)));  | 
561  |  | static void embed_register(void)  | 
562  | 8  | { | 
563  | 8  |   yang_module_embed(&embed);  | 
564  | 8  | }  |