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; }
24 organization "Cisco Systems, Inc.";
26 contact "Robert Varga <rovarga@cisco.com>";
29 "This module contains the base YANG definitions for
30 BGP listener implementation.
32 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
34 This program and the accompanying materials are made available
35 under the terms of the Eclipse Public License v1.0 which
36 accompanies this distribution, and is available at
37 http://www.eclipse.org/legal/epl-v10.html";
39 revision "2016-03-30" {
41 "Updated to simplify reconnection strategy.";
43 revision "2013-04-09" {
48 identity bgp-dispatcher {
50 "Service representing a BGP Dispatcher.";
52 base "config:service-type";
53 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
54 config:disable-osgi-service-registration;
57 identity bgp-dispatcher-impl {
58 base config:module-type;
59 config:provided-service bgp-dispatcher;
60 config:java-name-prefix BGPDispatcherImpl;
63 augment "/config:modules/config:module/config:configuration" {
64 case bgp-dispatcher-impl {
65 when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
69 identity rib-instance {
71 "Service representing a RIB instance";
73 base "config:service-type";
74 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
75 config:disable-osgi-service-registration;
78 identity bgp-peer-registry {
80 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
82 base "config:service-type";
83 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
84 config:disable-osgi-service-registration;
87 identity strict-bgp-peer-registry {
89 "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";
91 config:provided-service bgp-peer-registry;
92 base config:module-type;
93 config:java-name-prefix StrictBgpPeerRegistry;
96 augment "/config:modules/config:module/config:configuration" {
97 case strict-bgp-peer-registry {
98 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
104 "BGP peer instance.";
106 base config:module-type;
107 config:java-name-prefix BGPPeer;
110 identity bgp-application-peer {
112 "Application peer handler which handles translation from custom RIB into local RIB";
114 base config:module-type;
115 config:java-name-prefix BGPApplicationPeer;
118 augment "/config:modules/config:module/config:configuration" {
119 case bgp-application-peer {
120 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
122 container data-broker {
123 uses config:service-ref {
126 config:required-identity sal:dom-async-data-broker;
131 container target-rib {
132 uses config:service-ref {
135 config:required-identity rib-instance;
140 container bgp-peer-registry {
141 description "BGP peer registry where current instance of BGP peer will be registered.";
142 uses config:service-ref {
144 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
146 config:required-identity bgp-peer-registry;
151 leaf application-rib-id {
152 type rib:application-rib-id;
163 identity bgp-table-type {
165 "Service representing a AFI/SAFI pair";
167 base "config:service-type";
168 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
172 base "config:service-type";
173 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.mp.capabilities.add.path.capability.AddressFamilies";
176 identity add-path-impl {
177 config:provided-service add-path;
178 base config:module-type;
179 config:java-name-prefix AddPathImpl;
182 identity bgp-table-type-impl {
184 "Simple provider for bgp-table-type.";
186 config:provided-service bgp-table-type;
187 base config:module-type;
188 config:java-name-prefix BGPTableTypeImpl;
191 augment "/config:modules/config:module/config:configuration" {
192 case bgp-table-type-impl {
193 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
195 uses bgp-mp:bgp-table-type;
199 augment "/config:modules/config:module/config:configuration" {
201 when "/config:modules/config:module/config:type = 'add-path-impl'";
202 container address-family {
203 uses config:service-ref {
206 config:required-identity bgp-table-type;
211 type bgp-mp:send-receive;
217 augment "/config:modules/config:module/config:configuration" {
219 when "/config:modules/config:module/config:type = 'bgp-peer'";
221 uses peer:bgp-peer-config;
223 list advertized-table {
225 uses config:service-ref {
228 config:required-identity bgp-table-type;
235 uses config:service-ref {
237 config:required-identity add-path;
242 container rpc-registry {
243 uses config:service-ref {
246 config:required-identity mdsb:binding-rpc-registry;
252 uses config:service-ref {
255 config:required-identity rib-instance;
260 container peer-registry {
261 description "BGP peer registry where current instance of BGP peer will be registered.";
262 uses config:service-ref {
264 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
266 config:required-identity bgp-peer-registry;
275 augment "/config:modules/config:module/config:state" {
277 when "/config:modules/config:module/config:type = 'bgp-peer'";
279 rpcx:rpc-context-instance "peer-rpc";
284 description "Restart the session between BGP peers";
286 uses rpcx:rpc-context-ref {
287 refine context-instance {
288 rpcx:rpc-context-instance peer-rpc;
294 identity bgp-path-selection-mode {
296 "Service representing an address family + path selection mode.";
298 base "config:service-type";
299 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPBestPathSelection";
302 identity bgp-psm-impl {
303 base config:module-type;
304 config:provided-service bgp-path-selection-mode;
305 config:java-name-prefix BGPPSMImpl;
308 augment "/config:modules/config:module/config:configuration" {
310 when "/config:modules/config:module/config:type = 'bgp-psm-impl'";
311 container path-address-family {
312 uses config:service-ref {
315 config:required-identity bgp-table-type;
319 container path-selection-mode {
320 uses config:service-ref {
323 config:required-identity bps:path-selection-mode-factory;
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 uses bgp-rib-impl:bgp-rib-impl-identifiers;
343 container extensions {
344 uses config:service-ref {
347 config:required-identity ribspi:consumer-extensions;
352 container bgp-dispatcher {
353 uses config:service-ref {
356 config:required-identity bgp-dispatcher;
361 container data-provider {
362 uses config:service-ref {
365 config:required-identity mdsb:binding-async-data-broker;
370 container codec-tree-factory {
371 uses config:service-ref {
374 config:required-identity mdsb1:binding-v1-codec-tree-factory;
379 container dom-data-provider {
380 uses config:service-ref {
383 config:required-identity sal:dom-async-data-broker;
389 uses config:service-ref {
392 config:required-identity bgp-table-type;
397 list rib-path-selection-mode {
398 uses config:service-ref {
400 config:required-identity bgp-path-selection-mode;