]>
Commit | Line | Data |
---|---|---|
41db488c | 1 | // SPDX-License-Identifier: BSD-2-Clause |
2228b116 | 2 | submodule frr-bgp-bmp { |
3 | yang-version 1.1; | |
4 | ||
5 | belongs-to frr-bgp { | |
6 | prefix "bgp"; | |
7 | } | |
8 | ||
9 | import ietf-inet-types { | |
10 | prefix inet; | |
11 | } | |
12 | ||
13 | import frr-bgp-types { | |
14 | prefix frr-bt; | |
15 | } | |
16 | ||
3f5af3d5 RB |
17 | include "frr-bgp-common-multiprotocol"; |
18 | ||
2228b116 | 19 | organization |
20 | "FRRouting"; | |
21 | contact | |
22 | "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development | |
23 | List: <mailto:dev@lists.frrouting.org>"; | |
24 | description | |
25 | "This submodule defines a model for managing FRR BGP BMP. | |
26 | ||
27 | Copyright 2020 FRRouting | |
28 | ||
29 | Redistribution and use in source and binary forms, with or without | |
30 | modification, are permitted provided that the following conditions | |
31 | are met: | |
32 | ||
33 | 1. Redistributions of source code must retain the above copyright notice, | |
34 | this list of conditions and the following disclaimer. | |
35 | ||
36 | 2. Redistributions in binary form must reproduce the above copyright | |
37 | notice, this list of conditions and the following disclaimer in the | |
38 | documentation and/or other materials provided with the distribution. | |
39 | ||
40 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
41 | \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
42 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
43 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
44 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
45 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
46 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
47 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
48 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
49 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
50 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; | |
51 | ||
52 | revision 2019-12-03 { | |
53 | description | |
54 | "Initial revision."; | |
55 | } | |
56 | ||
57 | grouping bmp-incoming-session { | |
58 | container incoming-session { | |
59 | list session-list { | |
60 | key "address tcp-port"; | |
61 | leaf address { | |
62 | type inet:ip-address; | |
63 | description | |
64 | "IPv4 address to listen on."; | |
65 | } | |
66 | ||
67 | leaf tcp-port { | |
68 | type uint32; | |
69 | } | |
70 | } | |
71 | } | |
72 | } | |
73 | ||
74 | grouping bmp-outgoing-session { | |
75 | container outgoing-session { | |
76 | list session-list { | |
77 | key "hostname tcp-port"; | |
78 | leaf hostname { | |
79 | type string; | |
80 | } | |
81 | ||
82 | leaf tcp-port { | |
83 | type uint32; | |
84 | } | |
85 | ||
86 | leaf min-retry-time { | |
87 | type uint32 { | |
88 | range "100..86400000"; | |
89 | } | |
94202742 | 90 | units "milliseconds"; |
2228b116 | 91 | default "30000"; |
92 | description | |
93 | "Minimum connection retry interval."; | |
94 | } | |
95 | ||
96 | leaf max-retry-time { | |
97 | type uint32 { | |
98 | range "100..86400000"; | |
99 | } | |
94202742 | 100 | units "milliseconds"; |
2228b116 | 101 | default "720000"; |
102 | description | |
103 | "Maximum connection retry interval."; | |
104 | } | |
105 | } | |
106 | } | |
107 | } | |
108 | ||
109 | grouping bmp-afi-safis { | |
110 | container afi-safis { | |
111 | description | |
112 | "List of address-families associated with the BGP | |
113 | instance."; | |
114 | list afi-safi { | |
115 | key "afi-safi-name"; | |
116 | description | |
117 | "AFI, SAFI configuration available for the | |
118 | neighbour or group."; | |
119 | uses mp-afi-safi-config; | |
120 | ||
121 | uses mp-all-afi-safi-list-contents; | |
122 | } | |
123 | } | |
124 | } | |
125 | ||
126 | grouping bmp-afi-safi-common-config { | |
127 | container common-config { | |
128 | leaf pre-policy { | |
129 | type boolean; | |
130 | default "false"; | |
131 | description | |
132 | "Send state before policy and filter processing."; | |
133 | } | |
134 | ||
135 | leaf post-policy { | |
136 | type boolean; | |
137 | default "false"; | |
138 | description | |
139 | "Send state after policy and filter processing."; | |
140 | } | |
141 | } | |
142 | } | |
143 | ||
144 | grouping global-bmp-config { | |
145 | description | |
146 | "Structural grouping used to include filter | |
147 | configuration for BMP."; | |
148 | container bmp-config { | |
149 | description | |
150 | "BMP related parameters."; | |
151 | list target-list { | |
152 | key "target-name"; | |
153 | leaf target-name { | |
154 | type string; | |
155 | description | |
156 | "Targets group name."; | |
157 | } | |
158 | ||
159 | uses bmp-incoming-session; | |
160 | ||
161 | uses bmp-outgoing-session; | |
162 | ||
163 | leaf mirror { | |
164 | type boolean; | |
165 | default "false"; | |
166 | description | |
167 | "When set to 'TRUE' it send BMP route mirroring messages."; | |
168 | } | |
169 | ||
170 | leaf stats-time { | |
171 | type uint32 { | |
172 | range "100..86400000"; | |
173 | } | |
94202742 | 174 | units "milliseconds"; |
2228b116 | 175 | description |
176 | "Interval to send BMP Stats."; | |
177 | } | |
178 | ||
179 | leaf ipv4-access-list { | |
180 | type frr-bt:access-list-ref; | |
181 | description | |
182 | "Access list to restrict BMP sessions."; | |
183 | } | |
184 | ||
185 | leaf ipv6-access-list { | |
186 | type frr-bt:access-list-ref; | |
187 | description | |
188 | "Access list to restrict BMP sessions."; | |
189 | } | |
190 | ||
191 | uses bmp-afi-safis; | |
192 | } | |
193 | ||
194 | leaf mirror-buffer-limit { | |
195 | type uint32 { | |
196 | range "0..4294967294"; | |
197 | } | |
198 | units "bytes"; | |
199 | description | |
200 | "Maximum memory used for buffered mirroring messages."; | |
201 | } | |
202 | } | |
203 | } | |
204 | } |