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-rib-spi-cfg { prefix ribspi; revision-date 2013-11-15; }
13 import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
14 import ietf-yang-types { prefix yang; revision-date 2013-07-15; }
15 import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
16 import opendaylight-md-sal-dom {prefix sal; revision-date 2013-10-28; }
17 import netty { prefix netty; revision-date 2013-11-19; }
18 import config { prefix config; revision-date 2013-04-05; }
19 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
20 import odl-bgp-openconfig-spi-cfg { prefix bgp-oc-spi; revision-date 2015-09-25; }
21 import odl-bgp-path-selection-mode { prefix bps; revision-date 2016-03-01;}
22 import bgp-peer { prefix peer; revision-date 2016-06-06; }
23 import bgp-stats-peer { prefix peer-stats; revision-date 2016-06-06; }
24 import bgp-stats-rib-impl { prefix rib-impl-stats; revision-date 2016-06-06; }
26 organization "Cisco Systems, Inc.";
28 contact "Robert Varga <rovarga@cisco.com>";
31 "This module contains the base YANG definitions for
32 BGP listener implementation.
34 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
36 This program and the accompanying materials are made available
37 under the terms of the Eclipse Public License v1.0 which
38 accompanies this distribution, and is available at
39 http://www.eclipse.org/legal/epl-v10.html";
41 revision "2016-03-30" {
43 "Updated to simplify reconnection strategy.";
45 revision "2013-04-09" {
50 identity bgp-dispatcher {
52 "Service representing a BGP Dispatcher.";
54 base "config:service-type";
55 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
56 config:disable-osgi-service-registration;
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'";
71 identity rib-instance {
73 "Service representing a RIB instance";
75 base "config:service-type";
76 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
77 config:disable-osgi-service-registration;
80 identity bgp-peer-registry {
82 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
84 base "config:service-type";
85 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
86 config:disable-osgi-service-registration;
89 identity strict-bgp-peer-registry {
91 "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";
93 config:provided-service bgp-peer-registry;
94 base config:module-type;
95 config:java-name-prefix StrictBgpPeerRegistry;
98 augment "/config:modules/config:module/config:configuration" {
99 case strict-bgp-peer-registry {
100 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
106 "BGP peer instance.";
108 base config:module-type;
109 config:java-name-prefix BGPPeer;
112 identity bgp-peer-acceptor {
114 "BGP peer acceptor that handles incoming bgp connections. Uses BGP peer registry to accept or decline incoming connections";
116 base config:module-type;
117 config:java-name-prefix BGPPeerAcceptor;
120 augment "/config:modules/config:module/config:configuration" {
121 case bgp-peer-acceptor {
122 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
124 leaf binding-address {
125 description "IP address to bind to";
126 type inet:ip-address;
131 description "Port to bind to";
132 type inet:port-number;
136 container accepting-bgp-dispatcher {
137 uses config:service-ref {
140 config:required-identity bgp-dispatcher;
145 container accepting-peer-registry {
146 uses config:service-ref {
149 config:required-identity bgp-peer-registry;
156 identity bgp-application-peer {
158 "Application peer handler which handles translation from custom RIB into local RIB";
160 base config:module-type;
161 config:java-name-prefix BGPApplicationPeer;
164 augment "/config:modules/config:module/config:configuration" {
165 case bgp-application-peer {
166 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
168 container data-broker {
169 uses config:service-ref {
172 config:required-identity sal:dom-async-data-broker;
177 container target-rib {
178 uses config:service-ref {
181 config:required-identity rib-instance;
186 container bgp-peer-registry {
187 description "BGP peer registry where current instance of BGP peer will be registered.";
188 uses config:service-ref {
190 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
192 config:required-identity bgp-peer-registry;
197 leaf application-rib-id {
198 type rib:application-rib-id;
209 identity bgp-table-type {
211 "Service representing a AFI/SAFI pair";
213 base "config:service-type";
214 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
218 base "config:service-type";
219 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.mp.capabilities.add.path.capability.AddressFamilies";
222 identity add-path-impl {
223 config:provided-service add-path;
224 base config:module-type;
225 config:java-name-prefix AddPathImpl;
228 identity bgp-table-type-impl {
230 "Simple provider for bgp-table-type.";
232 config:provided-service bgp-table-type;
233 base config:module-type;
234 config:java-name-prefix BGPTableTypeImpl;
237 augment "/config:modules/config:module/config:configuration" {
238 case bgp-table-type-impl {
239 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
241 uses bgp-mp:bgp-table-type;
245 augment "/config:modules/config:module/config:configuration" {
247 when "/config:modules/config:module/config:type = 'add-path-impl'";
248 container address-family {
249 uses config:service-ref {
252 config:required-identity bgp-table-type;
257 type bgp-mp:send-receive;
263 augment "/config:modules/config:module/config:configuration" {
265 when "/config:modules/config:module/config:type = 'bgp-peer'";
267 uses peer:bgp-peer-config;
269 list advertized-table {
271 uses config:service-ref {
274 config:required-identity bgp-table-type;
281 uses config:service-ref {
283 config:required-identity add-path;
288 container rpc-registry {
289 uses config:service-ref {
292 config:required-identity mdsb:binding-rpc-registry;
298 uses config:service-ref {
301 config:required-identity rib-instance;
306 container peer-registry {
307 description "BGP peer registry where current instance of BGP peer will be registered.";
308 uses config:service-ref {
310 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
312 config:required-identity bgp-peer-registry;
321 augment "/config:modules/config:module/config:state" {
323 when "/config:modules/config:module/config:type = 'bgp-peer'";
325 rpcx:rpc-context-instance "peer-rpc";
326 uses peer-stats:bgp-peer-stats;
330 when "/config:modules/config:module/config:type = 'rib-impl'";
332 uses rib-impl-stats:bgp-render-stats;
337 description "Restart the session between BGP peers";
339 uses rpcx:rpc-context-ref {
340 refine context-instance {
341 rpcx:rpc-context-instance peer-rpc;
348 description "Reset the BGP peer statistics.";
350 uses rpcx:rpc-context-ref {
351 refine context-instance {
352 rpcx:rpc-context-instance peer-rpc;
358 identity bgp-path-selection-mode {
360 "Service representing an address family + path selection mode.";
362 base "config:service-type";
363 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPBestPathSelection";
366 identity bgp-psm-impl {
367 base config:module-type;
368 config:provided-service bgp-path-selection-mode;
369 config:java-name-prefix BGPPSMImpl;
372 augment "/config:modules/config:module/config:configuration" {
374 when "/config:modules/config:module/config:type = 'bgp-psm-impl'";
375 container path-address-family {
376 uses config:service-ref {
379 config:required-identity bgp-table-type;
383 container path-selection-mode {
384 uses config:service-ref {
387 config:required-identity bps:path-selection-mode-factory;
395 base config:module-type;
396 config:provided-service bgprib:rib;
397 config:provided-service rib-instance;
398 config:java-name-prefix RIBImpl;
401 augment "/config:modules/config:module/config:configuration" {
403 when "/config:modules/config:module/config:type = 'rib-impl'";
405 uses bgp-rib-impl:bgp-rib-impl-identifiers;
407 container extensions {
408 uses config:service-ref {
411 config:required-identity ribspi:consumer-extensions;
416 container bgp-dispatcher {
417 uses config:service-ref {
420 config:required-identity bgp-dispatcher;
425 container data-provider {
426 uses config:service-ref {
429 config:required-identity mdsb:binding-async-data-broker;
434 container codec-tree-factory {
435 uses config:service-ref {
438 config:required-identity mdsb:binding-codec-tree-factory;
443 container dom-data-provider {
444 uses config:service-ref {
447 config:required-identity sal:dom-async-data-broker;
452 container openconfig-provider {
453 uses config:service-ref {
456 config:required-identity bgp-oc-spi:bgp-openconfig-provider;
462 uses config:service-ref {
465 config:required-identity bgp-table-type;
470 list rib-path-selection-mode {
471 uses config:service-ref {
473 config:required-identity bgp-path-selection-mode;