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;
81 uses config:service-ref {
84 config:required-identity netty:netty-timer;
89 container boss-group {
90 uses config:service-ref {
93 config:required-identity netty:netty-threadgroup;
98 container worker-group {
99 uses config:service-ref {
102 config:required-identity netty:netty-threadgroup;
107 container md5-channel-factory {
108 uses config:service-ref {
111 config:required-identity tcpmd5n:md5-channel-factory;
116 container md5-server-channel-factory {
117 uses config:service-ref {
120 config:required-identity tcpmd5n:md5-server-channel-factory;
127 identity base-bgp-rib {
128 base config:module-type;
129 config:provided-service ribspi:extension;
130 config:java-name-prefix BaseBGPRIB;
133 augment "/config:modules/config:module/config:configuration" {
135 when "/config:modules/config:module/config:type = 'base-bgp-rib'";
139 identity rib-instance {
141 "Service representing a RIB instance";
143 base "config:service-type";
144 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
147 identity bgp-peer-registry {
149 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
151 base "config:service-type";
152 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
155 identity strict-bgp-peer-registry {
157 "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";
159 config:provided-service bgp-peer-registry;
160 base config:module-type;
161 config:java-name-prefix StrictBgpPeerRegistry;
165 augment "/config:modules/config:module/config:configuration" {
166 case strict-bgp-peer-registry {
167 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
173 "BGP peer instance.";
175 base config:module-type;
176 config:java-name-prefix BGPPeer;
179 identity bgp-peer-acceptor {
181 "BGP peer acceptor that handles incomming bgp connections. Uses BGP peer registry to accept or decline incomming connections";
183 base config:module-type;
184 config:java-name-prefix BGPPeerAcceptor;
187 augment "/config:modules/config:module/config:configuration" {
188 case bgp-peer-acceptor {
189 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
191 leaf binding-address {
192 description "IP address to bind to";
193 type inet:ip-address;
198 description "Port to bind to";
199 type inet:port-number;
203 container bgp-dispatcher {
204 uses config:service-ref {
207 config:required-identity bgp-dispatcher;
212 container peer-registry {
213 uses config:service-ref {
216 config:required-identity bgp-peer-registry;
223 identity bgp-table-type {
225 "Service representing a AFI/SAFI pair";
227 base "config:service-type";
228 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
231 identity bgp-table-type-impl {
233 "Simple provider for bgp-table-type.";
235 config:provided-service bgp-table-type;
236 base config:module-type;
237 config:java-name-prefix BGPTableTypeImpl;
240 augment "/config:modules/config:module/config:configuration" {
241 case bgp-table-type-impl {
242 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
246 base bgp-t:address-family;
252 base bgp-t:subsequent-address-family;
259 augment "/config:modules/config:module/config:configuration" {
261 when "/config:modules/config:module/config:type = 'bgp-peer'";
264 description "Remote host IP address";
265 type inet:ip-address;
270 description "Remote host port";
271 type inet:port-number;
280 leaf initiate-connection {
281 description "If true, connection will be initiated right away from current device.
282 If not, the peer will only be registered to peer registry and available for incomming bgp connections.";
287 list advertized-table {
288 uses config:service-ref {
291 config:required-identity bgp-table-type;
298 "Expected remote AS number. If not present, it is assumed
299 to be the same as our local AS number.";
304 type tcpmd5:rfc2385-key;
305 description "RFC2385 shared secret";
309 uses config:service-ref {
312 config:required-identity rib-instance;
317 container peer-registry {
318 description "BGP peer registry where current instance of BGP peer will be registered.";
319 uses config:service-ref {
321 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
323 config:required-identity bgp-peer-registry;
331 base config:module-type;
332 config:provided-service bgprib:rib;
333 config:provided-service rib-instance;
334 config:java-name-prefix RIBImpl;
337 augment "/config:modules/config:module/config:configuration" {
339 when "/config:modules/config:module/config:type = 'rib-impl'";
341 container extensions {
342 uses config:service-ref {
345 config:required-identity ribspi:consumer-extensions;
350 container bgp-dispatcher {
351 uses config:service-ref {
354 config:required-identity bgp-dispatcher;
359 container session-reconnect-strategy {
360 uses config:service-ref {
363 config:required-identity pf:reconnect-strategy-factory;
368 container tcp-reconnect-strategy {
369 uses config:service-ref {
372 config:required-identity pf:reconnect-strategy-factory;
377 container data-provider {
378 uses config:service-ref {
381 config:required-identity mdsb:binding-data-broker;
387 description "Our local AS number. Needed by best selection path attribute.";
393 description "Our local BGP identifier. Needed by best selection path attribute.";
395 type inet:ipv4-address;
399 uses config:service-ref {
402 config:required-identity bgp-table-type;
408 description "Identifier of this RIB in local data store.";