config:java-class "org.opendaylight.protocol.bgp.rib.impl.spi.RIB";
}
+ 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";
+ }
+
+ 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";
+
+ config:provided-service bgp-peer-registry;
+ base config:module-type;
+ config:java-name-prefix StrictBgpPeerRegistry;
+ }
+
+
+ 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-peer {
description
"BGP peer instance.";
config:java-name-prefix BGPPeer;
}
+ 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:java-name-prefix BGPPeerAcceptor;
+ }
+
+ augment "/config:modules/config:module/config:configuration" {
+ case bgp-peer-acceptor {
+ when "/config:modules/config:module/config:type = 'bgp-peer-acceptor'";
+
+ leaf binding-address {
+ description "IP address to bind to";
+ type inet:ip-address;
+ default "0.0.0.0";
+ }
+
+ 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 bgp-dispatcher;
+ }
+ }
+ }
+
+ container peer-registry {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity bgp-peer-registry;
+ }
+ }
+ }
+ }
+ }
+
identity bgp-table-type {
description
"Service representing a AFI/SAFI pair";
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 {
}
}
}
+
+ 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;
+ }
+ }
+ }
}
}