- Added back NCMP tag back as part of the comment in patch https://gerrit.onap.org/r/c/cps/+/129274
- Added parallelism level under ncmp as well.
- Correcting env variable in the docker compose file for local run as
well as the CSITs.
Issue-ID: CPS-1279
Change-Id: I1f2993ac66f47ee2e5e7db0c4a6aac113a714d2a
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
springframework: INFO\r
onap:\r
cps: INFO\r
-\r
-dmi:\r
- auth:\r
- username: ${DMI_USERNAME}\r
- password: ${DMI_PASSWORD}\r
- api:\r
- base-path: dmi\r
-\r
-timers:\r
- advised-modules-sync:\r
- sleep-time-ms: 5000\r
- locked-modules-sync:\r
- sleep-time-ms: 300000\r
- cm-handle-data-sync:\r
- sleep-time-ms: 30000\r
-\r
-modules-sync-watchdog:\r
- async-executor:\r
- parallelism-level: 10
\ No newline at end of file
+ncmp:\r
+ dmi:\r
+ auth:\r
+ username: ${DMI_USERNAME}\r
+ password: ${DMI_PASSWORD}\r
+ api:\r
+ base-path: dmi\r
+\r
+ timers:\r
+ advised-modules-sync:\r
+ sleep-time-ms: 5000\r
+ locked-modules-sync:\r
+ sleep-time-ms: 300000\r
+ cm-handle-data-sync:\r
+ sleep-time-ms: 30000\r
+\r
+ modules-sync-watchdog:\r
+ async-executor:\r
+ parallelism-level: 10
\ No newline at end of file
@Getter
@Component
public static class DmiProperties {
- @Value("${dmi.auth.username}")
+ @Value("${ncmp.dmi.auth.username}")
private String authUsername;
- @Value("${dmi.auth.password}")
+ @Value("${ncmp.dmi.auth.password}")
private String authPassword;
- @Value("${dmi.api.base-path}")
+ @Value("${ncmp.dmi.api.base-path}")
private String dmiBasePath;
}
* Execute Cm Handle poll which queries the cm handle state in 'READY' and Operational Datastore Sync State in
* 'UNSYNCHRONIZED'.
*/
- @Scheduled(fixedDelayString = "${timers.cm-handle-data-sync.sleep-time-ms:30000}")
+ @Scheduled(fixedDelayString = "${ncmp.timers.cm-handle-data-sync.sleep-time-ms:30000}")
public void executeUnSynchronizedReadyCmHandlePoll() {
syncUtils.getUnsynchronizedReadyCmHandles().forEach(unSynchronizedReadyCmHandle -> {
final String cmHandleId = unSynchronizedReadyCmHandle.getId();
* This method will only finish when there are no more 'ADVISED' cm handles in the DB.
* This method wil be triggered on a configurable interval
*/
- @Scheduled(fixedDelayString = "${timers.advised-modules-sync.sleep-time-ms:5000}")
+ @Scheduled(fixedDelayString = "${ncmp.timers.advised-modules-sync.sleep-time-ms:5000}")
public void moduleSyncAdvisedCmHandles() {
log.info("Processing module sync watchdog waking up.");
populateWorkQueueIfNeeded();
/**
* Find any failed (locked) cm handles and change state back to 'ADVISED'.
*/
- @Scheduled(fixedDelayString = "${timers.locked-modules-sync.sleep-time-ms:300000}")
+ @Scheduled(fixedDelayString = "${ncmp.timers.locked-modules-sync.sleep-time-ms:300000}")
public void resetPreviouslyFailedCmHandles() {
log.info("Processing module sync retry-watchdog waking up.");
final List<YangModelCmHandle> failedCmHandles = syncUtils.getModuleSyncFailedCmHandles();
@Service
public class AsyncTaskExecutor {
- @Value("${modules-sync-watchdog.async-executor.parallelism-level:10}")
+ @Value("${ncmp.modules-sync-watchdog.async-executor.parallelism-level:10}")
@Getter
private int asyncTaskParallelismLevel;
private ExecutorService executorService;
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-dmi:
- auth:
- username: some-user
- password: some-password
- api:
- base-path: dmi
+ncmp:
+ dmi:
+ auth:
+ username: some-user
+ password: some-password
+ api:
+ base-path: dmi
-modules-sync-watchdog:
- async-executor:
- parallelism-level: 3
\ No newline at end of file
+ modules-sync-watchdog:
+ async-executor:
+ parallelism-level: 3
\ No newline at end of file
notification.enabled: 'true'
notification.async.executor.time-out-value-in-ms: 2000
NOTIFICATION_DATASPACE_FILTER_PATTERNS: '.*'
- TIMERS_ADVISED-MODULES-SYNC_SLEEP-TIME-MS: ${ADVISED_MODULES_SYNC_SLEEP_TIME_MS:-30000}
- TIMERS_CM-HANDLE-DATA-SYNC_SLEEP-TIME-MS: ${CMHANDLE_DATA_SYNC_SLEEP_TIME_MS:-30000}
+ NCMP_TIMERS_ADVISED-MODULES-SYNC_SLEEP-TIME-MS: ${ADVISED_MODULES_SYNC_SLEEP_TIME_MS:-30000}
+ NCMP_TIMERS_CM-HANDLE-DATA-SYNC_SLEEP-TIME-MS: ${CMHANDLE_DATA_SYNC_SLEEP_TIME_MS:-30000}
restart: unless-stopped
depends_on:
- dbpostgresql