Coverage Report

Created: 2025-08-03 06:36

/src/frr/yang/frr-bgp-rpki.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-bgp-rpki {\n"
9
  "  yang-version 1.1;\n"
10
  "  namespace \"http://frrouting.org/yang/frr-bgp-rpki\";\n"
11
  "  prefix frr-bgp-rpki;\n"
12
  "\n"
13
  "  import ietf-inet-types {\n"
14
  "    prefix inet;\n"
15
  "  }\n"
16
  "\n"
17
  "  import frr-vrf {\n"
18
  "    prefix frr-vrf;\n"
19
  "  }\n"
20
  "\n"
21
  "  organization\n"
22
  "    \"FRRouting\";\n"
23
  "  contact\n"
24
  "    \"FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development\n"
25
  "     List: <mailto:dev@lists.frrouting.org>\";\n"
26
  "  description\n"
27
  "    \"This module defines a model for managing FRR BGP RPKI.\n"
28
  "\n"
29
  "     Copyright 2020 FRRouting\n"
30
  "\n"
31
  "     Redistribution and use in source and binary forms, with or without\n"
32
  "     modification, are permitted provided that the following conditions\n"
33
  "     are met:\n"
34
  "\n"
35
  "     1. Redistributions of source code must retain the above copyright notice,\n"
36
  "     this list of conditions and the following disclaimer.\n"
37
  "\n"
38
  "     2. Redistributions in binary form must reproduce the above copyright\n"
39
  "     notice, this list of conditions and the following disclaimer in the\n"
40
  "     documentation and/or other materials provided with the distribution.\n"
41
  "\n"
42
  "     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"
43
  "     \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"
44
  "     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"
45
  "     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"
46
  "     HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n"
47
  "     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n"
48
  "     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n"
49
  "     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n"
50
  "     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"
51
  "     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"
52
  "     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\";\n"
53
  "\n"
54
  "  revision 2019-12-03 {\n"
55
  "    description\n"
56
  "      \"Initial revision.\";\n"
57
  "  }\n"
58
  "\n"
59
  "  typedef transport-type {\n"
60
  "    type enumeration {\n"
61
  "      enum \"TCP\" {\n"
62
  "        value 1;\n"
63
  "        description\n"
64
  "          \"Connection to server is TCP based.\";\n"
65
  "      }\n"
66
  "      enum \"SSH\" {\n"
67
  "        value 2;\n"
68
  "        description\n"
69
  "          \"Connection to server is SSH based.\";\n"
70
  "      }\n"
71
  "    }\n"
72
  "  }\n"
73
  "\n"
74
  "  grouping bgp-rpki-timers {\n"
75
  "    container rpki-timers {\n"
76
  "      description\n"
77
  "        \"RPKI timers config.\";\n"
78
  "      leaf polling-time {\n"
79
  "        type uint32 {\n"
80
  "          range \"1..86400\";\n"
81
  "        }\n"
82
  "        units \"seconds\";\n"
83
  "        default \"3600\";\n"
84
  "        description\n"
85
  "          \"Set the number of seconds the router waits until the\n"
86
  "           router asks the cache again for updated data.\";\n"
87
  "      }\n"
88
  "\n"
89
  "      leaf expire-time {\n"
90
  "        type uint32 {\n"
91
  "          range \"600..172800\";\n"
92
  "        }\n"
93
  "        units \"seconds\";\n"
94
  "        default \"7200\";\n"
95
  "        description\n"
96
  "          \"Set the expire interval.\";\n"
97
  "      }\n"
98
  "\n"
99
  "      leaf retry-time {\n"
100
  "        type uint16 {\n"
101
  "          range \"1..7200\";\n"
102
  "        }\n"
103
  "        units \"seconds\";\n"
104
  "        default \"600\";\n"
105
  "        description\n"
106
  "          \"Set the retry interval.\";\n"
107
  "      }\n"
108
  "    }\n"
109
  "  }\n"
110
  "\n"
111
  "  grouping bgp-rpki-cache-server {\n"
112
  "    container rpki-cache-server {\n"
113
  "      description\n"
114
  "        \"Add a cache server to the socket.\";\n"
115
  "      list cache-list {\n"
116
  "        key \"preference\";\n"
117
  "        leaf preference {\n"
118
  "          type uint8 {\n"
119
  "            range \"1..255\";\n"
120
  "          }\n"
121
  "          description\n"
122
  "            \"Preference of the cache server.\";\n"
123
  "        }\n"
124
  "\n"
125
  "        leaf cache-type {\n"
126
  "          type transport-type;\n"
127
  "          mandatory true;\n"
128
  "          description\n"
129
  "            \"Specifies a transport method for the RPKI cache.\";\n"
130
  "        }\n"
131
  "\n"
132
  "        choice server {\n"
133
  "          case ip-address {\n"
134
  "            leaf ip-address {\n"
135
  "              type inet:ip-address;\n"
136
  "              mandatory true;\n"
137
  "            }\n"
138
  "          }\n"
139
  "\n"
140
  "          case host-name {\n"
141
  "            leaf ip-host-address {\n"
142
  "              type inet:host;\n"
143
  "              mandatory true;\n"
144
  "            }\n"
145
  "          }\n"
146
  "        }\n"
147
  "\n"
148
  "        container transport {\n"
149
  "          container tcp {\n"
150
  "            when \"../../cache-type = \'TCP\'\";\n"
151
  "            description\n"
152
  "              \"TCP server details.\";\n"
153
  "            leaf tcp-port {\n"
154
  "              type uint32;\n"
155
  "            }\n"
156
  "          }\n"
157
  "\n"
158
  "          container ssh {\n"
159
  "            when \"../../cache-type = \'SSH\'\";\n"
160
  "            description\n"
161
  "              \"SSH login details\";\n"
162
  "            leaf ssh-port {\n"
163
  "              type uint32 {\n"
164
  "                range \"1..65535\";\n"
165
  "              }\n"
166
  "              description\n"
167
  "                \"SSH port on which session gets opened.\";\n"
168
  "            }\n"
169
  "\n"
170
  "            leaf user-name {\n"
171
  "              type string;\n"
172
  "              description\n"
173
  "                \"SSH username to establish an SSH connection to the\n"
174
  "                 cache server.\";\n"
175
  "            }\n"
176
  "\n"
177
  "            leaf private-key {\n"
178
  "              type string;\n"
179
  "              description\n"
180
  "                \"Local path that includes the private key file of the router.\";\n"
181
  "            }\n"
182
  "\n"
183
  "            leaf public-key {\n"
184
  "              type string;\n"
185
  "              description\n"
186
  "                \"Local path that includes the public key file of the router.\";\n"
187
  "            }\n"
188
  "\n"
189
  "            leaf server-public-ley {\n"
190
  "              type string;\n"
191
  "              description\n"
192
  "                \"Server public key.\";\n"
193
  "            }\n"
194
  "          }\n"
195
  "        }\n"
196
  "      }\n"
197
  "    }\n"
198
  "  }\n"
199
  "\n"
200
  "  augment \"/frr-vrf:lib/frr-vrf:vrf\" {\n"
201
  "    container bgp-rpki {\n"
202
  "      description\n"
203
  "        \"RPKI configuration parameters.\";\n"
204
  "      leaf enable {\n"
205
  "        type boolean;\n"
206
  "        default \"false\";\n"
207
  "        description\n"
208
  "          \"When set to \'true\' it enables the RPKI.\";\n"
209
  "      }\n"
210
  "\n"
211
  "      uses bgp-rpki-timers;\n"
212
  "\n"
213
  "      uses bgp-rpki-cache-server;\n"
214
  "    }\n"
215
  "  }\n"
216
  "}\n"
217
  "";
218
219
static struct yang_module_embed embed = {
220
  .mod_name = "frr-bgp-rpki",
221
  .mod_rev = "2019-12-03",
222
  .sub_mod_name = "",
223
  .sub_mod_rev = "",
224
  .data = model,
225
  .format = LYS_IN_YANG,
226
};
227
228
static void embed_register(void) __attribute__((_CONSTRUCTOR(2000)));
229
static void embed_register(void)
230
1
{
231
1
  yang_module_embed(&embed);
232
1
}