NCMP : Handle non-existing and non-ready cm handles 82/135182/6
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 26 Jun 2023 10:15:57 +0000 (11:15 +0100)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Tue, 27 Jun 2023 15:01:37 +0000 (16:01 +0100)
commitede42ea3e267d321713cff1daf44d8627ada933d
tree157b81055ec61eea2b0d9f7bae4c4cba7dc50ab2
parent7ae1bcf4b463aec8c153feacfe32db4360e9c11d
NCMP : Handle non-existing and non-ready cm handles

- Modified data operation schema to contains cm handle as steing and
  response content field name as result.
- Added a new common cloud event builder for NCMP to create an event.
- Added data operation event creater that uses cloud event builder to
  create a cloud event.
- Introduced a new method onto json object mapper to convert json object
  to bytes.
- Modified EventDateTimeFormatter and added a new method to convert date timestamp into offsetdateTime.
- Added a new code into ResourceRequestUtil to identify non-ready cm
  handle and non-existing cm handle and later publish it as cloud event
  to tha client given topic.
- Introduced CpsApplicationContext to get spring mannaged bean into non
  spring managed java object.

Issue-ID: CPS-1583, CPS-1614

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I24a39d2cb2c54dea25cd2f17e7748e21cd83a088
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
21 files changed:
cps-ncmp-events/src/main/resources/schemas/async/data-operation-event-schema-1.0.0.json
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/NcmpEventResponseCode.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/NcmpCloudEventBuilder.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCreator.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operations/DmiDataOperations.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/EventDateTimeFormatter.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/ResourceDataOperationRequestUtils.java [deleted file]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/context/CpsApplicationContext.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/data/operation/DataOperationEventCreator.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/utils/data/operation/ResourceDataOperationRequestUtils.java [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/EventPublisherSpec.groovy [new file with mode: 0644]
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/impl/operations/DmiDataOperationsSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/context/CpsApplicationContextSpec.groovy [new file with mode: 0644]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/data/operation/ResourceDataOperationRequestUtilsSpec.groovy [moved from cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DataOperationRequestUtilsSpec.groovy with 55% similarity]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/init/SubscriptionModelLoaderSpec.groovy
cps-ncmp-service/src/test/resources/dataOperationEvent.json
cps-ncmp-service/src/test/resources/dataOperationRequest.json
cps-service/src/main/java/org/onap/cps/utils/JsonObjectMapper.java
cps-service/src/test/groovy/org/onap/cps/utils/JsonObjectMapperSpec.groovy