summaryrefslogtreecommitdiffstats
path: root/cps-application
diff options
context:
space:
mode:
authormpriyank <priyank.maheshwari@est.tech>2024-05-07 15:33:19 +0100
committermpriyank <priyank.maheshwari@est.tech>2024-05-08 14:09:39 +0100
commitf7873bd1a65592539a26e49ba84cd3c90cdca252 (patch)
treeffa42b32da5db658176bb7181405e80defac7ef6 /cps-application
parent7b935fc1a85db39ffe216f6f53fed21de1bbb11a (diff)
Conditional cps change events
- introduced a parameter to control the cps core change event notifications. we should be able to disable these notifications without affecting other notification flows. - fixed the LayeredArchitectureTest as we are accessing the Anchor model in the events package now. Issue-ID: CPS-2213 Change-Id: Id875925bc14de1cc6e8fa3193c0df470e09fe43f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-application')
-rw-r--r--cps-application/src/main/resources/application.yml3
-rw-r--r--cps-application/src/test/java/org/onap/cps/architecture/LayeredArchitectureTest.java5
2 files changed, 6 insertions, 2 deletions
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 68dd31b53b..810068081e 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -116,8 +116,11 @@ app:
topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
cps:
data-updated:
+ change-event-notifications-enabled: ${CPS_CHANGE_EVENT_NOTIFICATIONS_ENABLED:true}
topic: ${CPS_CHANGE_EVENT_TOPIC:cps-data-updated-events}
+
+
notification:
enabled: true
async:
diff --git a/cps-application/src/test/java/org/onap/cps/architecture/LayeredArchitectureTest.java b/cps-application/src/test/java/org/onap/cps/architecture/LayeredArchitectureTest.java
index ec16ceefe8..c18a3ed10b 100644
--- a/cps-application/src/test/java/org/onap/cps/architecture/LayeredArchitectureTest.java
+++ b/cps-application/src/test/java/org/onap/cps/architecture/LayeredArchitectureTest.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021-2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,6 +45,7 @@ public class LayeredArchitectureTest {
private static final String CPS_UTILS_PACKAGE = "org.onap.cps.utils..";
private static final String NCMP_INIT_PACKAGE = "org.onap.cps.ncmp.init..";
private static final String CPS_CACHE_PACKAGE = "org.onap.cps.cache..";
+ private static final String CPS_EVENTS_PACKAGE = "org.onap.cps.events..";
@ArchTest
static final ArchRule restControllerShouldOnlyDependOnRestController =
@@ -57,7 +58,7 @@ public class LayeredArchitectureTest {
.or().resideInAPackage(SPI_SERVICE_PACKAGE).should().onlyHaveDependentClassesThat()
.resideInAnyPackage(REST_CONTROLLER_PACKAGE, API_SERVICE_PACKAGE, SPI_SERVICE_PACKAGE, NCMP_REST_PACKAGE,
NCMP_SERVICE_PACKAGE, YANG_SCHEMA_PACKAGE, NOTIFICATION_PACKAGE, CPS_UTILS_PACKAGE, NCMP_INIT_PACKAGE,
- CPS_CACHE_PACKAGE));
+ CPS_CACHE_PACKAGE, CPS_EVENTS_PACKAGE));
@ArchTest