diff options
author | 2024-01-22 15:46:37 +0000 | |
---|---|---|
committer | 2024-01-22 15:46:42 +0000 | |
commit | ef2c1134dda841a366101e6a42e5957d4d0a5b57 (patch) | |
tree | 79dae0c7adaa1f73ebf6e70b906aa19e4bedd965 /cps-ncmp-service/src | |
parent | 51be3c863437ab2bbab05371418c08f87b99a116 (diff) |
CmSubscription review comments
- Removed the old deprecated cmSubscription json examples
- Incorporated minor review comments from myself
Issue-ID: CPS-1951
Change-Id: Ifadaa186cc210b81bb1b27f73f537e1c11bf461d
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-service/src')
9 files changed, 1 insertions, 154 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 index 3e16cf730..8bc36943a 100644 --- 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 @@ -23,7 +23,6 @@ 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.RequiredArgsConstructor; 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; @@ -33,7 +32,6 @@ import org.springframework.stereotype.Component; @Component @Slf4j -@RequiredArgsConstructor public class CmSubscriptionNcmpInEventConsumer { @Value("${notification.enabled:true}") 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 index fd566618e..57e77eba3 100644 --- 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 @@ -64,7 +64,7 @@ class CmSubscriptionNcmpInEventConsumerSpec extends MessagingBaseSpec { def 'Consume valid CMSubscription create message'() { given: 'a cmsubscription event' - def jsonData = TestUtils.getResourceFileContent('cmSubscriptionNcmpInEvent.json') + def jsonData = TestUtils.getResourceFileContent('cmSubscription/cmSubscriptionNcmpInEvent.json') def testEventSent = jsonObjectMapper.convertJsonString(jsonData, CmSubscriptionNcmpInEvent.class) def testCloudEventSent = CloudEventBuilder.v1() .withData(objectMapper.writeValueAsBytes(testEventSent)) diff --git a/cps-ncmp-service/src/test/resources/cmSubscriptionNcmpInEvent.json b/cps-ncmp-service/src/test/resources/cmSubscription/cmSubscriptionNcmpInEvent.json index 524661882..524661882 100644 --- a/cps-ncmp-service/src/test/resources/cmSubscriptionNcmpInEvent.json +++ b/cps-ncmp-service/src/test/resources/cmSubscription/cmSubscriptionNcmpInEvent.json 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 f31362a1c..000000000 --- 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 ae14b5ca2..000000000 --- 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 c38cb7921..000000000 --- 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 803fa48bd..000000000 --- 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 856f238c6..000000000 --- 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 35ff0241d..000000000 --- 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 |