Merge "Adding AAF configuration"
[oom.git] / kubernetes / aai / charts / aai-champ / resources / config / dynamic / conf / champ-beans.xml
1 <!--
2 # Copyright © 2018 Amdocs, Bell Canada, AT&T
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 -->
16
17 <beans xmlns="http://www.springframework.org/schema/beans"
18 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xmlns:util="http://www.springframework.org/schema/util"
20 xsi:schemaLocation="
21        http://www.springframework.org/schema/beans
22        http://www.springframework.org/schema/beans/spring-beans.xsd
23        http://www.springframework.org/schema/util
24        http://www.springframework.org/schema/util/spring-util.xsd
25        ">
26
27     <!-- Event publisher to pass to the Champ library for logging raw graph
28          events (Kafka implementation). -->
29     <bean id="champEventPublisher" class="org.onap.aai.event.client.KafkaEventPublisher" >
30         <constructor-arg name="hosts" value="message-router-kafka.{{.Release.Namespace}}:9092" />
31         <constructor-arg name="topic" value="champRawEvents" />
32     </bean>
33
34     <!-- Graph Implementation Configuration-->
35     <util:map id="props" map-class="java.util.HashMap" key-type="java.lang.String" value-type="java.lang.Object">
36         <entry key="champcore.event.stream.buffer.capacity" value="50" value-type="java.lang.Integer"/>
37         <entry key="champcore.event.stream.publisher-pool-size" value="10" value-type="java.lang.Integer"/>
38         <entry key="champcore.event.stream.publisher" value-ref="champEventPublisher"/>
39
40         <entry key="graph.name" value="aaigraph"/>
41         <entry key="storage.backend" value="cassandra"/>
42         <entry key="storage.cassandra.read-consistency-level" value="LOCAL_QUORUM"/>
43         <entry key="storage.cassandra.write-consistency-level" value="LOCAL_QUORUM"/>
44         <entry key="storage.cassandra.replication-factor" value="3"/>
45         <entry key="storage.cassandra.replication-strategy-class" value="org.apache.cassandra.locator.SimpleStrategy"/>
46
47         {{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}}
48         {{- $global := . }}
49         <entry key="storage.hostname" value="{{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-{{$global.Values.global.cassandra.serviceName}}-{{ $i }}.{{$global.Values.global.cassandra.serviceName}},{{- end }}"/>
50     </util:map>
51
52     <!-- Janus Implementation -->
53     <bean id="graphBuilder" class="org.onap.aai.champjanus.graph.impl.JanusChampGraphImpl$Builder">
54         <constructor-arg value="aaigraph"/>
55         <constructor-arg ref="props" />
56     </bean>
57
58     <bean id="graphImpl" class="org.onap.aai.champjanus.graph.impl.JanusChampGraphImpl">
59         <constructor-arg ref="graphBuilder" />
60     </bean>
61
62     <bean id="champUUIDService" class="org.onap.champ.service.ChampUUIDService" >
63         <constructor-arg name="graphImpl" ref="graphImpl" />
64     </bean>
65
66     <bean id="cache" class="org.onap.champ.service.ChampTransactionCache" >
67         <constructor-arg name="txTimeOutInSec" value="600" />
68         <constructor-arg name="graphImpl" ref="graphImpl" />
69     </bean>
70
71     <bean id="champDataService" class="org.onap.champ.service.ChampDataService" >
72         <constructor-arg name="champUUIDService" ref="champUUIDService" />
73         <constructor-arg name="graphImpl" ref="graphImpl" />
74         <constructor-arg name="cache" ref="cache" />
75     </bean>
76
77     <bean id="champRestService" class="org.onap.champ.ChampRESTAPI" >
78         <constructor-arg name="champDataService" ref="champDataService" />
79         <constructor-arg name="champAsyncRequestProcessor"><null/></constructor-arg>
80     </bean>
81 </beans>