Part 1: Add delta report in Kafka notification 44/142044/13
authorArpit Singh <AS00745003@techmahindra.com>
Fri, 19 Sep 2025 14:21:26 +0000 (19:51 +0530)
committerArpit Singh <AS00745003@techmahindra.com>
Tue, 11 Nov 2025 09:53:47 +0000 (15:23 +0530)
commit041790994bd5db2418745fc34f9320c08a783a51
tree1bb63c5bcfc58689fb69212c0a3533c139552968
parent78aac061c29b0242a7c97729c6ed24e111ce77bc
Part 1: Add delta report in Kafka notification

Current implementation of Kafka notifications used enum type(Option)
while creating an event. This was inconststent when compared to delta
report.

- Delta report uses 'action' as keyword to define the action on data
  change and not 'option'
- Delta report defines the actions as 'create', 'remove' and 'replace'
  in lower case but current implementation uses 'CREATE', 'UPDATE' and
  "DELETE' which was making it inconsistent with the format used in
  delta report.
- This patch makes CpsEvents Schema consistent with Delta Report schema
  as a future patch will add support for delta report in kafka
  notifications.
- Changes include:
   - Options are changed to Action for consistency with delta report
   - CREATE, UPDATE and DELETE options are changed to create, replace
     and remove respectively making them consistent with delta report
   - Notifications schema name changed from CpsDataUpdatedEvent to CpsDataUpdateEvent for clarity
   - Cloud events payload name changed from data to eventPayload

Issue-ID: CPS-2523
Change-Id: I2bfa766ed6abb2c2ba555820b25e5afa3c31064f
Signed-off-by: Arpit Singh <AS00745003@techmahindra.com>
cps-events/src/main/resources/schemas/cps.dataupdated/cps-data-updated-event-schema-1.0.0.json
cps-service/src/main/java/org/onap/cps/events/CpsDataUpdateEventsProducer.java
cps-service/src/main/java/org/onap/cps/impl/CpsDataServiceImpl.java
cps-service/src/test/groovy/org/onap/cps/events/CpsDataUpdateEventsProducerSpec.groovy
cps-service/src/test/groovy/org/onap/cps/impl/CpsDataServiceImplSpec.groovy