1 <?xml version="1.0" encoding="utf-8"?>
3 ============LICENSE_START=======================================================
5 ================================================================================
6 Copyright (C) 2017 ONAP Intellectual Property. All rights
8 ================================================================================
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ============LICENSE_END=========================================================
23 <beans xmlns="http://www.springframework.org/schema/beans"
24 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25 xsi:schemaLocation="http://www.springframework.org/schema/beans
26 http://www.springframework.org/schema/beans/spring-beans.xsd">
30 <bean id="rm.dataSource" class="org.openecomp.sdnc.util.db.DataSourceWrap">
31 <property name="dataSource" ref="dblib.dataSource" />
34 <bean id="lock.dataSource" class="org.openecomp.sdnc.util.db.CachedDataSourceWrap">
35 <property name="dataSource" ref="rm.dataSource" />
38 <bean id="rm.jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
39 <property name="dataSource" ref="rm.dataSource" />
42 <bean id="lock.jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
43 <property name="dataSource" ref="lock.dataSource" />
46 <!-- Utils Configuration -->
48 <bean id="speedUtil" class="org.openecomp.sdnc.util.speed.SpeedUtil">
49 <property name="unitFactor" value="1000" />
52 <!-- Resource Lock Configuration -->
54 <bean id="resourceLockDao" class="org.openecomp.sdnc.lock.dao.ResourceLockDaoImpl">
55 <property name="jdbcTemplate" ref="lock.jdbcTemplate" />
58 <bean id="lockHelper" class="org.openecomp.sdnc.lock.comp.LockHelperImpl">
59 <property name="resourceLockDao" ref="resourceLockDao" />
60 <property name="retryCount" value="10" />
61 <property name="lockWait" value="5" /> <!-- Seconds -->
64 <!-- RM Configuration -->
66 <bean id="resourceJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceJdbcDaoImpl">
67 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
70 <bean id="allocationItemJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.AllocationItemJdbcDaoImpl">
71 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
74 <bean id="resourceLoadJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceLoadJdbcDaoImpl">
75 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
78 <bean id="resourceDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceDaoImpl">
79 <property name="resourceJdbcDao" ref="resourceJdbcDao" />
80 <property name="allocationItemJdbcDao" ref="allocationItemJdbcDao" />
81 <property name="resourceLoadJdbcDao" ref="resourceLoadJdbcDao" />
84 <bean id="resourceManager" class="org.openecomp.sdnc.rm.comp.ResourceManagerImpl">
85 <property name="lockHelper" ref="lockHelper" />
86 <property name="resourceDao" ref="resourceDao" />
87 <property name="applicationId" value="SDNC" />
88 <property name="lockTimeout" value="600" /> <!-- Seconds -->
91 <!-- Equipment DAO Configuration -->
93 <bean id="serverDao" class="org.openecomp.sdnc.ra.equip.dao.ServerDaoImpl">
94 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
97 <bean id="vpePortDao" class="org.openecomp.sdnc.ra.equip.dao.VpePortDaoImpl">
98 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
101 <bean id="vplspePortDao" class="org.openecomp.sdnc.ra.equip.dao.VplspePortDaoImpl">
102 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
105 <!-- Rule DAO Configuration -->
107 <bean id="parameterDao" class="org.openecomp.sdnc.ra.rule.dao.ParameterDaoImpl">
108 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
111 <bean id="maxPortSpeedDao" class="org.openecomp.sdnc.ra.rule.dao.MaxPortSpeedDaoImpl">
112 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
113 <property name="speedUtil" ref="speedUtil" />
116 <bean id="maxServerSpeedDao" class="org.openecomp.sdnc.ra.rule.dao.MaxServerSpeedDaoImpl">
117 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
118 <property name="speedUtil" ref="speedUtil" />
121 <bean id="resourceRuleDao" class="org.openecomp.sdnc.ra.rule.dao.ResourceRuleDaoImpl">
122 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
125 <bean id="rangeRuleDao" class="org.openecomp.sdnc.ra.rule.dao.RangeRuleDaoImpl">
126 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
129 <bean id="vpeLockDao" class="org.openecomp.sdnc.ra.rule.dao.VpeLockDaoImpl">
130 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
133 <!-- Service DAO Configuration -->
135 <bean id="serviceResourceDao" class="org.openecomp.sdnc.ra.service.dao.ServiceResourceDaoImpl">
136 <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
139 <!-- ResourceAllocator Configuration -->
141 <bean id="allocationRequestBuilder"
142 class="org.openecomp.sdnc.ra.rule.comp.AllocationRequestBuilderImpl">
143 <property name="resourceRuleDao" ref="resourceRuleDao" />
144 <property name="rangeRuleDao" ref="rangeRuleDao" />
147 <bean id="resourceAllocator" class="org.openecomp.sdnc.ra.ResourceAllocator">
148 <property name="speedUtil" ref="speedUtil" />
149 <property name="parameterDao" ref="parameterDao" />
150 <property name="serverDao" ref="serverDao" />
151 <property name="vpePortDao" ref="vpePortDao" />
152 <property name="vplspePortDao" ref="vplspePortDao" />
153 <property name="maxPortSpeedDao" ref="maxPortSpeedDao" />
154 <property name="maxServerSpeedDao" ref="maxServerSpeedDao" />
155 <property name="serviceResourceDao" ref="serviceResourceDao" />
156 <property name="allocationRequestBuilder" ref="allocationRequestBuilder" />
157 <property name="resourceManager" ref="resourceManager" />
158 <property name="endPointAllocator" ref="endPointAllocator" />
161 <!-- EndPointAllocator Configuration -->
163 <bean id="endPointAllocator" class="org.openecomp.sdnc.ra.comp.EndPointAllocatorImpl">
164 <property name="resourceManager" ref="resourceManager" />
165 <property name="endPointAllocationDefinitionMap">
167 <entry key="L3AVPN-PORT">
169 <bean class="org.openecomp.sdnc.ra.comp.EndPointAllocationDefinition">
170 <property name="serviceModel" value="L3AVPN-PORT" />
171 <property name="endPointPosition" value="VPE-Cust" />
172 <property name="equipmentReader" ref="vpePortReader" />
173 <property name="equipmentCheckList">
175 <ref bean="provStatusCheck" />
176 <ref bean="excludeVpeCheck" />
177 <ref bean="anyVrfPresentCheck" />
180 <property name="preferenceRuleList">
182 <ref bean="affinityLinkPref" />
185 <property name="allocationRuleList">
187 <ref bean="dbAllocationRule" />
188 <ref bean="affinityAllocationRule" />
194 <entry key="L3AVPN-EVC">
196 <bean class="org.openecomp.sdnc.ra.comp.EndPointAllocationDefinition">
197 <property name="serviceModel" value="L3AVPN-EVC" />
198 <property name="endPointPosition" value="VPE-Cust" />
199 <property name="equipmentReader" ref="vpePortReader" />
200 <property name="equipmentCheckList">
202 <ref bean="vlanSpeedCheck" />
203 <ref bean="provStatusCheck" />
204 <ref bean="excludeVpeCheck" />
205 <ref bean="vpeLockCheck" />
206 <ref bean="anyVrfPresentCheck" />
207 <ref bean="oneMVrfCheck" />
208 <ref bean="hubWithRgCheck" />
211 <property name="preferenceRuleList">
213 <ref bean="affinityLinkPref" />
216 <property name="allocationRuleList">
218 <ref bean="dbAllocationRule" />
219 <ref bean="vrfAllocationRule" />
220 <ref bean="servingSiteAllocationRule" />
221 <ref bean="affinityAllocationRule" />
231 <!-- Equipment Readers Configuration -->
233 <bean id="vpePortReader" class="org.openecomp.sdnc.ra.reader.VpePortReader">
234 <property name="vpePortDao" ref="vpePortDao" />
237 <bean id="vnfReader" class="org.openecomp.sdnc.ra.reader.VnfReader">
240 <bean id="aicSiteReader" class="org.openecomp.sdnc.ra.reader.AicSiteReader">
243 <bean id="uplinkCircuitReader" class="org.openecomp.sdnc.ra.reader.UplinkCircuitReader">
246 <!-- Equipment Checks Configuration -->
248 <bean id="vlanSpeedCheck" class="org.openecomp.sdnc.ra.check.VlanSpeedCheck">
251 <bean id="provStatusCheck" class="org.openecomp.sdnc.ra.check.ProvStatusCheck">
254 <bean id="excludeVpeCheck" class="org.openecomp.sdnc.ra.check.ExcludeVpeCheck">
257 <bean id="vpeLockCheck" class="org.openecomp.sdnc.ra.check.VpeLockCheck">
258 <property name="vpeLockDao" ref="vpeLockDao" />
259 <property name="resourceManager" ref="resourceManager" />
262 <bean id="anyVrfPresentCheck" class="org.openecomp.sdnc.ra.check.AnyVrfPresentCheck">
263 <property name="resourceManager" ref="resourceManager" />
266 <bean id="oneMVrfCheck" class="org.openecomp.sdnc.ra.check.OneMVrfCheck">
267 <property name="resourceManager" ref="resourceManager" />
270 <bean id="hubWithRgCheck" class="org.openecomp.sdnc.ra.check.HubWithRgCheck">
271 <property name="resourceManager" ref="resourceManager" />
274 <!-- Preference Rule Configuration -->
276 <bean id="affinityLinkPref" class="org.openecomp.sdnc.ra.pref.AffinityLinkPref">
277 <property name="resourceManager" ref="resourceManager" />
280 <!-- Resource Allocation Rule Configuration -->
282 <bean id="dbAllocationRule" class="org.openecomp.sdnc.ra.alloc.DbAllocationRule">
283 <property name="resourceRuleDao" ref="resourceRuleDao" />
284 <property name="rangeRuleDao" ref="rangeRuleDao" />
287 <bean id="vrfAllocationRule" class="org.openecomp.sdnc.ra.alloc.VrfAllocationRule">
290 <bean id="servingSiteAllocationRule" class="org.openecomp.sdnc.ra.alloc.ServingSiteAllocationRule">
293 <bean id="affinityAllocationRule" class="org.openecomp.sdnc.ra.alloc.AffinityAllocationRule">