Merge "Updated OLM module to support 7.1 devices"
[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   <reference id="bindingDOMCodecServices" interface="org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices" />
26   <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
27   <reference id="rpcService" interface="org.opendaylight.mdsal.binding.api.RpcProviderService"/>
28   <reference id="notificationPublishService" interface="org.opendaylight.mdsal.binding.api.NotificationPublishService"/>
29   <reference id="portMapping" interface="org.opendaylight.transportpce.common.mapping.PortMapping"/>
30
31   <bean id="pceServiceImpl"
32         class="org.opendaylight.transportpce.pce.service.PathComputationServiceImpl"
33         init-method="init" destroy-method="close">
34     <argument ref="networkTransactionImpl"/>
35     <argument ref="notificationPublishService" />
36     <argument ref="gnpyConsumer" />
37     <argument ref="portMapping" />
38   </bean>
39
40   <bean id="gnpyConsumer"
41         class="org.opendaylight.transportpce.pce.gnpy.consumer.GnpyConsumerImpl">
42      <argument value="${url}"/>
43      <argument value="${username}"/>
44      <argument value="${password}"/>
45      <argument ref="bindingDOMCodecServices" />
46   </bean>
47
48   <bean id="provider"
49         class="org.opendaylight.transportpce.pce.impl.PceProvider"
50         init-method="init" destroy-method="close">
51     <argument ref="rpcService" />
52     <argument ref="pceServiceImpl" />
53   </bean>
54
55   <service ref="pceServiceImpl"
56         interface="org.opendaylight.transportpce.pce.service.PathComputationService"/>
57
58 </blueprint>