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 opendaylight-md-sal-binding-v1-codec { prefix mdsb1; revision-date 2016-07-14; }
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-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-application-peer {
114 "Application peer handler which handles translation from custom RIB into local RIB";
116 base config:module-type;
117 config:java-name-prefix BGPApplicationPeer;
120 augment "/config:modules/config:module/config:configuration" {
121 case bgp-application-peer {
122 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
124 container data-broker {
125 uses config:service-ref {
128 config:required-identity sal:dom-async-data-broker;
133 container target-rib {
134 uses config:service-ref {
137 config:required-identity rib-instance;
142 container bgp-peer-registry {
143 description "BGP peer registry where current instance of BGP peer will be registered.";
144 uses config:service-ref {
146 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
148 config:required-identity bgp-peer-registry;
153 leaf application-rib-id {
154 type rib:application-rib-id;
165 identity bgp-table-type {
167 "Service representing a AFI/SAFI pair";
169 base "config:service-type";
170 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
174 base "config:service-type";
175 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.mp.capabilities.add.path.capability.AddressFamilies";
178 identity add-path-impl {
179 config:provided-service add-path;
180 base config:module-type;
181 config:java-name-prefix AddPathImpl;
184 identity bgp-table-type-impl {
186 "Simple provider for bgp-table-type.";
188 config:provided-service bgp-table-type;
189 base config:module-type;
190 config:java-name-prefix BGPTableTypeImpl;
193 augment "/config:modules/config:module/config:configuration" {
194 case bgp-table-type-impl {
195 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
197 uses bgp-mp:bgp-table-type;
201 augment "/config:modules/config:module/config:configuration" {
203 when "/config:modules/config:module/config:type = 'add-path-impl'";
204 container address-family {
205 uses config:service-ref {
208 config:required-identity bgp-table-type;
213 type bgp-mp:send-receive;
219 augment "/config:modules/config:module/config:configuration" {
221 when "/config:modules/config:module/config:type = 'bgp-peer'";
223 uses peer:bgp-peer-config;
225 list advertized-table {
227 uses config:service-ref {
230 config:required-identity bgp-table-type;
237 uses config:service-ref {
239 config:required-identity add-path;
244 container rpc-registry {
245 uses config:service-ref {
248 config:required-identity mdsb:binding-rpc-registry;
254 uses config:service-ref {
257 config:required-identity rib-instance;
262 container peer-registry {
263 description "BGP peer registry where current instance of BGP peer will be registered.";
264 uses config:service-ref {
266 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
268 config:required-identity bgp-peer-registry;
277 augment "/config:modules/config:module/config:state" {
279 when "/config:modules/config:module/config:type = 'bgp-peer'";
281 rpcx:rpc-context-instance "peer-rpc";
282 uses peer-stats:bgp-peer-stats;
286 when "/config:modules/config:module/config:type = 'rib-impl'";
288 uses rib-impl-stats:bgp-render-stats;
293 description "Restart the session between BGP peers";
295 uses rpcx:rpc-context-ref {
296 refine context-instance {
297 rpcx:rpc-context-instance peer-rpc;
304 description "Reset the BGP peer statistics.";
306 uses rpcx:rpc-context-ref {
307 refine context-instance {
308 rpcx:rpc-context-instance peer-rpc;
314 identity bgp-path-selection-mode {
316 "Service representing an address family + path selection mode.";
318 base "config:service-type";
319 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPBestPathSelection";
322 identity bgp-psm-impl {
323 base config:module-type;
324 config:provided-service bgp-path-selection-mode;
325 config:java-name-prefix BGPPSMImpl;
328 augment "/config:modules/config:module/config:configuration" {
330 when "/config:modules/config:module/config:type = 'bgp-psm-impl'";
331 container path-address-family {
332 uses config:service-ref {
335 config:required-identity bgp-table-type;
339 container path-selection-mode {
340 uses config:service-ref {
343 config:required-identity bps:path-selection-mode-factory;
351 base config:module-type;
352 config:provided-service bgprib:rib;
353 config:provided-service rib-instance;
354 config:java-name-prefix RIBImpl;
357 augment "/config:modules/config:module/config:configuration" {
359 when "/config:modules/config:module/config:type = 'rib-impl'";
361 uses bgp-rib-impl:bgp-rib-impl-identifiers;
363 container extensions {
364 uses config:service-ref {
367 config:required-identity ribspi:consumer-extensions;
372 container bgp-dispatcher {
373 uses config:service-ref {
376 config:required-identity bgp-dispatcher;
381 container data-provider {
382 uses config:service-ref {
385 config:required-identity mdsb:binding-async-data-broker;
390 container codec-tree-factory {
391 uses config:service-ref {
394 config:required-identity mdsb1:binding-v1-codec-tree-factory;
399 container dom-data-provider {
400 uses config:service-ref {
403 config:required-identity sal:dom-async-data-broker;
409 uses config:service-ref {
412 config:required-identity bgp-table-type;
417 list rib-path-selection-mode {
418 uses config:service-ref {
420 config:required-identity bgp-path-selection-mode;