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 rpc-context { prefix rpcx; revision-date 2013-06-17; }
21 import odl-bgp-openconfig-spi-cfg { prefix bgp-oc-spi; revision-date 2015-09-25; }
22 import odl-bgp-path-selection-mode { prefix bps; revision-date 2016-03-01;}
23 import bgp-peer { prefix peer; revision-date 2016-06-06; }
24 import bgp-stats-peer { prefix peer-stats; revision-date 2016-06-06; }
25 import bgp-stats-rib-impl { prefix rib-impl-stats; revision-date 2016-06-06; }
27 organization "Cisco Systems, Inc.";
29 contact "Robert Varga <rovarga@cisco.com>";
32 "This module contains the base YANG definitions for
33 BGP listener implementation.
35 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
37 This program and the accompanying materials are made available
38 under the terms of the Eclipse Public License v1.0 which
39 accompanies this distribution, and is available at
40 http://www.eclipse.org/legal/epl-v10.html";
42 revision "2016-03-30" {
44 "Updated to simplify reconnection strategy.";
46 revision "2013-04-09" {
51 identity bgp-dispatcher {
53 "Service representing a BGP Dispatcher.";
55 base "config:service-type";
56 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
59 identity bgp-dispatcher-impl {
60 base config:module-type;
61 config:provided-service bgp-dispatcher;
62 config:java-name-prefix BGPDispatcherImpl;
65 augment "/config:modules/config:module/config:configuration" {
66 case bgp-dispatcher-impl {
67 when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
69 container bgp-extensions {
70 uses config:service-ref {
73 config:required-identity bgpspi:consumer-extensions;
78 container boss-group {
79 uses config:service-ref {
82 config:required-identity netty:netty-threadgroup;
87 container worker-group {
88 uses config:service-ref {
91 config:required-identity netty:netty-threadgroup;
98 identity rib-instance {
100 "Service representing a RIB instance";
102 base "config:service-type";
103 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
106 identity bgp-peer-registry {
108 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
110 base "config:service-type";
111 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
114 identity strict-bgp-peer-registry {
116 "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";
118 config:provided-service bgp-peer-registry;
119 base config:module-type;
120 config:java-name-prefix StrictBgpPeerRegistry;
123 augment "/config:modules/config:module/config:configuration" {
124 case strict-bgp-peer-registry {
125 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
131 "BGP peer instance.";
133 base config:module-type;
134 config:java-name-prefix BGPPeer;
137 identity bgp-peer-acceptor {
139 "BGP peer acceptor that handles incoming bgp connections. Uses BGP peer registry to accept or decline incoming connections";
141 base config:module-type;
142 config:java-name-prefix BGPPeerAcceptor;
145 augment "/config:modules/config:module/config:configuration" {
146 case bgp-peer-acceptor {
147 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
149 leaf binding-address {
150 description "IP address to bind to";
151 type inet:ip-address;
156 description "Port to bind to";
157 type inet:port-number;
161 container accepting-bgp-dispatcher {
162 uses config:service-ref {
165 config:required-identity bgp-dispatcher;
170 container accepting-peer-registry {
171 uses config:service-ref {
174 config:required-identity bgp-peer-registry;
181 identity bgp-application-peer {
183 "Application peer handler which handles translation from custom RIB into local RIB";
185 base config:module-type;
186 config:java-name-prefix BGPApplicationPeer;
189 augment "/config:modules/config:module/config:configuration" {
190 case bgp-application-peer {
191 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
193 container data-broker {
194 uses config:service-ref {
197 config:required-identity sal:dom-async-data-broker;
202 container target-rib {
203 uses config:service-ref {
206 config:required-identity rib-instance;
211 container bgp-peer-registry {
212 description "BGP peer registry where current instance of BGP peer will be registered.";
213 uses config:service-ref {
215 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
217 config:required-identity bgp-peer-registry;
222 leaf application-rib-id {
223 type rib:application-rib-id;
234 identity bgp-table-type {
236 "Service representing a AFI/SAFI pair";
238 base "config:service-type";
239 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
243 base "config:service-type";
244 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.mp.capabilities.add.path.capability.AddressFamilies";
247 identity add-path-impl {
248 config:provided-service add-path;
249 base config:module-type;
250 config:java-name-prefix AddPathImpl;
253 identity bgp-table-type-impl {
255 "Simple provider for bgp-table-type.";
257 config:provided-service bgp-table-type;
258 base config:module-type;
259 config:java-name-prefix BGPTableTypeImpl;
262 augment "/config:modules/config:module/config:configuration" {
263 case bgp-table-type-impl {
264 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
266 uses bgp-mp:bgp-table-type;
270 augment "/config:modules/config:module/config:configuration" {
272 when "/config:modules/config:module/config:type = 'add-path-impl'";
273 container address-family {
274 uses config:service-ref {
277 config:required-identity bgp-table-type;
282 type bgp-mp:send-receive;
288 augment "/config:modules/config:module/config:configuration" {
290 when "/config:modules/config:module/config:type = 'bgp-peer'";
292 uses peer:bgp-peer-config;
294 list advertized-table {
296 uses config:service-ref {
299 config:required-identity bgp-table-type;
306 uses config:service-ref {
308 config:required-identity add-path;
313 container rpc-registry {
314 uses config:service-ref {
317 config:required-identity mdsb:binding-rpc-registry;
323 uses config:service-ref {
326 config:required-identity rib-instance;
331 container peer-registry {
332 description "BGP peer registry where current instance of BGP peer will be registered.";
333 uses config:service-ref {
335 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
337 config:required-identity bgp-peer-registry;
346 augment "/config:modules/config:module/config:state" {
348 when "/config:modules/config:module/config:type = 'bgp-peer'";
350 rpcx:rpc-context-instance "peer-rpc";
351 uses peer-stats:bgp-peer-stats;
355 when "/config:modules/config:module/config:type = 'rib-impl'";
357 uses rib-impl-stats:bgp-render-stats;
362 description "Restart the session between BGP peers";
364 uses rpcx:rpc-context-ref {
365 refine context-instance {
366 rpcx:rpc-context-instance peer-rpc;
373 description "Reset the BGP peer statistics.";
375 uses rpcx:rpc-context-ref {
376 refine context-instance {
377 rpcx:rpc-context-instance peer-rpc;
383 identity bgp-path-selection-mode {
385 "Service representing an address family + path selection mode.";
387 base "config:service-type";
388 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPBestPathSelection";
391 identity bgp-psm-impl {
392 base config:module-type;
393 config:provided-service bgp-path-selection-mode;
394 config:java-name-prefix BGPPSMImpl;
397 augment "/config:modules/config:module/config:configuration" {
399 when "/config:modules/config:module/config:type = 'bgp-psm-impl'";
400 container path-address-family {
401 uses config:service-ref {
404 config:required-identity bgp-table-type;
408 container path-selection-mode {
409 uses config:service-ref {
412 config:required-identity bps:path-selection-mode-factory;
420 base config:module-type;
421 config:provided-service bgprib:rib;
422 config:provided-service rib-instance;
423 config:java-name-prefix RIBImpl;
426 augment "/config:modules/config:module/config:configuration" {
428 when "/config:modules/config:module/config:type = 'rib-impl'";
430 uses bgp-rib-impl:bgp-rib-impl-identifiers;
432 container extensions {
433 uses config:service-ref {
436 config:required-identity ribspi:consumer-extensions;
441 container bgp-dispatcher {
442 uses config:service-ref {
445 config:required-identity bgp-dispatcher;
450 container data-provider {
451 uses config:service-ref {
454 config:required-identity mdsb:binding-async-data-broker;
459 container codec-tree-factory {
460 uses config:service-ref {
463 config:required-identity mdsb:binding-codec-tree-factory;
468 container dom-data-provider {
469 uses config:service-ref {
472 config:required-identity sal:dom-async-data-broker;
477 container openconfig-provider {
478 uses config:service-ref {
481 config:required-identity bgp-oc-spi:bgp-openconfig-provider;
487 uses config:service-ref {
490 config:required-identity bgp-table-type;
495 list rib-path-selection-mode {
496 uses config:service-ref {
498 config:required-identity bgp-path-selection-mode;