Register L2VPN EVPN AFI/SAFI
[bgpcep.git] / bgp / rib-impl / src / main / resources / org / opendaylight / blueprint / bgp-rib.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
3            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0">
4
5   <reference id="BGPExtensionContext" interface="org.opendaylight.protocol.bgp.parser.spi.BGPExtensionConsumerContext"/>
6   <reference id="globalBossGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-boss-group"/>
7   <reference id="globalWorkerGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-worker-group"/>
8   <reference id="clusterSingletonServiceProvider" interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
9
10   <bean id="BGPDispatcher" class="org.opendaylight.protocol.bgp.rib.impl.BGPDispatcherImpl"  destroy-method="close">
11     <argument>
12       <bean factory-ref="BGPExtensionContext" factory-method="getMessageRegistry"/>
13     </argument>
14     <argument ref="globalBossGroup"/>
15     <argument ref="globalWorkerGroup"/>
16   </bean>
17
18   <service ref="BGPDispatcher" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher">
19     <!-- The following service properties specify the config system module and instance that correspond to
20          this OSGi service which enables the config system module to be restarted when this blueprint
21          container is restarted. -->
22     <service-properties>
23       <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"/>
24       <entry key="config-module-name" value="bgp-dispatcher-impl"/>
25       <entry key="config-instance-name" value="global-bgp-dispatcher"/>
26     </service-properties>
27   </service>
28
29   <bean id="BGPPeerRegistry" class="org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry"
30           factory-method="instance" destroy-method="close"/>
31
32   <service ref="BGPPeerRegistry" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry"
33           odl:type="default">
34     <!-- The following service properties specify the config system module and instance that correspond to
35          this OSGi service which enables the config system module to be restarted when this blueprint
36          container is restarted. -->
37     <service-properties>
38       <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"/>
39       <entry key="config-module-name" value="strict-bgp-peer-registry"/>
40       <entry key="config-instance-name" value="global-bgp-peer-registry"/>
41     </service-properties>
42   </service>
43
44   <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" odl:type="pingpong"/>
45   <reference id="globalBgpExtensions" interface="org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext"/>
46   <reference id="codecTreeFactory" interface="org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory"/>
47   <reference id="domDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker" odl:type="pingpong"/>
48   <reference id="bgpOpenConfigMappingService" interface="org.opendaylight.protocol.bgp.openconfig.spi.BGPOpenConfigMappingService"/>
49   <reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService"/>
50   <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"/>
51
52   <bean id="bgpDeployer" class="org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl"  destroy-method="close">
53     <argument value="global-bgp"/>
54     <argument ref="blueprintContainer"/>
55     <argument ref="blueprintBundleContext"/>
56     <argument ref="dataBroker"/>
57     <argument ref="bgpOpenConfigMappingService"/>
58   </bean>
59
60   <service ref="bgpDeployer" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BgpDeployer"/>
61
62   <bean id="ribImpl" class="org.opendaylight.protocol.bgp.rib.impl.config.RibImpl" scope="prototype">
63     <argument ref="clusterSingletonServiceProvider"/>
64     <argument ref="globalBgpExtensions"/>
65     <argument ref="BGPDispatcher"/>
66     <argument ref="codecTreeFactory"/>
67     <argument ref="domDataBroker"/>
68     <argument ref="schemaService"/>
69   </bean>
70
71   <bean id="bgpPeer" class="org.opendaylight.protocol.bgp.rib.impl.config.BgpPeer" scope="prototype">
72     <argument ref="rpcRegistry"/>
73     <argument ref="BGPPeerRegistry"/>
74   </bean>
75
76   <bean id="appPeer" class="org.opendaylight.protocol.bgp.rib.impl.config.AppPeer" scope="prototype"/>
77
78   <reference id="bgpConfigLoader" interface="org.opendaylight.protocol.bgp.config.loader.spi.ConfigLoader"/>
79
80   <bean id="protocolsInitialConfig" class="org.opendaylight.protocol.bgp.rib.impl.ProtocolsConfigFileProcessor" destroy-method="close">
81       <argument ref="bgpConfigLoader"/>
82       <argument ref="bgpDeployer"/>
83   </bean>
84 </blueprint>