summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpInEventConsumer.java9
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java19
2 files changed, 7 insertions, 21 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpInEventConsumer.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpInEventConsumer.java
index bc798afeed..d3bde011b3 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpInEventConsumer.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionNcmpInEventConsumer.java
@@ -37,9 +37,6 @@ public class CmNotificationSubscriptionNcmpInEventConsumer {
@Value("${notification.enabled:true}")
private boolean notificationFeatureEnabled;
- @Value("${ncmp.model-loader.subscription:false}")
- private boolean subscriptionModelLoaderEnabled;
-
/**
* Consume the specified event.
*
@@ -51,10 +48,8 @@ public class CmNotificationSubscriptionNcmpInEventConsumer {
final CloudEvent cloudEvent = subscriptionEventConsumerRecord.value();
final CmNotificationSubscriptionNcmpInEvent cmNotificationSubscriptionNcmpInEvent =
toTargetEvent(cloudEvent, CmNotificationSubscriptionNcmpInEvent.class);
- if (subscriptionModelLoaderEnabled) {
- log.info("Subscription with name {} to be mapped to hazelcast object...",
- cmNotificationSubscriptionNcmpInEvent.getData().getSubscriptionId());
- }
+ log.info("Subscription with name {} to be mapped to hazelcast object...",
+ cmNotificationSubscriptionNcmpInEvent.getData().getSubscriptionId());
if ("subscriptionCreated".equals(cloudEvent.getType()) && cmNotificationSubscriptionNcmpInEvent != null) {
log.info("Subscription for ClientID {} with name {} ...", cloudEvent.getSource(),
cmNotificationSubscriptionNcmpInEvent.getData().getSubscriptionId());
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
index 7cee87a2a0..4c31719a29 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
@@ -32,7 +32,6 @@ import org.onap.cps.api.CpsModuleService;
import org.onap.cps.ncmp.api.impl.exception.NcmpStartUpException;
import org.onap.cps.ncmp.api.impl.operations.DatastoreType;
import org.onap.cps.spi.exceptions.AlreadyDefinedException;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@Slf4j
@@ -45,24 +44,16 @@ public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
private static final String REGISTRY_DATANODE_NAME = "datastores";
public CmDataSubscriptionModelLoader(final CpsDataspaceService cpsDataspaceService,
- final CpsModuleService cpsModuleService,
- final CpsAnchorService cpsAnchorService,
- final CpsDataService cpsDataService) {
+ final CpsModuleService cpsModuleService, final CpsAnchorService cpsAnchorService,
+ final CpsDataService cpsDataService) {
super(cpsDataspaceService, cpsModuleService, cpsAnchorService, cpsDataService);
}
- @Value("${ncmp.model-loader.subscription:true}")
- private boolean subscriptionModelLoaderEnabled;
-
@Override
public void onboardOrUpgradeModel() {
- if (subscriptionModelLoaderEnabled) {
- waitUntilDataspaceIsAvailable(NCMP_DATASPACE_NAME);
- onboardSubscriptionModels();
- log.info("Subscription Models onboarded successfully");
- } else {
- log.info("Subscription Model Loader is disabled");
- }
+ waitUntilDataspaceIsAvailable(NCMP_DATASPACE_NAME);
+ onboardSubscriptionModels();
+ log.info("Subscription Models onboarded successfully");
}
private void onboardSubscriptionModels() {