1 module frr-bgp-filter {
3 namespace "http://frrouting.org/yang/bgp-filter";
10 import ietf-routing-types {
17 "FRR Users List: <mailto:frog@lists.frrouting.org>
18 FRR Development List: <mailto:dev@lists.frrouting.org>";
20 "This module defines filter settings";
27 typedef list-sequence {
29 range "1..4294967295";
32 "List instance priority (low number means higher priority)";
49 "Return action on match";
52 typedef bgp-list-name {
58 typedef community-string {
60 pattern "(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)|((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|(local-AS)|(no-advertise)|(no-export)|(internet)";
63 "The BGP community string";
66 typedef large-community-string {
68 pattern "(429496729[0-5]|42949672[0-8][0-9]|4294967[01][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)|(429496729[0-5]|42949672[0-8][0-9]|4294967[01][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):(429496729[0-5]|42949672[0-8][0-9]|4294967[01][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)|(429496729[0-5]|42949672[0-8][0-9]|4294967[01][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):(429496729[0-5]|42949672[0-8][0-9]|4294967[01][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):(429496729[0-5]|42949672[0-8][0-9]|4294967[01][0-9]{2}|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)";
71 "The BGP large-community string";
74 augment "/frr-filter:lib" {
78 "Community-list instance";
86 "Community-list entry";
97 enum "community-list-standard" {
100 "Standard community-list name/identifier";
102 enum "community-list-extended" {
105 "Expanded community-list name/identifier";
110 "Community-list instance name/identifier";
113 choice community-string {
117 when "./type = 'community-list-standard'";
118 leaf-list standard-community-string {
119 type community-string;
126 when "./type = 'community-list-extended'";
127 leaf expanded-community-string {
130 "Community string reg-ex";
137 list large-community-list {
140 "Large community-list instance";
148 "Large community-list entry";
159 enum "large-community-list-standard-id" {
162 "Standard large-community-list identifier";
164 enum "large-community-list-extended-id" {
167 "Expanded large-community-list identifier";
169 enum "large-community-list-standard-name" {
172 "Standard large-community-list name";
174 enum "large-community-list-extended-name" {
177 "Expanded large-community-list name";
182 "Large community-list instance name/identifier";
185 choice large-community-string {
187 "Large community string";
189 when "./type = 'large-community-list-standard-id' or "
190 + "./type = 'large-community-list-standard-name'";
191 leaf-list standard-large-community-string {
192 type large-community-string;
194 "Large community string";
199 when "./type = 'large-community-list-extended-id' or "
200 + "./type = 'large-community-list-extended-name'";
201 leaf expanded-large-community-string {
204 "Large community string reg-ex";
211 list extcommunity-list {
214 "Extcommunity-list instance";
222 "Extcommunity-list entry";
233 enum "extcommunity-list-standard-id" {
236 "Standard extcommunity-list identifier";
238 enum "extcommunity-list-extended-id" {
241 "Expanded extcommunity-list identifier";
243 enum "extcommunity-list-standard-name" {
246 "Standard extcommunity-list name";
248 enum "extcommunity-list-extended-name" {
251 "Expanded extcommunity-list name";
256 "Extcommunity-list instance name/identifier";
259 choice extcommunity-string {
261 "Extcommunity string";
263 when "./type = 'extcommunity-list-standard-id' or "
264 + "./type = 'extcommunity-list-standard-name'";
265 choice standard-extcommunity-string {
267 "Value of the ext-community";
268 case extcommunity-rt {
270 "Set BGP ext-community route-target attribute";
271 leaf-list extcommunity-rt {
272 type rt-types:route-target;
276 case extcommunity-soo {
278 "Set BGP ext-community site-of-origin attribute";
279 leaf-list extcommunity-soo {
280 type rt-types:route-target;
287 when "./type = 'extcommunity-list-extended-id' or "
288 + "./type = 'extcommunity-list-extended-name'";
289 leaf expanded-extcommunity-string {
292 "Extcommunity string reg-ex";
302 "AS-path access-list instance";
306 "AS-path access-list instance name/identifier";
312 "AS-path access-list entry";
324 "AS-path access-list string reg-ex";