summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-service')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumer.java64
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImpl.java10
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/CompositeStateUtils.java55
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java11
-rw-r--r--cps-ncmp-service/src/main/resources/models/subscription.yang57
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumerSpec.groovy93
-rw-r--r--cps-ncmp-service/src/test/resources/cmSubscription/cmSubscriptionNcmpInEvent.json23
-rw-r--r--cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiInEvent.json31
-rw-r--r--cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiOutEvent.json19
-rw-r--r--cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionEvent.json31
-rw-r--r--cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpInEvent.json22
-rw-r--r--cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent.json28
-rw-r--r--cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent2.json20
13 files changed, 206 insertions, 258 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumer.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumer.java
new file mode 100644
index 0000000000..8bc36943a3
--- /dev/null
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumer.java
@@ -0,0 +1,64 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.ncmp.api.impl.events.cmsubscription;
+
+import static org.onap.cps.ncmp.api.impl.events.mapper.CloudEventMapper.toTargetEvent;
+
+import io.cloudevents.CloudEvent;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.onap.cps.ncmp.events.cmsubscription_merge1_0_0.client_to_ncmp.CmSubscriptionNcmpInEvent;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.kafka.annotation.KafkaListener;
+import org.springframework.stereotype.Component;
+
+@Component
+@Slf4j
+public class CmSubscriptionNcmpInEventConsumer {
+
+ @Value("${notification.enabled:true}")
+ private boolean notificationFeatureEnabled;
+
+ @Value("${ncmp.model-loader.subscription:false}")
+ private boolean subscriptionModelLoaderEnabled;
+
+ /**
+ * Consume the specified event.
+ *
+ * @param subscriptionEventConsumerRecord the event to be consumed
+ */
+ @KafkaListener(topics = "${app.ncmp.avc.subscription-topic}",
+ containerFactory = "cloudEventConcurrentKafkaListenerContainerFactory")
+ public void consumeSubscriptionEvent(final ConsumerRecord<String, CloudEvent> subscriptionEventConsumerRecord) {
+ final CloudEvent cloudEvent = subscriptionEventConsumerRecord.value();
+ final CmSubscriptionNcmpInEvent cmSubscriptionNcmpInEvent =
+ toTargetEvent(cloudEvent, CmSubscriptionNcmpInEvent.class);
+ if (subscriptionModelLoaderEnabled) {
+ log.info("Subscription with name {} to be mapped to hazelcast object...",
+ cmSubscriptionNcmpInEvent.getData().getSubscriptionId());
+ }
+ if ("subscriptionCreated".equals(cloudEvent.getType()) && cmSubscriptionNcmpInEvent != null) {
+ log.info("Subscription for ClientID {} with name {} ...",
+ cloudEvent.getSource(),
+ cmSubscriptionNcmpInEvent.getData().getSubscriptionId());
+ }
+ }
+}
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImpl.java
index a31332f094..0ed95adff2 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImpl.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2022-2023 Nordix Foundation
+ * Copyright (C) 2022-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.
@@ -164,12 +164,12 @@ public class LcmEventsCmHandleStateHandlerImpl implements LcmEventsCmHandleState
}
private void setInitialStates(final YangModelCmHandle yangModelCmHandle) {
- CompositeStateUtils.setInitialDataStoreSyncState().accept(yangModelCmHandle.getCompositeState());
- CompositeStateUtils.setCompositeState(READY).accept(yangModelCmHandle.getCompositeState());
+ CompositeStateUtils.setInitialDataStoreSyncState(yangModelCmHandle.getCompositeState());
+ CompositeStateUtils.setCompositeState(READY, yangModelCmHandle.getCompositeState());
}
private void retryCmHandle(final YangModelCmHandle yangModelCmHandle) {
- CompositeStateUtils.setCompositeStateForRetry().accept(yangModelCmHandle.getCompositeState());
+ CompositeStateUtils.setCompositeStateForRetry(yangModelCmHandle.getCompositeState());
}
private void registerNewCmHandle(final YangModelCmHandle yangModelCmHandle) {
@@ -178,7 +178,7 @@ public class LcmEventsCmHandleStateHandlerImpl implements LcmEventsCmHandleState
}
private void setCmHandleState(final YangModelCmHandle yangModelCmHandle, final CmHandleState targetCmHandleState) {
- CompositeStateUtils.setCompositeState(targetCmHandleState).accept(yangModelCmHandle.getCompositeState());
+ CompositeStateUtils.setCompositeState(targetCmHandleState, yangModelCmHandle.getCompositeState());
}
private boolean isNew(final CompositeState existingCompositeState) {
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/CompositeStateUtils.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/CompositeStateUtils.java
index 99cca8c0b3..35ad54fdef 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/CompositeStateUtils.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/inventory/CompositeStateUtils.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2022-2023 Nordix Foundation
+ * Copyright (C) 2022-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.
@@ -20,7 +20,6 @@
package org.onap.cps.ncmp.api.impl.inventory;
-import java.util.function.Consumer;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -34,31 +33,23 @@ public class CompositeStateUtils {
/**
* Sets the cmHandleState to the provided state and updates the timestamp.
- *
- * @return Updated CompositeState
*/
- public static Consumer<CompositeState> setCompositeState(final CmHandleState cmHandleState) {
- return compositeState -> {
- compositeState.setCmHandleState(cmHandleState);
- compositeState.setLastUpdateTimeNow();
- };
+ public static void setCompositeState(final CmHandleState cmHandleState,
+ final CompositeState compositeState) {
+ compositeState.setCmHandleState(cmHandleState);
+ compositeState.setLastUpdateTimeNow();
}
/**
* Set the Operational datastore sync state based on the global flag.
- *
- * @return Updated CompositeState
*/
- public static Consumer<CompositeState> setInitialDataStoreSyncState() {
-
- return compositeState -> {
- compositeState.setDataSyncEnabled(false);
- final CompositeState.Operational operational =
- getInitialDataStoreSyncState(compositeState.getDataSyncEnabled());
- final CompositeState.DataStores dataStores =
- CompositeState.DataStores.builder().operationalDataStore(operational).build();
- compositeState.setDataStores(dataStores);
- };
+ public static void setInitialDataStoreSyncState(final CompositeState compositeState) {
+ compositeState.setDataSyncEnabled(false);
+ final CompositeState.Operational operational =
+ getInitialDataStoreSyncState(compositeState.getDataSyncEnabled());
+ final CompositeState.DataStores dataStores =
+ CompositeState.DataStores.builder().operationalDataStore(operational).build();
+ compositeState.setDataStores(dataStores);
}
/**
@@ -91,19 +82,15 @@ public class CompositeStateUtils {
/**
* Sets the cmHandleState to ADVISED and retain the lock details. Used in retry scenarios.
- *
- * @return Updated CompositeState
*/
- public static Consumer<CompositeState> setCompositeStateForRetry() {
- return compositeState -> {
- compositeState.setCmHandleState(CmHandleState.ADVISED);
- compositeState.setLastUpdateTimeNow();
- final String oldLockReasonDetails = compositeState.getLockReason().getDetails();
- final CompositeState.LockReason lockReason =
- CompositeState.LockReason.builder()
- .lockReasonCategory(compositeState.getLockReason().getLockReasonCategory())
- .details(oldLockReasonDetails).build();
- compositeState.setLockReason(lockReason);
- };
+ public static void setCompositeStateForRetry(final CompositeState compositeState) {
+ compositeState.setCmHandleState(CmHandleState.ADVISED);
+ compositeState.setLastUpdateTimeNow();
+ final String oldLockReasonDetails = compositeState.getLockReason().getDetails();
+ final CompositeState.LockReason lockReason =
+ CompositeState.LockReason.builder()
+ .lockReasonCategory(compositeState.getLockReason().getLockReasonCategory())
+ .details(oldLockReasonDetails).build();
+ compositeState.setLockReason(lockReason);
}
}
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 81055db847..88ba5e91be 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
@@ -45,13 +45,6 @@ public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
private static final String DATASTORE_PASSTHROUGH_OPERATIONAL = "ncmp-datastores:passthrough-operational";
private static final String DATASTORE_PASSTHROUGH_RUNNING = "ncmp-datastores:passthrough-running";
- private static final String DEPRECATED_MODEL_FILENAME = "subscription.yang";
- private static final String DEPRECATED_ANCHOR_NAME = "AVC-Subscriptions";
- private static final String DEPRECATED_SCHEMASET_NAME = "subscriptions";
- private static final String DEPRECATED_REGISTRY_DATANODE_NAME = "subscription-registry";
-
-
-
public CmDataSubscriptionModelLoader(final CpsDataspaceService cpsDataspaceService,
final CpsModuleService cpsModuleService,
final CpsAnchorService cpsAnchorService,
@@ -74,10 +67,6 @@ public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
}
private void onboardSubscriptionModels() {
- createSchemaSet(NCMP_DATASPACE_NAME, DEPRECATED_SCHEMASET_NAME, DEPRECATED_MODEL_FILENAME);
- createAnchor(NCMP_DATASPACE_NAME, DEPRECATED_SCHEMASET_NAME, DEPRECATED_ANCHOR_NAME);
- createTopLevelDataNode(NCMP_DATASPACE_NAME, DEPRECATED_ANCHOR_NAME, DEPRECATED_REGISTRY_DATANODE_NAME);
-
createSchemaSet(NCMP_DATASPACE_NAME, SCHEMASET_NAME, MODEL_FILENAME);
createAnchor(NCMP_DATASPACE_NAME, SCHEMASET_NAME, ANCHOR_NAME);
createTopLevelDataNode(NCMP_DATASPACE_NAME, ANCHOR_NAME, REGISTRY_DATANODE_NAME);
diff --git a/cps-ncmp-service/src/main/resources/models/subscription.yang b/cps-ncmp-service/src/main/resources/models/subscription.yang
deleted file mode 100644
index 7096c18abc..0000000000
--- a/cps-ncmp-service/src/main/resources/models/subscription.yang
+++ /dev/null
@@ -1,57 +0,0 @@
-module subscription {
- yang-version 1.1;
- namespace "org:onap:ncmp:subscription";
-
- prefix subs;
-
- revision "2023-03-21" {
- description
- "NCMP subscription model";
- }
-
- container subscription-registry {
- list subscription {
- key "clientID subscriptionName";
-
- leaf clientID {
- type string;
- }
-
- leaf subscriptionName {
- type string;
- }
-
- leaf topic {
- type string;
- }
-
- leaf isTagged {
- type boolean;
- }
-
- container predicates {
-
- list targetCmHandles {
- key "cmHandleId";
-
- leaf cmHandleId {
- type string;
- }
-
- leaf status {
- type string;
- }
-
- leaf details {
- type string;
- }
- }
-
- leaf datastore {
- type string;
- }
- }
-
- }
- }
-} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumerSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumerSpec.groovy
new file mode 100644
index 0000000000..57e77eba31
--- /dev/null
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmSubscriptionNcmpInEventConsumerSpec.groovy
@@ -0,0 +1,93 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.ncmp.api.impl.events.cmsubscription
+
+import ch.qos.logback.classic.Level
+import ch.qos.logback.classic.Logger
+import ch.qos.logback.classic.spi.ILoggingEvent
+import ch.qos.logback.core.read.ListAppender
+import com.fasterxml.jackson.databind.ObjectMapper
+import io.cloudevents.CloudEvent
+import io.cloudevents.core.builder.CloudEventBuilder
+import org.apache.kafka.clients.consumer.ConsumerRecord
+import org.junit.jupiter.api.AfterEach
+import org.junit.jupiter.api.BeforeEach
+import org.onap.cps.ncmp.api.kafka.MessagingBaseSpec
+import org.onap.cps.ncmp.events.cmsubscription_merge1_0_0.client_to_ncmp.CmSubscriptionNcmpInEvent
+import org.onap.cps.ncmp.utils.TestUtils
+import org.onap.cps.utils.JsonObjectMapper
+import org.slf4j.LoggerFactory
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.test.context.SpringBootTest
+
+@SpringBootTest(classes = [ObjectMapper, JsonObjectMapper])
+class CmSubscriptionNcmpInEventConsumerSpec extends MessagingBaseSpec {
+
+ def objectUnderTest = new CmSubscriptionNcmpInEventConsumer()
+ def logger = Spy(ListAppender<ILoggingEvent>)
+
+ @Autowired
+ JsonObjectMapper jsonObjectMapper
+
+ @Autowired
+ ObjectMapper objectMapper
+
+ @BeforeEach
+ void setup() {
+ ((Logger) LoggerFactory.getLogger(CmSubscriptionNcmpInEventConsumer.class)).addAppender(logger);
+ logger.start();
+ }
+
+ @AfterEach
+ void teardown() {
+ ((Logger) LoggerFactory.getLogger(CmSubscriptionNcmpInEventConsumer.class)).detachAndStopAllAppenders();
+ }
+
+
+ def 'Consume valid CMSubscription create message'() {
+ given: 'a cmsubscription event'
+ def jsonData = TestUtils.getResourceFileContent('cmSubscription/cmSubscriptionNcmpInEvent.json')
+ def testEventSent = jsonObjectMapper.convertJsonString(jsonData, CmSubscriptionNcmpInEvent.class)
+ def testCloudEventSent = CloudEventBuilder.v1()
+ .withData(objectMapper.writeValueAsBytes(testEventSent))
+ .withId('subscriptionCreated')
+ .withType('subscriptionCreated')
+ .withSource(URI.create('some-resource'))
+ .withExtension('correlationid', 'test-cmhandle1').build()
+ def consumerRecord = new ConsumerRecord<String, CloudEvent>('topic-name', 0, 0, 'event-key', testCloudEventSent)
+ and: 'notifications are enabled'
+ objectUnderTest.notificationFeatureEnabled = true
+ and: 'subscription model loader is enabled'
+ objectUnderTest.subscriptionModelLoaderEnabled = true
+ when: 'the valid event is consumed'
+ objectUnderTest.consumeSubscriptionEvent(consumerRecord)
+ then: 'an event is logged with level INFO'
+ def loggingEvent = getLoggingEvent()
+ assert loggingEvent.level == Level.INFO
+ and: 'the log indicates the task completed successfully'
+ assert loggingEvent.formattedMessage == 'Subscription with name cm-subscription-001 to be mapped to hazelcast object...'
+ }
+
+ def getLoggingEvent() {
+ return logger.list[0]
+ }
+
+}
diff --git a/cps-ncmp-service/src/test/resources/cmSubscription/cmSubscriptionNcmpInEvent.json b/cps-ncmp-service/src/test/resources/cmSubscription/cmSubscriptionNcmpInEvent.json
new file mode 100644
index 0000000000..5246618820
--- /dev/null
+++ b/cps-ncmp-service/src/test/resources/cmSubscription/cmSubscriptionNcmpInEvent.json
@@ -0,0 +1,23 @@
+{
+ "data": {
+ "subscriptionId": "cm-subscription-001",
+ "predicates": [
+ {
+ "targetFilter": [
+ "CMHandle1",
+ "CMHandle2",
+ "CMHandle3"
+ ],
+ "scopeFilter": {
+ "datastore": "ncmp-datastore:passthrough-running",
+ "xpath-filter": [
+ "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/_3gpp-nr-nrm-nrcelldu:NRCellDU/",
+ "//_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction//",
+ "//_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU//",
+ "//_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//"
+ ]
+ }
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiInEvent.json b/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiInEvent.json
deleted file mode 100644
index f31362a1c6..0000000000
--- a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiInEvent.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "data": {
- "subscription": {
- "clientID": "SCO-9989752",
- "name": "cm-subscription-001"
- },
- "dataType": {
- "dataspace": "ALL",
- "dataCategory": "CM",
- "dataProvider": "CM-SERVICE"
- },
- "predicates": {
- "targets":[
- {
- "id":"CMHandle2",
- "additional-properties":{
- "Books":"Novel"
- }
- },
- {
- "id":"CMHandle1",
- "additional-properties":{
- "Books":"Social Media"
- }
- }
- ],
- "datastore": "passthrough-running",
- "datastore-xpath-filter": "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/_3gpp-nr-nrm-nrcelldu:NRCellDU/ | //_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction// | //_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU// | //_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//"
- }
- }
-} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiOutEvent.json b/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiOutEvent.json
deleted file mode 100644
index ae14b5ca21..0000000000
--- a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionDmiOutEvent.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "data": {
- "clientId": "SCO-9989752",
- "subscriptionName": "cm-subscription-001",
- "dmiName": "dminame1",
- "subscriptionStatus": [
- {
- "id": "CMHandle1",
- "status": "REJECTED",
- "details": "Some error message from the DMI"
- },
- {
- "id": "CMHandle2",
- "status": "REJECTED",
- "details": "Some other error message from the DMI"
- }
- ]
- }
-} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionEvent.json b/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionEvent.json
deleted file mode 100644
index c38cb79211..0000000000
--- a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionEvent.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "clientId": "SCO-9989752",
- "subscriptionName": "cm-subscription-001",
- "cmSubscriptionStatus": [
- {
- "id": "CMHandle1",
- "status": "REJECTED",
- "details": "Some error message from the DMI"
- },
- {
- "id": "CMHandle2",
- "status": "REJECTED",
- "details": "Some other error message from the DMI"
- },
- {
- "id": "CMHandle3",
- "status": "PENDING",
- "details": "Some error causes pending"
- },
- {
- "id": "CMHandle4",
- "status": "PENDING",
- "details": "Some other error happened"
- },
- {
- "id": "CMHandle5",
- "status": "PENDING",
- "details": "Some other error happened"
- }
- ]
-} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpInEvent.json b/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpInEvent.json
deleted file mode 100644
index 803fa48bdf..0000000000
--- a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpInEvent.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "data": {
- "subscription": {
- "clientID": "SCO-9989752",
- "name": "cm-subscription-001"
- },
- "dataType": {
- "dataspace": "ALL",
- "dataCategory": "CM",
- "dataProvider": "CM-SERVICE"
- },
- "predicates": {
- "targets": [
- "CMHandle1",
- "CMHandle2",
- "CMHandle3"
- ],
- "datastore": "ncmp-datastore:passthrough-running",
- "datastore-xpath-filter": "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/_3gpp-nr-nrm-nrcelldu:NRCellDU/ | //_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction// | //_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU// | //_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//"
- }
- }
-} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent.json b/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent.json
deleted file mode 100644
index 856f238c6e..0000000000
--- a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "data": {
- "statusCode": 104,
- "statusMessage": "partially applied subscription",
- "additionalInfo": {
- "rejected": [
- {
- "details": "Some other error message from the DMI",
- "targets": ["CMHandle2"]
- },
- {
- "details": "Some error message from the DMI",
- "targets": ["CMHandle1"]
- }
- ],
- "pending": [
- {
- "details": "Some other error happened",
- "targets": ["CMHandle4", "CMHandle5"]
- },
- {
- "details": "Some error causes pending",
- "targets": ["CMHandle3"]
- }
- ]
- }
- }
-} \ No newline at end of file
diff --git a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent2.json b/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent2.json
deleted file mode 100644
index 35ff0241df..0000000000
--- a/cps-ncmp-service/src/test/resources/deprecatedCmSubscription/cmSubscriptionNcmpOutEvent2.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "data": {
- "statusCode": 104,
- "statusMessage": "partially applied subscription",
- "additionalInfo": {
- "rejected": [
- {
- "details": "Cm handle does not exist",
- "targets": ["CMHandle1"]
- }
- ],
- "pending": [
- {
- "details": "Subscription forwarded to dmi plugin",
- "targets": ["CMHandle3"]
- }
- ]
- }
- }
-} \ No newline at end of file