GNPy client refactor
[transportpce.git] / pce / src / main / resources / OSGI-INF / blueprint / pce-blueprint.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4 Copyright © 2017 Orange and others. All rights reserved.
5
6 This program and the accompanying materials are made available under the
7 terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 and is available at http://www.eclipse.org/legal/epl-v10.html
9
10 Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
11 -->
12 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
13   xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
14   xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
15   odl:use-default-for-reference-types="true">
16     <cm:property-placeholder persistent-id="org.opendaylight.transportpce.pce" update-strategy="reload">
17         <cm:default-properties>
18             <cm:property name="url" value="http://127.0.0.1:8008" />
19             <cm:property name="username" value="gnpy" />
20             <cm:property name="password" value="gnpy" />
21         </cm:default-properties>
22     </cm:property-placeholder>
23
24   <reference id="networkTransactionImpl" interface="org.opendaylight.transportpce.common.network.NetworkTransactionService" />
25
26   <reference id="bindingDOMCodecServices" interface="org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices" />
27
28
29   <reference id="dataBroker"
30         interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
31
32   <reference id="rpcService"
33         interface="org.opendaylight.mdsal.binding.api.RpcProviderService"/>
34
35   <reference id="notificationPublishService"
36         interface="org.opendaylight.mdsal.binding.api.NotificationPublishService"/>
37
38   <bean id="pceServiceImpl"
39         class="org.opendaylight.transportpce.pce.service.PathComputationServiceImpl"
40         init-method="init" destroy-method="close">
41     <argument ref="networkTransactionImpl"/>
42     <argument ref="notificationPublishService" />
43     <argument ref="gnpyConsumer" />
44   </bean>
45
46   <bean id="gnpyConsumer"
47         class="org.opendaylight.transportpce.pce.gnpy.consumer.GnpyConsumerImpl">
48      <argument value="${url}"/>
49      <argument value="${username}"/>
50      <argument value="${password}"/>
51      <argument ref="bindingDOMCodecServices" />
52   </bean>
53
54   <bean id="provider"
55         class="org.opendaylight.transportpce.pce.impl.PceProvider"
56         init-method="init" destroy-method="close">
57     <argument ref="rpcService" />
58     <argument ref="pceServiceImpl" />
59   </bean>
60
61   <service ref="pceServiceImpl"
62         interface="org.opendaylight.transportpce.pce.service.PathComputationService"/>
63
64 </blueprint>