Modify dmi plugin stub mapping of data operation 65/135265/2
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Fri, 30 Jun 2023 11:21:09 +0000 (12:21 +0100)
committerSourabh Sourabh <sourabh.sourabh@est.tech>
Mon, 3 Jul 2023 08:44:52 +0000 (08:44 +0000)
- Modifiying exising dmi stub behaviour to mock onap-dmi plugin to send response HTTP 501.

Issue-ID: CPS-1723

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

dmi-plugin-stub/files/batchResponse.json [deleted file]
dmi-plugin-stub/mappings/batchCmHandles.json [deleted file]
dmi-plugin-stub/mappings/dataOperationRequest.json [new file with mode: 0644]

diff --git a/dmi-plugin-stub/files/batchResponse.json b/dmi-plugin-stub/files/batchResponse.json
deleted file mode 100644 (file)
index 9181b64..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-  "eventId": "4cb32729-85e3-44d1-aa6e-c923b9b059a5",
-  "eventCorrelationId": "68f15800-8ed4-4bae-9e53-27a9e03e1911",
-  "eventTime": "2023-03-28T14:29:23.876+0000",
-  "eventType": "org.onap.cps.ncmp.event.model.BatchResponseEvent",
-  "eventSchema": "urn:cps:org.onap.cps.ncmp.event.model.BatchResponseEvent",
-  "eventSchemaVersion": "v1",
-  "event": {
-    "payload": [
-      {
-        "cmHandle": "CmHandle5",
-        "additionalProperties": [
-          {
-            "Shape": "cube",
-            "Size": "small",
-            "Color": "yellow"
-          }
-        ],
-        "state": {
-          "cmHandleState": "READY",
-          "lastUpdateTime": "2023-04-03T20:03:19.832+0000"
-        }
-      },
-      {
-        "cmHandle": "CmHandle6",
-        "additionalProperties": [
-          {
-            "Shape": "cube",
-            "Size": "small",
-            "Color": "yellow"
-          }
-        ],
-        "state": {
-          "cmHandleState": "READY",
-          "lastUpdateTime": "2023-04-02T20:01:19.832+0000"
-        }
-      }
-    ]
-  }
-}
\ No newline at end of file
diff --git a/dmi-plugin-stub/mappings/batchCmHandles.json b/dmi-plugin-stub/mappings/batchCmHandles.json
deleted file mode 100644 (file)
index 851959b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "request": {
-    "method": "POST",
-    "urlPattern": "/dmi/v1/data?.*"
-  },
-  "response": {
-    "status": 200,
-    "bodyFileName": "batchResponse.json",
-    "headers": {
-      "Content-Type": "application/json"
-    }
-  }
-}
diff --git a/dmi-plugin-stub/mappings/dataOperationRequest.json b/dmi-plugin-stub/mappings/dataOperationRequest.json
new file mode 100644 (file)
index 0000000..1df7363
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "request": {
+    "method": "POST",
+    "urlPattern": "/dmi/v1/data?.*"
+  },
+  "response": {
+    "status": 501
+  }
+}