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-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";
57 config:disable-osgi-service-registration;
60 identity bgp-dispatcher-impl {
61 base config:module-type;
62 config:provided-service bgp-dispatcher;
63 config:java-name-prefix BGPDispatcherImpl;
66 augment "/config:modules/config:module/config:configuration" {
67 case bgp-dispatcher-impl {
68 when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
72 identity rib-instance {
74 "Service representing a RIB instance";
76 base "config:service-type";
77 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
78 config:disable-osgi-service-registration;
81 identity bgp-peer-registry {
83 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
85 base "config:service-type";
86 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
87 config:disable-osgi-service-registration;
90 identity strict-bgp-peer-registry {
92 "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";
94 config:provided-service bgp-peer-registry;
95 base config:module-type;
96 config:java-name-prefix StrictBgpPeerRegistry;
99 augment "/config:modules/config:module/config:configuration" {
100 case strict-bgp-peer-registry {
101 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
107 "BGP peer instance.";
109 base config:module-type;
110 config:java-name-prefix BGPPeer;
113 identity bgp-peer-acceptor {
115 "BGP peer acceptor that handles incoming bgp connections. Uses BGP peer registry to accept or decline incoming connections";
117 base config:module-type;
118 config:java-name-prefix BGPPeerAcceptor;
121 augment "/config:modules/config:module/config:configuration" {
122 case bgp-peer-acceptor {
123 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
125 leaf binding-address {
126 description "IP address to bind to";
127 type inet:ip-address;
132 description "Port to bind to";
133 type inet:port-number;
137 container accepting-bgp-dispatcher {
138 uses config:service-ref {
141 config:required-identity bgp-dispatcher;
146 container accepting-peer-registry {
147 uses config:service-ref {
150 config:required-identity bgp-peer-registry;
157 identity bgp-application-peer {
159 "Application peer handler which handles translation from custom RIB into local RIB";
161 base config:module-type;
162 config:java-name-prefix BGPApplicationPeer;
165 augment "/config:modules/config:module/config:configuration" {
166 case bgp-application-peer {
167 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
169 container data-broker {
170 uses config:service-ref {
173 config:required-identity sal:dom-async-data-broker;
178 container target-rib {
179 uses config:service-ref {
182 config:required-identity rib-instance;
187 container bgp-peer-registry {
188 description "BGP peer registry where current instance of BGP peer will be registered.";
189 uses config:service-ref {
191 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
193 config:required-identity bgp-peer-registry;
198 leaf application-rib-id {
199 type rib:application-rib-id;
210 identity bgp-table-type {
212 "Service representing a AFI/SAFI pair";
214 base "config:service-type";
215 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
219 base "config:service-type";
220 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.mp.capabilities.add.path.capability.AddressFamilies";
223 identity add-path-impl {
224 config:provided-service add-path;
225 base config:module-type;
226 config:java-name-prefix AddPathImpl;
229 identity bgp-table-type-impl {
231 "Simple provider for bgp-table-type.";
233 config:provided-service bgp-table-type;
234 base config:module-type;
235 config:java-name-prefix BGPTableTypeImpl;
238 augment "/config:modules/config:module/config:configuration" {
239 case bgp-table-type-impl {
240 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
242 uses bgp-mp:bgp-table-type;
246 augment "/config:modules/config:module/config:configuration" {
248 when "/config:modules/config:module/config:type = 'add-path-impl'";
249 container address-family {
250 uses config:service-ref {
253 config:required-identity bgp-table-type;
258 type bgp-mp:send-receive;
264 augment "/config:modules/config:module/config:configuration" {
266 when "/config:modules/config:module/config:type = 'bgp-peer'";
268 uses peer:bgp-peer-config;
270 list advertized-table {
272 uses config:service-ref {
275 config:required-identity bgp-table-type;
282 uses config:service-ref {
284 config:required-identity add-path;
289 container rpc-registry {
290 uses config:service-ref {
293 config:required-identity mdsb:binding-rpc-registry;
299 uses config:service-ref {
302 config:required-identity rib-instance;
307 container peer-registry {
308 description "BGP peer registry where current instance of BGP peer will be registered.";
309 uses config:service-ref {
311 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
313 config:required-identity bgp-peer-registry;
322 augment "/config:modules/config:module/config:state" {
324 when "/config:modules/config:module/config:type = 'bgp-peer'";
326 rpcx:rpc-context-instance "peer-rpc";
327 uses peer-stats:bgp-peer-stats;
331 when "/config:modules/config:module/config:type = 'rib-impl'";
333 uses rib-impl-stats:bgp-render-stats;
338 description "Restart the session between BGP peers";
340 uses rpcx:rpc-context-ref {
341 refine context-instance {
342 rpcx:rpc-context-instance peer-rpc;
349 description "Reset the BGP peer statistics.";
351 uses rpcx:rpc-context-ref {
352 refine context-instance {
353 rpcx:rpc-context-instance peer-rpc;
359 identity bgp-path-selection-mode {
361 "Service representing an address family + path selection mode.";
363 base "config:service-type";
364 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPBestPathSelection";
367 identity bgp-psm-impl {
368 base config:module-type;
369 config:provided-service bgp-path-selection-mode;
370 config:java-name-prefix BGPPSMImpl;
373 augment "/config:modules/config:module/config:configuration" {
375 when "/config:modules/config:module/config:type = 'bgp-psm-impl'";
376 container path-address-family {
377 uses config:service-ref {
380 config:required-identity bgp-table-type;
384 container path-selection-mode {
385 uses config:service-ref {
388 config:required-identity bps:path-selection-mode-factory;
396 base config:module-type;
397 config:provided-service bgprib:rib;
398 config:provided-service rib-instance;
399 config:java-name-prefix RIBImpl;
402 augment "/config:modules/config:module/config:configuration" {
404 when "/config:modules/config:module/config:type = 'rib-impl'";
406 uses bgp-rib-impl:bgp-rib-impl-identifiers;
408 container extensions {
409 uses config:service-ref {
412 config:required-identity ribspi:consumer-extensions;
417 container bgp-dispatcher {
418 uses config:service-ref {
421 config:required-identity bgp-dispatcher;
426 container data-provider {
427 uses config:service-ref {
430 config:required-identity mdsb:binding-async-data-broker;
435 container codec-tree-factory {
436 uses config:service-ref {
439 config:required-identity mdsb1:binding-v1-codec-tree-factory;
444 container dom-data-provider {
445 uses config:service-ref {
448 config:required-identity sal:dom-async-data-broker;
453 container openconfig-provider {
454 uses config:service-ref {
457 config:required-identity bgp-oc-spi:bgp-openconfig-provider;
463 uses config:service-ref {
466 config:required-identity bgp-table-type;
471 list rib-path-selection-mode {
472 uses config:service-ref {
474 config:required-identity bgp-path-selection-mode;