GNPy client refactor
[transportpce.git] / pce / src / main / resources / OSGI-INF / blueprint / pce-blueprint.xml
index 93d2fa7be6f21b68c7fa0974517497119574d23a..2b7415a72870f9403aaf85bf373953fba1a6f61c 100755 (executable)
@@ -1,44 +1,64 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!-- vi: set et smarttab sw=4 tabstop=4: -->\r
-<!--\r
-Copyright © 2017 Orange and others. All rights reserved.\r
-\r
-This program and the accompanying materials are made available under the\r
-terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
-and is available at http://www.eclipse.org/legal/epl-v10.html\r
-\r
-Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange\r
--->\r
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"\r
-  xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"\r
-  odl:use-default-for-reference-types="true">\r
-\r
-  <reference id="dataBroker"\r
-        interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"\r
-        odl:type="default"/>\r
-\r
-  <reference id="rpcRegistry"\r
-        interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"/>\r
-\r
-  <reference id="notificationPublishService"\r
-        interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"\r
-        odl:type="default" />\r
-\r
-  <bean id="pceServiceImpl"\r
-        class="org.opendaylight.transportpce.pce.service.PathComputationServiceImpl"\r
-        init-method="init" destroy-method="close">\r
-    <argument ref="dataBroker"/>\r
-    <argument ref="notificationPublishService" />\r
-  </bean>\r
-\r
-  <bean id="provider"\r
-        class="org.opendaylight.transportpce.pce.impl.PceProvider"\r
-        init-method="init" destroy-method="close">\r
-    <argument ref="rpcRegistry" />\r
-    <argument ref="pceServiceImpl" />\r
-  </bean>\r
-\r
-  <service ref="pceServiceImpl"\r
-        interface="org.opendaylight.transportpce.pce.service.PathComputationService"/>\r
-\r
-</blueprint>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2017 Orange and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+
+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" />
+
+  <reference id="bindingDOMCodecServices" interface="org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices" />
+
+
+  <reference id="dataBroker"
+        interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
+
+  <reference id="rpcService"
+        interface="org.opendaylight.mdsal.binding.api.RpcProviderService"/>
+
+  <reference id="notificationPublishService"
+        interface="org.opendaylight.mdsal.binding.api.NotificationPublishService"/>
+
+  <bean id="pceServiceImpl"
+        class="org.opendaylight.transportpce.pce.service.PathComputationServiceImpl"
+        init-method="init" destroy-method="close">
+    <argument ref="networkTransactionImpl"/>
+    <argument ref="notificationPublishService" />
+    <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"
+        class="org.opendaylight.transportpce.pce.impl.PceProvider"
+        init-method="init" destroy-method="close">
+    <argument ref="rpcService" />
+    <argument ref="pceServiceImpl" />
+  </bean>
+
+  <service ref="pceServiceImpl"
+        interface="org.opendaylight.transportpce.pce.service.PathComputationService"/>
+
+</blueprint>