1 // vi: set smarttab et sw=4 tabstop=4:
2 module odl-bgp-rib-impl-cfg {
4 namespace "urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl";
7 import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
8 import bgp-rib { prefix rib; revision-date 2013-09-25; }
9 import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
10 import odl-bgp-rib-cfg { prefix bgprib; revision-date 2013-07-01; }
11 import odl-bgp-parser-spi-cfg { prefix bgpspi; revision-date 2013-11-15; }
12 import odl-bgp-rib-spi-cfg { prefix ribspi; revision-date 2013-11-15; }
13 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
14 import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
15 import netty { prefix netty; revision-date 2013-11-19; }
16 import config { prefix config; revision-date 2013-04-05; }
17 import protocol-framework { prefix pf; revision-date 2014-03-13; }
18 import odl-tcpmd5-cfg { prefix tcpmd5; revision-date 2014-04-27; }
19 import odl-tcpmd5-netty-cfg { prefix tcpmd5n; revision-date 2014-04-27; }
21 organization "Cisco Systems, Inc.";
23 contact "Robert Varga <rovarga@cisco.com>";
26 "This module contains the base YANG definitions for
27 BGP listener implementation.
29 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
31 This program and the accompanying materials are made available
32 under the terms of the Eclipse Public License v1.0 which
33 accompanies this distribution, and is available at
34 http://www.eclipse.org/legal/epl-v10.html";
36 revision "2013-04-09" {
41 identity base-bgp-parser {
42 base config:module-type;
43 config:java-name-prefix BaseBGPParser;
44 config:provided-service bgpspi:extension;
47 augment "/config:modules/config:module/config:configuration" {
48 case base-bgp-parser {
49 when "/config:modules/config:module/config:type = 'base-bgp-parser'";
53 identity bgp-dispatcher {
55 "Service representing a BGP Dispatcher.";
57 base "config:service-type";
58 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
61 identity bgp-dispatcher-impl {
62 base config:module-type;
63 config:provided-service bgp-dispatcher;
64 config:java-name-prefix BGPDispatcherImpl;
67 augment "/config:modules/config:module/config:configuration" {
68 case bgp-dispatcher-impl {
69 when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
71 container bgp-extensions {
72 uses config:service-ref {
75 config:required-identity bgpspi:consumer-extensions;
80 container boss-group {
81 uses config:service-ref {
84 config:required-identity netty:netty-threadgroup;
89 container worker-group {
90 uses config:service-ref {
93 config:required-identity netty:netty-threadgroup;
98 container md5-channel-factory {
99 uses config:service-ref {
102 config:required-identity tcpmd5n:md5-channel-factory;
107 container md5-server-channel-factory {
108 uses config:service-ref {
111 config:required-identity tcpmd5n:md5-server-channel-factory;
118 identity base-bgp-rib {
119 base config:module-type;
120 config:provided-service ribspi:extension;
121 config:java-name-prefix BaseBGPRIB;
124 augment "/config:modules/config:module/config:configuration" {
126 when "/config:modules/config:module/config:type = 'base-bgp-rib'";
130 identity rib-instance {
132 "Service representing a RIB instance";
134 base "config:service-type";
135 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
138 identity bgp-peer-registry {
140 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
142 base "config:service-type";
143 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
146 identity strict-bgp-peer-registry {
148 "Registry of BGP peers that allows only one connection per 2 peers. Uses IP address for Peer identification and BGP Ids to resolve duplicate connections";
150 config:provided-service bgp-peer-registry;
151 base config:module-type;
152 config:java-name-prefix StrictBgpPeerRegistry;
156 augment "/config:modules/config:module/config:configuration" {
157 case strict-bgp-peer-registry {
158 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
164 "BGP peer instance.";
166 base config:module-type;
167 config:java-name-prefix BGPPeer;
170 identity bgp-peer-acceptor {
172 "BGP peer acceptor that handles incomming bgp connections. Uses BGP peer registry to accept or decline incomming connections";
174 base config:module-type;
175 config:java-name-prefix BGPPeerAcceptor;
178 augment "/config:modules/config:module/config:configuration" {
179 case bgp-peer-acceptor {
180 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
182 leaf binding-address {
183 description "IP address to bind to";
184 type inet:ip-address;
189 description "Port to bind to";
190 type inet:port-number;
194 container bgp-dispatcher {
195 uses config:service-ref {
198 config:required-identity bgp-dispatcher;
203 container peer-registry {
204 uses config:service-ref {
207 config:required-identity bgp-peer-registry;
214 identity bgp-table-type {
216 "Service representing a AFI/SAFI pair";
218 base "config:service-type";
219 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
222 identity bgp-table-type-impl {
224 "Simple provider for bgp-table-type.";
226 config:provided-service bgp-table-type;
227 base config:module-type;
228 config:java-name-prefix BGPTableTypeImpl;
231 augment "/config:modules/config:module/config:configuration" {
232 case bgp-table-type-impl {
233 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
237 base bgp-t:address-family;
243 base bgp-t:subsequent-address-family;
250 augment "/config:modules/config:module/config:configuration" {
252 when "/config:modules/config:module/config:type = 'bgp-peer'";
255 description "Remote host IP address";
256 type inet:ip-address;
261 description "Remote host port";
262 type inet:port-number;
271 leaf initiate-connection {
272 description "If true, connection will be initiated right away from current device.
273 If not, the peer will only be registered to peer registry and available for incomming bgp connections.";
278 list advertized-table {
279 uses config:service-ref {
282 config:required-identity bgp-table-type;
289 "Expected remote AS number. If not present, it is assumed
290 to be the same as our local AS number.";
295 type tcpmd5:rfc2385-key;
296 description "RFC2385 shared secret";
300 uses config:service-ref {
303 config:required-identity rib-instance;
308 container peer-registry {
309 description "BGP peer registry where current instance of BGP peer will be registered.";
310 uses config:service-ref {
312 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
314 config:required-identity bgp-peer-registry;
322 base config:module-type;
323 config:provided-service bgprib:rib;
324 config:provided-service rib-instance;
325 config:java-name-prefix RIBImpl;
328 augment "/config:modules/config:module/config:configuration" {
330 when "/config:modules/config:module/config:type = 'rib-impl'";
332 container extensions {
333 uses config:service-ref {
336 config:required-identity ribspi:consumer-extensions;
341 container bgp-dispatcher {
342 uses config:service-ref {
345 config:required-identity bgp-dispatcher;
350 container session-reconnect-strategy {
351 uses config:service-ref {
354 config:required-identity pf:reconnect-strategy-factory;
359 container tcp-reconnect-strategy {
360 uses config:service-ref {
363 config:required-identity pf:reconnect-strategy-factory;
368 container data-provider {
369 uses config:service-ref {
372 config:required-identity mdsb:binding-data-broker;
378 description "Our local AS number. Needed by best selection path attribute.";
384 description "Our local BGP identifier. Needed by best selection path attribute.";
386 type inet:ipv4-address;
390 uses config:service-ref {
393 config:required-identity bgp-table-type;
399 description "Identifier of this RIB in local data store.";