Extract mastership blueprint service
[openflowplugin.git] / openflowplugin-blueprint-config / src / main / resources / org / opendaylight / blueprint / openflowplugin.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            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
5            odl:use-default-for-reference-types="true">
6
7     <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" odl:type="pingpong"/>
8     <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"/>
9     <reference id="notificationPublishService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"/>
10     <reference id="entityOwnershipService" interface="org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService"/>
11     <reference id="clusterSingletonServiceProvider" interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
12
13     <reference id="defaultSwitchConnProvider" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider"
14                odl:type="openflow-switch-connection-provider-default-impl"/>
15
16     <reference id="legacySwitchConnProvider" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider"
17                odl:type="openflow-switch-connection-provider-legacy-impl"/>
18
19     <reference id="openflowPluginProviderFactory"
20                interface="org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProviderFactory"/>
21
22     <reference id="configurationServiceFactory"
23                interface="org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationServiceFactory"/>
24
25     <reference id="mastershipChangeServiceManagerFactory"
26                interface="org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeServiceManagerFactory"/>
27
28     <odl:clustered-app-config id="openflowProviderConfig"
29                               binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig"/>
30
31     <bean id="configurationService"
32           factory-ref="configurationServiceFactory"
33           factory-method="newInstance"
34           destroy-method="close">
35         <argument ref="openflowProviderConfig" />
36         <argument ref="blueprintBundleContext" />
37         <cm:managed-properties persistent-id="org.opendaylight.openflowplugin"
38                                update-strategy="component-managed"
39                                update-method="update"/>
40     </bean>
41
42     <bean id="mastershipChangeServiceManager"
43           factory-ref="mastershipChangeServiceManagerFactory"
44           factory-method="newInstance"
45           destroy-method="close"
46     />
47
48     <service ref="mastershipChangeServiceManager" interface="org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeServiceManager"/>
49
50     <service ref="configurationService" interface="org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationService"/>
51
52     <bean id="openflowPluginProvider"
53           factory-ref="openflowPluginProviderFactory"
54           factory-method="newInstance"
55           destroy-method="close">
56         <argument ref="configurationService"/>
57         <argument ref="dataBroker"/>
58         <argument ref="rpcRegistry"/>
59         <argument ref="notificationPublishService"/>
60         <argument ref="entityOwnershipService"/>
61         <argument>
62             <list>
63                 <ref component-id="defaultSwitchConnProvider"/>
64                 <ref component-id="legacySwitchConnProvider"/>
65             </list>
66         </argument>
67         <argument ref="clusterSingletonServiceProvider"/>
68         <argument ref="mastershipChangeServiceManager"/>
69     </bean>
70
71     <service ref="openflowPluginProvider" odl:type="openflow-plugin-provider-impl">
72         <interfaces>
73             <value>org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider</value>
74             <value>org.opendaylight.openflowplugin.extension.api.OpenFlowPluginExtensionRegistratorProvider</value>
75         </interfaces>
76     </service>
77
78 </blueprint>