Modify data operation schema to accommodate additional information 57/135757/2
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Wed, 16 Aug 2023 12:16:25 +0000 (13:16 +0100)
committerSourabh Sourabh <sourabh.sourabh@est.tech>
Wed, 16 Aug 2023 13:03:42 +0000 (13:03 +0000)
- Data operation schema is updated to add resourceIdentifier and
  options.
- dmi plugin stub is modified to add both the attributes into kafka
  response message.

Issue-ID:CPS-1837

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I624c32d07ccf396f3090766049622f43f5c3f44f

cps-ncmp-events/src/main/resources/schemas/async/data-operation-event-schema-1.0.0.json
dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java
docs/schemas/data-operation-event-schema-1.0.0.json

index f82e481..c291518 100644 (file)
                       "type": "string"
                     }
                   },
+                  "resourceIdentifier": {
+                    "description": "The format of resource identifier depend on the associated DMI Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but it can really be anything.",
+                    "type": "string"
+                  },
+                  "options": {
+                    "description": "It is mandatory to add as key(s)=value(s)'. The format of options parameter depend on the associated DMI Plugin implementation.",
+                    "type": "string"
+                  },
                   "statusCode": {
                     "description": "which says success or failure (0-99) are for success and (100-199) are for failure",
                     "type": "string"
index 275331e..987436f 100644 (file)
@@ -164,6 +164,8 @@ public class DmiRestStubController {
         response.setStatusCode(NcmpEventResponseCode.SUCCESS.getStatusCode());
         response.setStatusMessage(NcmpEventResponseCode.SUCCESS.getStatusMessage());
         response.setIds(dataOperationRequest.getCmHandles().stream().map(CmHandle::getId).collect(Collectors.toList()));
+        response.setResourceIdentifier(dataOperationRequest.getResourceIdentifier());
+        response.setOptions(dataOperationRequest.getOptions());
         final String ietfNetworkTopologySample = ResourceFileReaderUtil
                 .getResourceFileContent(applicationContext.getResource(
                         ResourceLoader.CLASSPATH_URL_PREFIX
index f82e481..c291518 100644 (file)
                       "type": "string"
                     }
                   },
+                  "resourceIdentifier": {
+                    "description": "The format of resource identifier depend on the associated DMI Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but it can really be anything.",
+                    "type": "string"
+                  },
+                  "options": {
+                    "description": "It is mandatory to add as key(s)=value(s)'. The format of options parameter depend on the associated DMI Plugin implementation.",
+                    "type": "string"
+                  },
                   "statusCode": {
                     "description": "which says success or failure (0-99) are for success and (100-199) are for failure",
                     "type": "string"