Refactor OLM timers management
[transportpce.git] / olm / src / main / resources / OSGI-INF / blueprint / olm-blueprint.xml
index 1460aec5b4373f53c2fcd780a171dfcbf8fc93f9..10ef220e0edf39425c85d9ed9ca3c5504ff2b4d1 100644 (file)
@@ -9,8 +9,20 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
       xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+      xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
       odl:use-default-for-reference-types="true">
 
+    <cm:property-placeholder persistent-id="org.opendaylight.transportpce.olm" update-strategy="reload">
+        <cm:default-properties>
+            <cm:property name="timer1" value="120000" />
+            <cm:property name="timer2" value="20000" />
+            <!--The following values are used to speed-up tests with simulators without convergence times-->
+            <!--cm:property name="timer1" value="3000" /-->
+            <!--cm:property name="timer2" value="2000" /-->
+        </cm:default-properties>
+    </cm:property-placeholder>
+
+
   <reference id="dataBroker"
         interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
   <reference id="rpcProviderService"
@@ -41,6 +53,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <argument ref="openRoadmInterfaces" />
     <argument ref="crossConnect" />
     <argument ref="deviceTransactionManager" />
+    <argument value="${timer1}"/>
+    <argument value="${timer2}"/>
   </bean>
 
   <bean id="provider"
@@ -52,5 +66,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <service ref="olmPowerServiceImpl"
         interface="org.opendaylight.transportpce.olm.service.OlmPowerService"/>
-
 </blueprint>