Patch # 3: Data operation response event (NCMP → Client App) to comply with CloudEvents 04/135004/5
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 19 Jun 2023 16:35:15 +0000 (17:35 +0100)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Wed, 21 Jun 2023 12:34:43 +0000 (13:34 +0100)
commitdd4bcaadf2d5b5420669764951ab97eff6ffa4f5
treefebeb81466c2e9ec68ae1b3b787fc29a57bcfa65
parent43e3e06f795a46c392004af1acb97db3b2f2cfb6
Patch # 3: Data operation response event (NCMP → Client App) to comply with CloudEvents

- Modified data operation record strategy to consume cloud event.
- Modified NCMP data operation event consumer to read cloud event
  header. (prefixed with ce_)
- Modified event publisher to support legacy and cloud event based on
  event type (if legacy event use legacy kafka template else cloud kafka
  template).
- Introduced a new method onto json object mapper to convert json object
  to bytes.
- Modified data operation consumer spec to produce a cloud event and validate it.
- Added Kafka Integration Test (for filtering)

Issue-ID: CPS-1724

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: Ide701b1ff952f57413cb4e4aa0d55c08753f0298
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
cps-ncmp-service/pom.xml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/DataOperationRecordFilterStrategy.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/NcmpAsyncDataOperationEventConsumer.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/EventsPublisher.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/async/NcmpAsyncDataOperationEventConsumerIntegrationSpec.groovy [new file with mode: 0644]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/async/NcmpAsyncDataOperationEventConsumerSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/avc/AvcEventConsumerSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy
cps-ncmp-service/src/test/resources/application.yml
cps-ncmp-service/src/test/resources/dataOperationEvent.json