Update schema for NCMP to DMI on datajob subscription 55/141655/2
authoremaclee <lee.anjella.macabuhay@est.tech>
Thu, 7 Aug 2025 08:47:20 +0000 (09:47 +0100)
committeremaclee <lee.anjella.macabuhay@est.tech>
Fri, 8 Aug 2025 09:04:38 +0000 (10:04 +0100)
- based on agreed with E// outlined in https://lf-onap.atlassian.net/wiki/spaces/DW/pages/87984624/CPS-2166+Forwarding+CM+Data+Notification+to+Topic+Defined+in+Subscription#Schema-Definitions
- added target folder structure by adding 'from_to_destination'
  prefix on the new schema and existing datajob operation in
  event schema

Issue-ID: CPS-2920
Change-Id: I03a94ff01fc9bd85953fce2d6bb6757ca84a14e2
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
cps-ncmp-events/src/main/resources/schemas/ncmp/cmnotificationsubscription/data-job-subscription-dmi-in-event-schema-1.0.0.json [new file with mode: 0644]
cps-ncmp-events/src/main/resources/schemas/ncmp/cmnotificationsubscription/data-job-subscription-operation-in-event-schema-1.0.0.json

diff --git a/cps-ncmp-events/src/main/resources/schemas/ncmp/cmnotificationsubscription/data-job-subscription-dmi-in-event-schema-1.0.0.json b/cps-ncmp-events/src/main/resources/schemas/ncmp/cmnotificationsubscription/data-job-subscription-dmi-in-event-schema-1.0.0.json
new file mode 100644 (file)
index 0000000..88d631c
--- /dev/null
@@ -0,0 +1,83 @@
+{
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "$id": "urn:cps:org.onap.ncmp.events.subscription:1.0.0",
+  "$ref": "#/definitions/DmiInEvent",
+  "definitions": {
+    "DmiInEvent": {
+      "description": "The payload for cm notification data job subscription event incoming message from NCMP.",
+      "type": "object",
+      "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.ncmp_to_dmi.DataJobSubscriptionDmiInEvent",
+      "properties": {
+        "data": {
+          "$ref": "#/definitions/data"
+        }
+      },
+      "required": [
+        "data"
+      ]
+    },
+    "data": {
+      "type": "object",
+      "description": "Information about the cm handle targets and data job subscription",
+      "additionalProperties": false,
+      "properties": {
+        "cmHandles": {
+          "type": "array",
+          "items": {
+            "type": "object",
+            "description": "Details for the target cmhandles",
+            "additionalProperties": false,
+            "properties": {
+              "cmhandleId": {
+                "type": "string"
+              },
+              "privateProperties": {
+                "type": "object",
+                "existingJavaType": "java.util.Map<String,String>",
+                "items": {
+                  "type": "string"
+                }
+              }
+            }
+          }
+        },
+        "productionJobDefinition": {
+          "description": "Data job subscription details",
+          "type": "object",
+          "properties": {
+            "targetSelector": {
+              "description": "An object that contains the data node selectors.",
+              "type": "object",
+              "properties": {
+                "dataNodeSelector": {
+                  "description": "A string that contains one or multiple data node selector in JEX format.",
+                  "type": "string"
+                }
+              }
+            },
+            "dataSelector": {
+              "description": "An object that contains the the notification types and notification filter.",
+              "type": "object",
+              "properties": {
+                "notificationTypes": {
+                  "description": "A string array of notification types.",
+                  "type": "array",
+                  "items": {
+                    "type": "string"
+                  }
+                },
+                "notificationFilter": {
+                  "description": "A string that contains one or multiple notification filter in JEX format",
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "required": [
+      "cmHandles"
+    ]
+  }
+}
\ No newline at end of file
index 6916cd6..c6dfcea 100644 (file)
@@ -3,7 +3,7 @@
   "$schema": "http://json-schema.org/draft-04/schema#",
   "title": "Data job subscription operation event format",
   "type": "object",
-  "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.DataJobSubscriptionOperationInEvent",
+  "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.client_to_ncmp.DataJobSubscriptionOperationInEvent",
   "properties": {
     "eventType": {
       "description": "the type of the event",