blob: e724ef4443e6e5393d8e1667c5131527e2e83b6a [file] [log] [blame]
emaclee9c126612023-04-16 17:48:15 +01001# ============LICENSE_START=======================================================
2# Copyright (C) 2021 Pantheon.tech
3# Modifications Copyright (C) 2021-2022 Bell Canada
danielhanrahan36b81b22023-08-17 14:58:30 +01004# Modifications Copyright (C) 2021-2024 Nordix Foundation
rajesh.kumareb3a8082024-02-23 20:29:59 +05305# Modifications Copyright (C) 2024 TechMahindra Ltd
emaclee9c126612023-04-16 17:48:15 +01006# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19# SPDX-License-Identifier: Apache-2.0
20# ============LICENSE_END=========================================================
21
22server:
23 port: 8080
24
25rest:
26 api:
27 cps-base-path: /cps/api
28 ncmp-base-path: /ncmp
29 ncmp-inventory-base-path: /ncmpInventory
30
31spring:
32 main:
33 banner-mode: "off"
34 application:
35 name: "cps-application"
36 jpa:
37 show-sql: false
38 ddl-auto: create
39 open-in-view: false
40 properties:
egernug186b9012023-09-27 10:49:45 +010041 hibernate.enable_lazy_load_no_trans: true
42 hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
danielhanrahan36b81b22023-08-17 14:58:30 +010043 # Please ensure these values match those used in integration-test/src/test/resources/application.yml
44 hibernate.id.new_generator_mappings: true
45 hibernate.jdbc.batch_size: 100
emaclee9c126612023-04-16 17:48:15 +010046
47 datasource:
48 url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb
49 username: ${DB_USERNAME}
50 password: ${DB_PASSWORD}
51 driverClassName: org.postgresql.Driver
52 hikari:
53 minimumIdle: 5
54 maximumPoolSize: 80
55 idleTimeout: 60000
danielhanrahanbbfb0612024-04-16 22:04:44 +010056 connectionTimeout: 30000
emaclee9c126612023-04-16 17:48:15 +010057 leakDetectionThreshold: 30000
58 pool-name: CpsDatabasePool
59
60 cache:
61 type: caffeine
62 cache-names: yangSchema
63 caffeine:
64 spec: maximumSize=10000,expireAfterAccess=10m
65
66 liquibase:
67 change-log: classpath:changelog/changelog-master.yaml
emacleeea7d1b42024-03-24 19:05:34 +000068 label-filter: ${LIQUIBASE_LABELS}
emaclee9c126612023-04-16 17:48:15 +010069
70 servlet:
71 multipart:
72 enabled: true
73 max-file-size: 100MB
74 max-request-size: 100MB
75
76 kafka:
77 bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}
78 security:
79 protocol: PLAINTEXT
80 producer:
sourabh_sourabha287fc32023-06-15 03:12:29 +010081 value-serializer: io.cloudevents.kafka.CloudEventSerializer
emaclee9c126612023-04-16 17:48:15 +010082 client-id: cps-core
83 consumer:
84 group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group}
85 key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
86 value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
87 properties:
88 spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
sourabh_sourabha287fc32023-06-15 03:12:29 +010089 spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer
emaclee9c126612023-04-16 17:48:15 +010090 spring.json.use.type.headers: false
91
92 jackson:
93 default-property-inclusion: NON_NULL
94 serialization:
95 FAIL_ON_EMPTY_BEANS: false
96 sql:
97 init:
98 mode: ALWAYS
99app:
100 ncmp:
101 async-m2m:
102 topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m}
103 avc:
mpriyankf0f657c2024-05-16 16:35:49 +0100104 cm-subscription-ncmp-in: ${CM_SUBSCRIPTION_NCMP_IN_TOPIC:subscription}
105 cm-subscription-dmi-in: ${CM_SUBSCRIPTION_DMI_IN_TOPIC:ncmp-dmi-cm-avc-subscription}
106 cm-subscription-dmi-out: ${CM_SUBSCRIPTION_DMI_OUT_TOPIC:dmi-ncmp-cm-avc-subscription}
107 cm-subscription-ncmp-out: ${CM_SUBSCRIPTION_NCMP_OUT_TOPIC:subscription-response}
emaclee9c126612023-04-16 17:48:15 +0100108 cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
109 lcm:
110 events:
111 topic: ${LCM_EVENTS_TOPIC:ncmp-events}
112 dmi:
113 cm-events:
114 topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events}
mpriyankf4778802023-07-26 17:33:35 +0100115 device-heartbeat:
116 topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
rajesh.kumareb3a8082024-02-23 20:29:59 +0530117 cps:
118 data-updated:
mpriyankf7873bd2024-05-07 15:33:19 +0100119 change-event-notifications-enabled: ${CPS_CHANGE_EVENT_NOTIFICATIONS_ENABLED:true}
rajesh.kumareb3a8082024-02-23 20:29:59 +0530120 topic: ${CPS_CHANGE_EVENT_TOPIC:cps-data-updated-events}
emaclee9c126612023-04-16 17:48:15 +0100121
mpriyankf7873bd2024-05-07 15:33:19 +0100122
123
emaclee9c126612023-04-16 17:48:15 +0100124notification:
125 enabled: true
emaclee9c126612023-04-16 17:48:15 +0100126 async:
127 executor:
128 core-pool-size: 2
129 max-pool-size: 10
130 queue-capacity: 500
131 wait-for-tasks-to-complete-on-shutdown: true
132 thread-name-prefix: Async-
mpriyank6b0e6b32024-03-08 12:50:53 +0000133 time-out-value-in-ms: 60000
emaclee9c126612023-04-16 17:48:15 +0100134
135springdoc:
136 swagger-ui:
137 disable-swagger-default-url: true
138 urlsPrimaryName: cps-core
139 urls:
140 - name: cps-core
141 url: /api-docs/cps-core/openapi.yaml
142 - name: cps-ncmp
143 url: /api-docs/cps-ncmp/openapi.yaml
144 - name: cps-ncmp-inventory
145 url: /api-docs/cps-ncmp/openapi-inventory.yaml
146
emaclee9c126612023-04-16 17:48:15 +0100147security:
148 # comma-separated uri patterns which do not require authorization
waqas.ikram7a397ca2024-01-25 11:36:16 +0000149 permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/**
emaclee9c126612023-04-16 17:48:15 +0100150 auth:
mpriyank86dd1392024-04-30 10:14:26 +0100151 username: ${CPS_USERNAME:cpsuser}
152 password: ${CPS_PASSWORD:cpsr0cks!}
emaclee9c126612023-04-16 17:48:15 +0100153
154# Actuator
155management:
emaclee9c126612023-04-16 17:48:15 +0100156 endpoints:
157 web:
emaclee9c126612023-04-16 17:48:15 +0100158 exposure:
159 include: info,health,loggers,prometheus
160 endpoint:
161 health:
162 show-details: always
163 # kubernetes probes: liveness and readiness
164 probes:
165 enabled: true
166
167logging:
168 format: json
169 level:
170 org:
171 springframework: INFO
172 onap:
173 cps: INFO
174ncmp:
175 dmi:
waqas.ikram177d66d2023-12-19 15:24:28 +0000176 httpclient:
danielhanrahanbbfb0612024-04-16 22:04:44 +0100177 connectionTimeoutInSeconds: 30
sourabh_sourabhba41fe92024-05-21 12:16:43 +0100178 readTimeoutInSeconds: 30
179 writeTimeoutInSeconds: 30
waqas.ikram177d66d2023-12-19 15:24:28 +0000180 maximumConnectionsTotal: 100
sourabh_sourabh3ad39312024-05-07 12:31:44 +0100181 maximumInMemorySizeInMegabytes: 16
emaclee9c126612023-04-16 17:48:15 +0100182 auth:
mpriyank86dd1392024-04-30 10:14:26 +0100183 username: ${DMI_USERNAME:cpsuser}
184 password: ${DMI_PASSWORD:cpsr0cks!}
mpriyank612fb572023-08-01 15:36:27 +0100185 enabled: ${DMI_AUTH_ENABLED:true}
emaclee9c126612023-04-16 17:48:15 +0100186 api:
187 base-path: dmi
188
189 timers:
190 advised-modules-sync:
191 sleep-time-ms: 5000
192 locked-modules-sync:
193 sleep-time-ms: 300000
194 cm-handle-data-sync:
195 sleep-time-ms: 30000
lukegleeson3c0ea892023-04-06 15:28:56 +0100196 subscription-forwarding:
197 dmi-response-timeout-ms: 30000
198 model-loader:
199 retry-time-ms: 1000
halil.cakalc4485f72023-08-31 11:45:47 +0100200 trust-level:
201 dmi-availability-watchdog-ms: 30000
emaclee9c126612023-04-16 17:48:15 +0100202
203 modules-sync-watchdog:
204 async-executor:
205 parallelism-level: 10
206
207 model-loader:
lukegleeson3c0ea892023-04-06 15:28:56 +0100208 maximum-attempt-count: 20
emaclee9c126612023-04-16 17:48:15 +0100209
210# Custom Hazelcast Config.
211hazelcast:
mpriyank74cf06f2023-04-28 15:02:00 +0100212 cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"}
lukegleeson3c0ea892023-04-06 15:28:56 +0100213 mode:
214 kubernetes:
215 enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false}
waqas.ikram7a397ca2024-01-25 11:36:16 +0000216 service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"}