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-types { prefix bgp-t; revision-date 2013-09-19; }
10 import odl-bgp-rib-cfg { prefix bgprib; revision-date 2013-07-01; }
11 import odl-bgp-parser-spi-cfg { prefix bgpspi; revision-date 2013-11-15; }
12 import odl-bgp-rib-spi-cfg { prefix ribspi; revision-date 2013-11-15; }
13 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
14 import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
15 import opendaylight-md-sal-dom {prefix sal; revision-date 2013-10-28; }
16 import netty { prefix netty; revision-date 2013-11-19; }
17 import config { prefix config; revision-date 2013-04-05; }
18 import protocol-framework { prefix pf; revision-date 2014-03-13; }
19 import odl-tcpmd5-cfg { prefix tcpmd5; revision-date 2014-04-27; }
20 import odl-tcpmd5-netty-cfg { prefix tcpmd5n; revision-date 2014-04-27; }
21 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
22 import odl-bgp-openconfig-spi-cfg { prefix bgp-oc-spi; revision-date 2015-09-25; }
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 "2013-04-09" {
44 identity base-bgp-parser {
45 base config:module-type;
46 config:java-name-prefix BaseBGPParser;
47 config:provided-service bgpspi:extension;
50 augment "/config:modules/config:module/config:configuration" {
51 case base-bgp-parser {
52 when "/config:modules/config:module/config:type = 'base-bgp-parser'";
56 identity bgp-dispatcher {
58 "Service representing a BGP Dispatcher.";
60 base "config:service-type";
61 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
64 identity bgp-dispatcher-impl {
65 base config:module-type;
66 config:provided-service bgp-dispatcher;
67 config:java-name-prefix BGPDispatcherImpl;
70 augment "/config:modules/config:module/config:configuration" {
71 case bgp-dispatcher-impl {
72 when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
74 container bgp-extensions {
75 uses config:service-ref {
78 config:required-identity bgpspi:consumer-extensions;
83 container boss-group {
84 uses config:service-ref {
87 config:required-identity netty:netty-threadgroup;
92 container worker-group {
93 uses config:service-ref {
96 config:required-identity netty:netty-threadgroup;
101 container md5-channel-factory {
102 uses config:service-ref {
105 config:required-identity tcpmd5n:md5-channel-factory;
110 container md5-server-channel-factory {
111 uses config:service-ref {
114 config:required-identity tcpmd5n:md5-server-channel-factory;
121 identity base-bgp-rib {
122 base config:module-type;
123 config:provided-service ribspi:extension;
124 config:java-name-prefix BaseBGPRIB;
127 augment "/config:modules/config:module/config:configuration" {
129 when "/config:modules/config:module/config:type = 'base-bgp-rib'";
133 identity rib-instance {
135 "Service representing a RIB instance";
137 base "config:service-type";
138 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
141 identity bgp-peer-registry {
143 "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
145 base "config:service-type";
146 config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
149 identity strict-bgp-peer-registry {
151 "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";
153 config:provided-service bgp-peer-registry;
154 base config:module-type;
155 config:java-name-prefix StrictBgpPeerRegistry;
159 augment "/config:modules/config:module/config:configuration" {
160 case strict-bgp-peer-registry {
161 when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
167 "BGP peer instance.";
169 base config:module-type;
170 config:java-name-prefix BGPPeer;
173 identity bgp-peer-acceptor {
175 "BGP peer acceptor that handles incomming bgp connections. Uses BGP peer registry to accept or decline incomming connections";
177 base config:module-type;
178 config:java-name-prefix BGPPeerAcceptor;
181 augment "/config:modules/config:module/config:configuration" {
182 case bgp-peer-acceptor {
183 when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
185 leaf binding-address {
186 description "IP address to bind to";
187 type inet:ip-address;
192 description "Port to bind to";
193 type inet:port-number;
197 container accepting-bgp-dispatcher {
198 uses config:service-ref {
201 config:required-identity bgp-dispatcher;
206 container accepting-peer-registry {
207 uses config:service-ref {
210 config:required-identity bgp-peer-registry;
217 identity bgp-application-peer {
219 "Application peer handler which handles translation from custom RIB into local RIB";
221 base config:module-type;
222 config:java-name-prefix BGPApplicationPeer;
225 augment "/config:modules/config:module/config:configuration" {
226 case bgp-application-peer {
227 when "/config:modules/config:module/config:type = 'bgp-application-peer'";
229 container data-broker {
230 uses config:service-ref {
233 config:required-identity sal:dom-async-data-broker;
238 container target-rib {
239 uses config:service-ref {
242 config:required-identity rib-instance;
247 leaf application-rib-id {
248 type rib:application-rib-id;
253 type inet:ipv4-address;
259 identity bgp-table-type {
261 "Service representing a AFI/SAFI pair";
263 base "config:service-type";
264 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
268 base "config:service-type";
269 config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.open.bgp.parameters.optional.capabilities.c.parameters.add.path.capability.AddressFamilies";
272 identity add-path-impl {
273 config:provided-service add-path;
274 base config:module-type;
275 config:java-name-prefix AddPathImpl;
278 identity bgp-table-type-impl {
280 "Simple provider for bgp-table-type.";
282 config:provided-service bgp-table-type;
283 base config:module-type;
284 config:java-name-prefix BGPTableTypeImpl;
287 augment "/config:modules/config:module/config:configuration" {
288 case bgp-table-type-impl {
289 when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
293 base bgp-t:address-family;
299 base bgp-t:subsequent-address-family;
306 augment "/config:modules/config:module/config:configuration" {
308 when "/config:modules/config:module/config:type = 'add-path-impl'";
309 container address-family {
310 uses config:service-ref {
313 config:required-identity bgp-table-type;
318 type bgp-mp:send-receive;
324 augment "/config:modules/config:module/config:configuration" {
326 when "/config:modules/config:module/config:type = 'bgp-peer'";
329 description "Remote host IP address";
330 type inet:ip-address;
335 description "Remote host port";
336 type inet:port-number;
350 leaf initiate-connection {
351 description "If true, connection will be initiated right away from current device.
352 If not, the peer will only be registered to peer registry and available for incomming bgp connections.";
357 list advertized-table {
359 uses config:service-ref {
362 config:required-identity bgp-table-type;
369 uses config:service-ref {
371 config:required-identity add-path;
378 "Expected remote AS number. If not present, it is assumed
379 to be the same as our local AS number.";
384 type tcpmd5:rfc2385-key;
385 description "RFC2385 shared secret";
389 uses config:service-ref {
392 config:required-identity rib-instance;
397 container peer-registry {
398 description "BGP peer registry where current instance of BGP peer will be registered.";
399 uses config:service-ref {
401 // FIXME backwards compatibility. If not configured, GLOBAL instance is used
403 config:required-identity bgp-peer-registry;
410 grouping message-state {
412 description "Total number of BGP messages.";
418 description "The BGP message timestamp (seconds).";
424 grouping message-stats {
426 description "The received BGP messages statistics.";
431 description "The sent BGP messages statistics.";
438 description "The BGP error code.";
444 description "The BGP error sub-code.";
450 grouping preferences {
452 description "The BGP Identifier.";
458 description "The IP address of BGP connection.";
464 description "The port for connection between the BGP peers.";
470 description "Autonomous system number.";
476 description "Time interval (in seconds) for HoldTimer proposed by the peer.";
481 leaf four-octet-as-capability {
482 description "The BGP peer 4 byte AS numbers support capability.";
487 leaf bgp-extended-message-capability {
488 description "The bgp extended message support capability.";
494 description "BGP graceful restart support capability.";
499 leaf add-path-capability {
504 list advertized-table-types {
505 description "The BGP Table-type capabilities advertized by the BGP peer.";
507 description "Address Family Identifier.";
512 description "Subsequent Address Family Identifier.";
521 augment "/config:modules/config:module/config:state" {
523 when "/config:modules/config:module/config:type = 'bgp-peer'";
525 rpcx:rpc-context-instance "peer-rpc";
527 container bgp-peer-state {
531 description "The table name - composed of AFI and SAFI.";
536 description "The total number of routes in table.";
542 leaf session-established-count {
543 description "The total number of time the BGP session was transitioned to Up state.";
549 container bgp-session-state {
552 description "The BGP peer connection state.";
556 leaf session-duration {
557 description "The session duration (time formated d:HH:mm:ss).";
561 leaf holdtime-current {
562 description "Time interval (in seconds) for HoldTimer established with the peer.";
567 leaf keepalive-current {
568 description "Time interval (in seconds) for KeepAlive established with the peer.";
573 container speaker-preferences {
574 description "The BGP speaker preferences, to which this BGP peer is connected.";
578 container peer-preferences {
579 description "The BGP peer preferences.";
583 container messages-stats {
584 description "The BGP messages statistics.";
585 container total-msgs {
586 description "The statistics for all received/sent BGP messages.";
590 container keep-alive-msgs {
591 description "The statistics for received/sent BGP Keep-Alive messages.";
595 container update-msgs {
596 description "The statistics for received/sent BGP Update messages.";
600 container error-msgs {
601 container error-received {
602 description "The received BGP Error (notification) messages statistics.";
607 container error-sent {
608 description "The sent BGP Error (notification) messages statistics.";
619 description "Restart the session between BGP peers";
621 uses rpcx:rpc-context-ref {
622 refine context-instance {
623 rpcx:rpc-context-instance peer-rpc;
630 description "Reset the BGP peer statistics.";
632 uses rpcx:rpc-context-ref {
633 refine context-instance {
634 rpcx:rpc-context-instance peer-rpc;
641 base config:module-type;
642 config:provided-service bgprib:rib;
643 config:provided-service rib-instance;
644 config:java-name-prefix RIBImpl;
647 augment "/config:modules/config:module/config:configuration" {
649 when "/config:modules/config:module/config:type = 'rib-impl'";
651 container extensions {
652 uses config:service-ref {
655 config:required-identity ribspi:consumer-extensions;
660 container bgp-dispatcher {
661 uses config:service-ref {
664 config:required-identity bgp-dispatcher;
669 container session-reconnect-strategy {
670 uses config:service-ref {
673 config:required-identity pf:reconnect-strategy-factory;
678 container tcp-reconnect-strategy {
679 uses config:service-ref {
682 config:required-identity pf:reconnect-strategy-factory;
687 container data-provider {
688 uses config:service-ref {
691 config:required-identity mdsb:binding-async-data-broker;
696 container codec-tree-factory {
697 uses config:service-ref {
700 config:required-identity mdsb:binding-codec-tree-factory;
705 container dom-data-provider {
706 uses config:service-ref {
709 config:required-identity sal:dom-async-data-broker;
714 container openconfig-provider {
715 uses config:service-ref {
718 config:required-identity bgp-oc-spi:bgp-openconfig-provider;
724 description "Our local AS number. Needed by best selection path attribute.";
730 description "Our local BGP identifier. Needed by best selection path attribute.";
732 type inet:ipv4-address;
736 uses config:service-ref {
739 config:required-identity bgp-table-type;
745 description "Identifier of this RIB in local data store.";
751 description "IBGP identifier. Needed by route reflection.";
752 reference "https://tools.ietf.org/html/rfc4456#section-7";
753 type inet:ipv4-address;