Merge "Technical Debt part 2"
[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="notificationService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationService"/>
10   <reference id="notificationPublishService" interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"/>
11   <reference id="entityOwnershipService" interface="org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService"/>
12
13   <reference id="switchConnProviderFactory"
14           interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProviderFactory"/>
15
16   <!-- Create OF switch connection provider on port 6633 -->
17   <odl:clustered-app-config id="defaultSwitchConnConfig"
18       binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.config.rev160506.SwitchConnectionConfig"
19       list-key-value="openflow-switch-connection-provider-default-impl">
20     <odl:default-config><![CDATA[
21       <switch-connection-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:config">
22         <instance-name>openflow-switch-connection-provider-default-impl</instance-name>
23         <port>6633</port>
24         <transport-protocol>TCP</transport-protocol>
25       </switch-connection-config>
26     ]]></odl:default-config>
27   </odl:clustered-app-config>
28
29   <bean id="defaultSwitchConnProvider" factory-ref="switchConnProviderFactory" factory-method="newInstance">
30     <argument ref="defaultSwitchConnConfig"/>
31   </bean>
32
33   <service ref="defaultSwitchConnProvider" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider"
34           odl:type="openflow-switch-connection-provider-default-impl"/>
35
36   <!-- Create OF switch connection provider on port 6653 -->
37   <odl:clustered-app-config id="legacySwitchConnConfig"
38       binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.config.rev160506.SwitchConnectionConfig"
39       list-key-value="openflow-switch-connection-provider-legacy-impl">
40     <odl:default-config><![CDATA[
41       <switch-connection-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:config">
42         <instance-name>openflow-switch-connection-provider-legacy-impl</instance-name>
43         <port>6653</port>
44         <transport-protocol>TCP</transport-protocol>
45       </switch-connection-config>
46     ]]></odl:default-config>
47   </odl:clustered-app-config>
48
49   <bean id="legacySwitchConnProvider" factory-ref="switchConnProviderFactory" factory-method="newInstance">
50     <argument ref="legacySwitchConnConfig"/>
51   </bean>
52
53   <service ref="legacySwitchConnProvider" interface="org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider"
54           odl:type="openflow-switch-connection-provider-legacy-impl"/>
55
56   <!-- Create OpenflowPluginProvider instance -->
57
58   <odl:clustered-app-config id="openflowProviderConfig"
59       binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig"/>
60
61   <reference id="openflowPluginProviderFactory"
62           interface="org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProviderFactory"/>
63
64   <bean id="openflowPluginProvider" factory-ref="openflowPluginProviderFactory" factory-method="newInstance">
65     <argument ref="openflowProviderConfig"/>
66     <argument ref="dataBroker"/>
67     <argument ref="rpcRegistry"/>
68     <argument ref="notificationService"/>
69     <argument ref="notificationPublishService"/>
70     <argument ref="entityOwnershipService"/>
71     <argument>
72       <list>
73         <ref component-id="defaultSwitchConnProvider"/>
74         <ref component-id="legacySwitchConnProvider"/>
75       </list>
76     </argument>
77     <cm:managed-properties persistent-id="org.opendaylight.openflowplugin"
78                            update-strategy="component-managed"
79                            update-method="update"/>
80   </bean>
81
82   <service ref="openflowPluginProvider" odl:type="openflow-plugin-provider-impl">
83     <interfaces>
84       <value>org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider</value>
85       <value>org.opendaylight.openflowplugin.extension.api.OpenFlowPluginExtensionRegistratorProvider</value>
86     </interfaces>
87   </service>
88
89 </blueprint>