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-rib-impl { prefix bgp-rib-impl; revision-date 2016-06-06; }
10 import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
11 import odl-bgp-rib-cfg { prefix bgprib; revision-date 2013-07-01; }
12 import odl-bgp-parser-spi-cfg { prefix bgpspi; revision-date 2013-11-15; }
13 import odl-bgp-rib-spi-cfg { prefix ribspi; revision-date 2013-11-15; }
14 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
15 import ietf-yang-types { prefix yang; revision-date 2013-07-15; }
16 import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
17 import opendaylight-md-sal-dom {prefix sal; revision-date 2013-10-28; }
18 import netty { prefix netty; revision-date 2013-11-19; }
19 import config { prefix config; revision-date 2013-04-05; }
20 import odl-tcpmd5-cfg { prefix tcpmd5; revision-date 2014-04-27; }
21 import odl-tcpmd5-netty-cfg { prefix tcpmd5n; revision-date 2014-04-27; }
22 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
23 import odl-bgp-openconfig-spi-cfg { prefix bgp-oc-spi; revision-date 2015-09-25; }
24 import odl-bgp-path-selection-mode { prefix bps; revision-date 2016-03-01;}
25 import bgp-peer { prefix peer; revision-date 2016-06-06; }
26 import bgp-stats-peer { prefix peer-stats; revision-date 2016-06-06; }
27 import bgp-stats-rib-impl { prefix rib-impl-stats; revision-date 2016-06-06; }
29 organization "Cisco Systems, Inc.";
31 contact "Robert Varga <rovarga@cisco.com>";
34 "This module contains the base YANG definitions for
35 BGP listener implementation.
37 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
39 This program and the accompanying materials are made available
40 under the terms of the Eclipse Public License v1.0 which
41 accompanies this distribution, and is available at
42 http://www.eclipse.org/legal/epl-v10.html";
44 revision "2016-03-30" {
46 "Updated to simplify reconnection strategy.";
48 revision "2013-04-09" {
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 rib-instance {
120 "Service representing a RIB instance";
122 base "config:service-type";
123 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
126 identity bgp-peer-registry {
128 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
130 base "config:service-type";
131 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
134 identity strict-bgp-peer-registry {
136 "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";
138 config:provided-service bgp-peer-registry;
139 base config:module-type;
140 config:java-name-prefix StrictBgpPeerRegistry;
143 augment "/config:modules/config:module/config:configuration" {
144 case strict-bgp-peer-registry {
145 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
151 "BGP peer instance.";
153 base config:module-type;
154 config:java-name-prefix BGPPeer;
157 identity bgp-peer-acceptor {
159 "BGP peer acceptor that handles incoming bgp connections. Uses BGP peer registry to accept or decline incoming connections";
161 base config:module-type;
162 config:java-name-prefix BGPPeerAcceptor;
165 augment "/config:modules/config:module/config:configuration" {
166 case bgp-peer-acceptor {
167 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
169 leaf binding-address {
170 description "IP address to bind to";
171 type inet:ip-address;
176 description "Port to bind to";
177 type inet:port-number;
181 container accepting-bgp-dispatcher {
182 uses config:service-ref {
185 config:required-identity bgp-dispatcher;
190 container accepting-peer-registry {
191 uses config:service-ref {
194 config:required-identity bgp-peer-registry;
201 identity bgp-application-peer {
203 "Application peer handler which handles translation from custom RIB into local RIB";
205 base config:module-type;
206 config:java-name-prefix BGPApplicationPeer;
209 augment "/config:modules/config:module/config:configuration" {
210 case bgp-application-peer {
211 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
213 container data-broker {
214 uses config:service-ref {
217 config:required-identity sal:dom-async-data-broker;
222 container target-rib {
223 uses config:service-ref {
226 config:required-identity rib-instance;
231 container bgp-peer-registry {
232 description "BGP peer registry where current instance of BGP peer will be registered.";
233 uses config:service-ref {
235 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
237 config:required-identity bgp-peer-registry;
242 leaf application-rib-id {
243 type rib:application-rib-id;
254 identity bgp-table-type {
256 "Service representing a AFI/SAFI pair";
258 base "config:service-type";
259 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
263 base "config:service-type";
264 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.mp.capabilities.add.path.capability.AddressFamilies";
267 identity add-path-impl {
268 config:provided-service add-path;
269 base config:module-type;
270 config:java-name-prefix AddPathImpl;
273 identity bgp-table-type-impl {
275 "Simple provider for bgp-table-type.";
277 config:provided-service bgp-table-type;
278 base config:module-type;
279 config:java-name-prefix BGPTableTypeImpl;
282 augment "/config:modules/config:module/config:configuration" {
283 case bgp-table-type-impl {
284 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
286 uses bgp-mp:bgp-table-type;
290 augment "/config:modules/config:module/config:configuration" {
292 when "/config:modules/config:module/config:type = 'add-path-impl'";
293 container address-family {
294 uses config:service-ref {
297 config:required-identity bgp-table-type;
302 type bgp-mp:send-receive;
308 augment "/config:modules/config:module/config:configuration" {
310 when "/config:modules/config:module/config:type = 'bgp-peer'";
312 uses peer:bgp-peer-config;
314 list advertized-table {
316 uses config:service-ref {
319 config:required-identity bgp-table-type;
326 uses config:service-ref {
328 config:required-identity add-path;
333 container rpc-registry {
334 uses config:service-ref {
337 config:required-identity mdsb:binding-rpc-registry;
343 uses config:service-ref {
346 config:required-identity rib-instance;
351 container peer-registry {
352 description "BGP peer registry where current instance of BGP peer will be registered.";
353 uses config:service-ref {
355 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
357 config:required-identity bgp-peer-registry;
366 augment "/config:modules/config:module/config:state" {
368 when "/config:modules/config:module/config:type = 'bgp-peer'";
370 rpcx:rpc-context-instance "peer-rpc";
371 uses peer-stats:bgp-peer-stats;
375 when "/config:modules/config:module/config:type = 'rib-impl'";
377 uses rib-impl-stats:bgp-render-stats;
382 description "Restart the session between BGP peers";
384 uses rpcx:rpc-context-ref {
385 refine context-instance {
386 rpcx:rpc-context-instance peer-rpc;
393 description "Reset the BGP peer statistics.";
395 uses rpcx:rpc-context-ref {
396 refine context-instance {
397 rpcx:rpc-context-instance peer-rpc;
403 identity bgp-path-selection-mode {
405 "Service representing an address family + path selection mode.";
407 base "config:service-type";
408 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPBestPathSelection";
411 identity bgp-psm-impl {
412 base config:module-type;
413 config:provided-service bgp-path-selection-mode;
414 config:java-name-prefix BGPPSMImpl;
417 augment "/config:modules/config:module/config:configuration" {
419 when "/config:modules/config:module/config:type = 'bgp-psm-impl'";
420 container path-address-family {
421 uses config:service-ref {
424 config:required-identity bgp-table-type;
428 container path-selection-mode {
429 uses config:service-ref {
432 config:required-identity bps:path-selection-mode-factory;
440 base config:module-type;
441 config:provided-service bgprib:rib;
442 config:provided-service rib-instance;
443 config:java-name-prefix RIBImpl;
446 augment "/config:modules/config:module/config:configuration" {
448 when "/config:modules/config:module/config:type = 'rib-impl'";
450 uses bgp-rib-impl:bgp-rib-impl-identifiers;
452 container extensions {
453 uses config:service-ref {
456 config:required-identity ribspi:consumer-extensions;
461 container bgp-dispatcher {
462 uses config:service-ref {
465 config:required-identity bgp-dispatcher;
470 container data-provider {
471 uses config:service-ref {
474 config:required-identity mdsb:binding-async-data-broker;
479 container codec-tree-factory {
480 uses config:service-ref {
483 config:required-identity mdsb:binding-codec-tree-factory;
488 container dom-data-provider {
489 uses config:service-ref {
492 config:required-identity sal:dom-async-data-broker;
497 container openconfig-provider {
498 uses config:service-ref {
501 config:required-identity bgp-oc-spi:bgp-openconfig-provider;
507 uses config:service-ref {
510 config:required-identity bgp-table-type;
515 list rib-path-selection-mode {
516 uses config:service-ref {
518 config:required-identity bgp-path-selection-mode;