namespace "urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl";
prefix "bgprib-impl";
- import bgp-listener { prefix bgpl; revision-date 2013-04-09; }
+ import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
+ import bgp-rib { prefix rib; revision-date 2013-09-25; }
+ import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
import config-bgp-rib { prefix bgprib; revision-date 2013-07-01; }
import config-bgp-parser-spi { prefix bgpspi; revision-date 2013-11-15; }
import config-bgp-rib-spi { prefix ribspi; revision-date 2013-11-15; }
+ import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
import opendaylight-md-sal-binding {prefix mdsb; revision-date 2013-10-28; }
import netty { prefix netty; revision-date 2013-11-19; }
- import reconnect-strategy { prefix rs; revision-date 2013-11-09; }
import config { prefix config; revision-date 2013-04-05; }
+ import protocol-framework { prefix pf; revision-date 2014-03-13; }
+ import odl-tcpmd5-cfg { prefix tcpmd5; revision-date 2014-04-27; }
+ import odl-tcpmd5-netty-cfg { prefix tcpmd5n; revision-date 2014-04-27; }
organization "Cisco Systems, Inc.";
BGP listener implementation.
Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
-
+
This program and the accompanying materials are made available
- under the terms of the Eclipse Public License v1.0 which
- accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html";
+ under the terms of the Eclipse Public License v1.0 which
+ accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html";
revision "2013-04-09" {
description
identity base-bgp-parser {
base config:module-type;
config:java-name-prefix BaseBGPParser;
+ config:provided-service bgpspi:extension;
}
augment "/config:modules/config:module/config:configuration" {
case base-bgp-parser {
when "/config:modules/config:module/config:type = 'base-bgp-parser'";
+ }
+ }
+
+ identity bgp-dispatcher {
+ description
+ "Service representing a BGP Dispatcher.";
+
+ base "config:service-type";
+ config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
+ }
+
+ identity bgp-dispatcher-impl {
+ base config:module-type;
+ config:provided-service bgp-dispatcher;
+ config:java-name-prefix BGPDispatcherImpl;
+ }
+
+ augment "/config:modules/config:module/config:configuration" {
+ case bgp-dispatcher-impl {
+ when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
container bgp-extensions {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity bgpspi:extensions;
+ config:required-identity bgpspi:consumer-extensions;
+ }
+ }
+ }
+
+ container timer {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity netty:netty-timer;
+ }
+ }
+ }
+
+ container boss-group {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity netty:netty-threadgroup;
+ }
+ }
+ }
+
+ container worker-group {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity netty:netty-threadgroup;
+ }
+ }
+ }
+
+ container md5-channel-factory {
+ uses config:service-ref {
+ refine type {
+ mandatory false;
+ config:required-identity tcpmd5n:md5-channel-factory;
+ }
+ }
+ }
+
+ container md5-server-channel-factory {
+ uses config:service-ref {
+ refine type {
+ mandatory false;
+ config:required-identity tcpmd5n:md5-server-channel-factory;
}
}
}
}
}
- identity bgp-rib-extensions-impl {
+ identity base-bgp-rib {
base config:module-type;
- config:provided-service ribspi:extensions;
- config:java-name-prefix RIBExtensionsImpl;
+ config:provided-service ribspi:extension;
+ config:java-name-prefix BaseBGPRIB;
}
augment "/config:modules/config:module/config:configuration" {
- case bgp-rib-extensions-impl {
- when "/config:modules/config:module/config:type = 'bgp-rib-extensions-impl'";
+ case base-bgp-rib {
+ when "/config:modules/config:module/config:type = 'base-bgp-rib'";
}
}
- identity bgp-proposal {
+ identity rib-instance {
description
- "Service representing a BGP proposal.";
+ "Service representing a RIB instance";
base "config:service-type";
- config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionProposal";
+ config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
}
- identity bgp-proposal-impl {
- base config:module-type;
- config:provided-service bgp-proposal;
- config:java-name-prefix BGPSessionProposalImpl;
+ identity bgp-peer-registry {
+ description
+ "Registry of BGP peers. Every new BGP in/out connection looks for peers to handle bgp messages in this registry";
+
+ base "config:service-type";
+ config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry";
}
- augment "/config:modules/config:module/config:configuration" {
- case bgp-proposal-impl {
- when "/config:modules/config:module/config:type = 'bgp-proposal-impl'";
+ identity strict-bgp-peer-registry {
+ description
+ "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";
- leaf holdtimer {
- type int16;
- default 180;
- }
+ config:provided-service bgp-peer-registry;
+ base config:module-type;
+ config:java-name-prefix StrictBgpPeerRegistry;
+ }
- leaf bgp-id {
- mandatory true;
- type string;
- }
- leaf as-number {
- mandatory true;
- type int32;
- }
+ augment "/config:modules/config:module/config:configuration" {
+ case strict-bgp-peer-registry {
+ when "/config:modules/config:module/config:type = 'strict-bgp-peer-registry'";
}
}
- identity bgp-dispatcher {
+ identity bgp-peer {
description
- "Service representing a BGP Dispatcher.";
+ "BGP peer instance.";
- base "config:service-type";
- config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher";
+ base config:module-type;
+ config:java-name-prefix BGPPeer;
}
- identity bgp-dispatcher-impl {
+ identity bgp-peer-acceptor {
+ description
+ "BGP peer acceptor that handles incomming bgp connections. Uses BGP peer registry to accept or decline incomming connections";
+
base config:module-type;
- config:provided-service bgp-dispatcher;
- config:java-name-prefix BGPDispatcherImpl;
+ config:java-name-prefix BGPPeerAcceptor;
}
- augment "/config:modules/config:module/config:configuration" {
- case bgp-dispatcher-impl {
- when "/config:modules/config:module/config:type = 'bgp-dispatcher-impl'";
+ augment "/config:modules/config:module/config:configuration" {
+ case bgp-peer-acceptor {
+ when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
- container bgp-extensions {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity bgpspi:consumer-extensions;
- }
- }
+ leaf binding-address {
+ description "IP address to bind to";
+ type inet:ip-address;
+ default "0.0.0.0";
}
-
- container boss-group {
+
+ leaf binding-port {
+ description "Port to bind to";
+ type inet:port-number;
+ default "179";
+ }
+
+ container bgp-dispatcher {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity netty:netty-threadgroup;
+ config:required-identity bgp-dispatcher;
}
}
}
-
- container worker-group {
+
+ container peer-registry {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity netty:netty-threadgroup;
+ config:required-identity bgp-peer-registry;
}
}
}
}
}
- identity bgp-impl {
+ identity bgp-table-type {
+ description
+ "Service representing a AFI/SAFI pair";
+
+ base "config:service-type";
+ config:java-class "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType";
+ }
+
+ identity bgp-table-type-impl {
+ description
+ "Simple provider for bgp-table-type.";
+
+ config:provided-service bgp-table-type;
base config:module-type;
- config:provided-service bgpl:listener;
- config:java-name-prefix BGPImpl;
+ config:java-name-prefix BGPTableTypeImpl;
+ }
+
+ augment "/config:modules/config:module/config:configuration" {
+ case bgp-table-type-impl {
+ when "/config:modules/config:module/config:type = 'bgp-table-type-impl'";
+ leaf afi {
+ type identityref {
+ base bgp-t:address-family;
+ }
+ mandatory true;
+ }
+ leaf safi {
+ type identityref {
+ base bgp-t:subsequent-address-family;
+ }
+ mandatory true;
+ }
+ }
}
augment "/config:modules/config:module/config:configuration" {
- case bgp-impl {
- when "/config:modules/config:module/config:type = 'bgp-impl'";
+ case bgp-peer {
+ when "/config:modules/config:module/config:type = 'bgp-peer'";
- container bgp-dispatcher {
+ leaf host {
+ description "Remote host IP address";
+ type inet:ip-address;
+ mandatory true;
+ }
+
+ leaf port {
+ description "Remote host port";
+ type inet:port-number;
+ default 179;
+ }
+
+ leaf holdtimer {
+ type int16;
+ default 180;
+ }
+
+ leaf initiate-connection {
+ description "If true, connection will be initiated right away from current device.
+ If not, the peer will only be registered to peer registry and available for incomming bgp connections.";
+ type boolean;
+ default true;
+ }
+
+ list advertized-table {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity bgp-dispatcher;
+ config:required-identity bgp-table-type;
}
}
}
- container bgp-proposal {
+ leaf remote-as {
+ description
+ "Expected remote AS number. If not present, it is assumed
+ to be the same as our local AS number.";
+ type uint32;
+ }
+
+ leaf password {
+ type tcpmd5:rfc2385-key;
+ description "RFC2385 shared secret";
+ }
+
+ container rib {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity bgp-proposal;
+ config:required-identity rib-instance;
}
}
}
- leaf host {
- mandatory true;
- type string;
- }
-
- leaf port {
- mandatory true;
- type uint16;
+ container peer-registry {
+ description "BGP peer registry where current instance of BGP peer will be registered.";
+ uses config:service-ref {
+ refine type {
+ // FIXME backwards compatibility. If not configured, GLOBAL instance is used
+ mandatory false;
+ config:required-identity bgp-peer-registry;
+ }
+ }
}
}
}
identity rib-impl {
base config:module-type;
config:provided-service bgprib:rib;
+ config:provided-service rib-instance;
config:java-name-prefix RIBImpl;
}
-
augment "/config:modules/config:module/config:configuration" {
case rib-impl {
when "/config:modules/config:module/config:type = 'rib-impl'";
- container bgp {
+ container extensions {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity bgpl:listener;
+ config:required-identity ribspi:consumer-extensions;
}
}
}
- container extensions {
+ container bgp-dispatcher {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity ribspi:consumer-extensions;
+ config:required-identity bgp-dispatcher;
}
}
}
-
+
container session-reconnect-strategy {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity rs:reconnect-strategy;
+ config:required-identity pf:reconnect-strategy-factory;
}
}
- }
-
+ }
+
container tcp-reconnect-strategy {
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity rs:reconnect-strategy;
+ config:required-identity pf:reconnect-strategy-factory;
}
}
}
-
+
container data-provider {
uses config:service-ref {
refine type {
}
}
}
+
+ leaf local-as {
+ description "Our local AS number. Needed by best selection path attribute.";
+ type uint32;
+ mandatory true;
+ }
+
+ leaf bgp-id {
+ description "Our local BGP identifier. Needed by best selection path attribute.";
+ mandatory true;
+ type inet:ipv4-address;
+ }
+
+ list local-table {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity bgp-table-type;
+ }
+ }
+ }
+
+ leaf rib-id {
+ description "Identifier of this RIB in local data store.";
+ type rib:rib-id;
+ mandatory true;
+ }
}
}
}