]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-routing.yang
bgpd: Refactor subgroup_announce_table() to reuse an existing helpers
[mirror_frr.git] / yang / frr-routing.yang
CommitLineData
41db488c 1// SPDX-License-Identifier: BSD-2-Clause
8b043166 2module frr-routing {
3 yang-version "1.1";
4 namespace "http://frrouting.org/yang/routing";
99d0e854 5 prefix "frr-routing";
8b043166 6
7 import ietf-yang-types {
8 prefix "yang";
9 }
10
11 import frr-vrf {
12 prefix frr-vrf;
13 }
14
15 organization
78891caf 16 "FRRouting";
8b043166 17
18 contact
19 "FRR Users List: <mailto:frog@lists.frrouting.org>
20 FRR Development List: <mailto:dev@lists.frrouting.org>";
21
22 description
23 "This YANG module defines essential components for the management
fe3b629a
RW
24 of a routing subsystem.
25
26 Copyright 2020 FRRouting
27
28 Redistribution and use in source and binary forms, with or without
29 modification, are permitted provided that the following conditions
30 are met:
31
32 1. Redistributions of source code must retain the above copyright notice,
33 this list of conditions and the following disclaimer.
34
35 2. Redistributions in binary form must reproduce the above copyright
36 notice, this list of conditions and the following disclaimer in the
37 documentation and/or other materials provided with the distribution.
38
39 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
40 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
41 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
42 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
45 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
46 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
47 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
8b043166 50
51 revision 2019-08-15 {
52 description
53 "Initial revision.";
54 }
55
56 /* Identities */
57
58 identity address-family {
59 description
60 "Base identity from which identities describing address
61 families are derived.";
62 }
63
64 identity ipv4 {
65 base address-family;
66 description
67 "This identity represents an IPv4 address family.";
68 }
69
70 identity ipv6 {
71 base address-family;
72 description
73 "This identity represents an IPv6 address family.";
74 }
75
755100ac 76 identity afi-safi-type {
77 description
78 "Base identity type (AFI,SAFI) tuples for RIB";
79 }
80
81 identity ipv4-unicast {
82 base afi-safi-type;
83 description
84 "This identity represents the IPv4 unicast address family.";
85 }
86
87 identity ipv6-unicast {
88 base afi-safi-type;
89 description
90 "This identity represents the IPv6 unicast address family.";
91 }
92
93 identity ipv4-multicast {
94 base afi-safi-type;
95 description
96 "This identity represents the IPv4 multicast address family.";
97 }
98
99 identity ipv6-multicast {
100 base afi-safi-type;
101 description
102 "This identity represents the IPv6 multicast address family.";
103 }
104
2228b116 105 identity ipv4-labeled-unicast {
106 base afi-safi-type;
107 description
108 "This identity represents the IPv4 labeled unicast address family.";
109 }
110
111
112 identity ipv6-labeled-unicast {
113 base afi-safi-type;
114 description
115 "This identity represents the IPv6 labeled unicast address family.";
116 }
117
118
119 identity l3vpn-ipv4-unicast {
120 base afi-safi-type;
121 description
122 "This identity represents the L3vpn IPv4 unicast address family.";
123 }
124
125
126 identity l3vpn-ipv6-unicast {
127 base afi-safi-type;
128 description
129 "This identity represents the L3vpn IPv6 unicast address family.";
130 }
131
132
133 identity l3vpn-ipv4-multicast {
134 base afi-safi-type;
135 description
136 "This identity represents the L3vpn IPv4 multicast address family.";
137 }
138
139
140 identity l3vpn-ipv6-multicast {
141 base afi-safi-type;
142 description
143 "This identity represents the L3vpn IPv6 multicast address family.";
144 }
145
146
147 identity l2vpn-vpls {
148 base afi-safi-type;
149 description
150 "This identity represents the L2vpn VPLS address family.";
151 }
152
153
154 identity l2vpn-evpn {
155 base afi-safi-type;
156 description
157 "This identity represents the L2vpn EVPN address family.";
158 }
159
160
161 identity ipv4-flowspec {
162 base afi-safi-type;
163 description
164 "This identity represents the IPv4 flowspec address family.";
165 }
166
167
168 identity ipv6-flowspec {
169 base afi-safi-type;
170 description
171 "This identity represents the IPv6 flowspec address family.";
172 }
173
174
8b043166 175 identity control-plane-protocol {
176 description
177 "Base identity from which control-plane protocol identities are
178 derived.";
179 }
180
181 identity routing-protocol {
182 base control-plane-protocol;
183 description
184 "Identity from which Layer 3 routing protocol identities are
185 derived.";
186 }
187
188 /* Type Definitions */
189
190 typedef administrative-distance {
191 type uint8 {
192 range "1..255";
193 }
194 description
195 "Admin distance associated with the route.";
196 }
197
198 /* Groupings */
199
200 grouping address-family {
201 description
202 "This grouping provides a leaf identifying an address
203 family.";
204 leaf address-family {
205 type identityref {
206 base address-family;
207 }
208 mandatory true;
209 description
210 "Address family.";
211 }
212 }
213
214 grouping router-id {
215 description
216 "This grouping provides a router ID.";
217 leaf router-id {
218 type yang:dotted-quad;
219 description
220 "A 32-bit number in the form of a dotted quad that is used by
221 some routing protocols identifying a router.";
222 reference
223 "RFC 2328: OSPF Version 2";
224 }
225 }
226
227 /* Data nodes */
228
229 container routing {
230 description
231 "Configuration parameters for the routing subsystem.";
232 container control-plane-protocols {
233 description
234 "Support for control-plane protocol instances.";
235 list control-plane-protocol {
236 key "type name vrf";
237 description
238 "Each entry contains a control-plane protocol instance.";
239 leaf type {
240 type identityref {
241 base control-plane-protocol;
242 }
243 description
244 "Type of the control-plane protocol";
245 }
246 leaf name {
247 type string;
248 description
249 "An arbitrary name of the control-plane protocol
250 instance.";
251 }
252 leaf vrf {
806defc8 253 type frr-vrf:vrf-ref;
8b043166 254 description
255 "vrf for control-plane protocol";
256 }
257 }
258 }
259 }
260}