GNPy client refactor
[transportpce.git] / pce / src / main / resources / OSGI-INF / blueprint / pce-blueprint.xml
index 4f85558d7cf229e7184b78e6485890904779f453..2b7415a72870f9403aaf85bf373953fba1a6f61c 100755 (executable)
@@ -11,7 +11,15 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
 -->
 <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.pce" update-strategy="reload">
+        <cm:default-properties>
+            <cm:property name="url" value="http://127.0.0.1:8008" />
+            <cm:property name="username" value="gnpy" />
+            <cm:property name="password" value="gnpy" />
+        </cm:default-properties>
+    </cm:property-placeholder>
 
   <reference id="networkTransactionImpl" interface="org.opendaylight.transportpce.common.network.NetworkTransactionService" />
 
@@ -32,7 +40,15 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
         init-method="init" destroy-method="close">
     <argument ref="networkTransactionImpl"/>
     <argument ref="notificationPublishService" />
-    <argument ref="bindingDOMCodecServices" />
+    <argument ref="gnpyConsumer" />
+  </bean>
+
+  <bean id="gnpyConsumer"
+        class="org.opendaylight.transportpce.pce.gnpy.consumer.GnpyConsumerImpl">
+     <argument value="${url}"/>
+     <argument value="${username}"/>
+     <argument value="${password}"/>
+     <argument ref="bindingDOMCodecServices" />
   </bean>
 
   <bean id="provider"