Postman and Stub updates for testing ProvMns Error handling 61/142861/3
authorToineSiebelink <toine.siebelink@est.tech>
Tue, 6 Jan 2026 09:24:14 +0000 (09:24 +0000)
committerToineSiebelink <toine.siebelink@est.tech>
Wed, 7 Jan 2026 13:00:28 +0000 (13:00 +0000)
- Aligned PolicyExecutor Stub simulations with DMI Stub
- Add Simulation for Policy Denial in Stub PE Controller
- Postman updates: Data (ProvMnS) folder, including:
  - get, put, del success scenarios
  - get, put, del error and deny scenarios
NOTE Enable Policy Executor (env variable) to test/demo deny scenarios!
- Also contains fix for double slash (will disappear once separate for commit for that is merged)
TODO
- PostMan Patch scenarios will be done in separate commit by Sean as it requires DMI Stub update too

Issue-ID: CPS-2707
Change-Id: I97f801e3de73062acaf0b6cf122be6e0a104974e
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/provmns/ParametersBuilderSpec.groovy
docker-compose/docker-compose.yml
docs/api/swagger/cps/openapi.yaml
policy-executor-stub/src/main/java/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubController.java
policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy
postman-collections/CPS.postman_collection.json

index d273393..fc5b78b 100644 (file)
@@ -38,7 +38,6 @@ class ParametersBuilderSpec extends Specification{
                 ['my attributes'],
                 ['my fields'],
                 new ClassNameIdGetDataNodeSelectorParameter(dataNodeSelector: 'my dataNodeSelector'),
-
             )
         then: 'the template has the correct result'
             assert result.urlTemplate.toString().startsWith('myDmiService/ProvMnS/v1/target/fdn?')
index 2ff7dcf..61480c9 100644 (file)
@@ -72,8 +72,8 @@ services:
       POLICY_SERVICE_DEFAULT_DECISION: 'deny from env'
       CPS_MONITORING_MICROMETER_JVM_EXTRAS: 'true'
       JAVA_TOOL_OPTIONS: "-XX:InitialRAMPercentage=70.0 -XX:MaxRAMPercentage=70.0"
-      ### DEBUG: Uncomment next line to enable java debugging
-      ### JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
+      ### DEBUG: Uncomment next line to enable java debugging (and comment out above line!)
+      ###JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
       NCMP_INVENTORY_MODEL_UPGRADE_R20250722_ENABLED: 'false'
     restart: on-failure:3
     deploy:
@@ -200,6 +200,10 @@ services:
     image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/policy-executor-stub:latest
     ports:
       - ${POLICY_EXECUTOR_STUB_PORT:-8785}:8093
+    ### DEBUG: Uncomment next lines to enable java debugging in Policy Executor Stub
+    ###      - ${POLICY_EXECUTOR_STUB_DEBUG_PORT:-5005}:5005
+    ### environment:
+      #### JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
     restart: unless-stopped
     # Note policy-executor-stub does not have a healthcheck as it does not expose /actuator/health endpoint
 
index 0088b26..6b00856 100644 (file)
@@ -2750,10 +2750,10 @@ paths:
       parameters:
       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
         examples:
-          subscription by dataspace xpath:
+          dataspace xpath:
+            value: /dataspaces
+          anchor xpath:
             value: "/dataspaces/dataspace[@name='dataspace01']"
-          subscription by anchor xpath:
-            value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
         in: query
         name: xpath
         required: true
@@ -2813,10 +2813,10 @@ paths:
       parameters:
       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
         examples:
-          subscription by dataspace xpath:
+          dataspace xpath:
+            value: /dataspaces
+          anchor xpath:
             value: "/dataspaces/dataspace[@name='dataspace01']"
-          subscription by anchor xpath:
-            value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
         in: query
         name: xpath
         required: true
@@ -2828,7 +2828,7 @@ paths:
           content:
             application/json:
               schema:
-                $ref: '#/components/schemas/NotificationSubscriptionsDataSample'
+                $ref: '#/components/schemas/notificationSubscriptionResponseSample'
           description: OK
         "400":
           content:
@@ -2879,10 +2879,10 @@ paths:
       parameters:
       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
         examples:
-          subscription by dataspace xpath:
+          dataspace xpath:
+            value: /dataspaces
+          anchor xpath:
             value: "/dataspaces/dataspace[@name='dataspace01']"
-          subscription by anchor xpath:
-            value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
         in: query
         name: xpath
         required: true
@@ -2894,7 +2894,7 @@ paths:
           application/json:
             examples:
               dataSample:
-                $ref: '#/components/examples/NotificationSubscriptionsDataSample'
+                $ref: '#/components/examples/notificationSubscriptionRequestSample'
             schema:
               type: object
         required: true
@@ -3060,12 +3060,16 @@ components:
               name: SciFi
             - code: 2
               name: kids
-    NotificationSubscriptionsDataSample:
+    notificationSubscriptionRequestSample:
       value:
-        cps-notification-subscriptions:dataspaces:
-          dataspace:
-          - name: dataspace01
-          - name: dataspace02
+        dataspace:
+        - name: my-dataspace
+          anchors:
+            anchor:
+            - name: my-anchor
+              xpaths:
+                xpath:
+                - path: /shops/bookstore
   parameters:
     dataspaceNameInQuery:
       description: dataspace-name
@@ -3259,10 +3263,10 @@ components:
     notificationSubscriptionXpathInQuery:
       description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
       examples:
-        subscription by dataspace xpath:
+        dataspace xpath:
+          value: /dataspaces
+        anchor xpath:
           value: "/dataspaces/dataspace[@name='dataspace01']"
-        subscription by anchor xpath:
-          value: "/dataspaces/dataspace[@name='dataspace01']/anchors/anchor[@name='anchor01']"
       in: query
       name: xpath
       required: true
@@ -3434,7 +3438,7 @@ components:
           type: string
       title: Module reference object
       type: object
-    NotificationSubscriptionsDataSample: {}
+    notificationSubscriptionResponseSample: {}
     getDeltaByDataspaceAnchorAndPayload_request:
       properties:
         targetDataAsJsonFile:
index ea5b5a1..4d85592 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.onap.cps.policyexecutor.stub.controller;
 
-import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import lombok.RequiredArgsConstructor;
@@ -42,11 +41,13 @@ import org.springframework.web.bind.annotation.RestController;
 public class PolicyExecutorStubController implements OperationPermissionApi {
 
     private final Sleeper sleeper;
-    private static final Pattern ERROR_CODE_PATTERN = Pattern.compile("(\\d{3})");
+
+    private static final Pattern PATTERN_SIMULATION = Pattern.compile("policySimulation=(\\w+_\\w+)");
+    private static final Pattern PATTERN_HTTP_ERROR = Pattern.compile("httpError_(\\d{3})");
+    private static final Pattern PATTERN_SLOW_RESPONSE = Pattern.compile("slowResponse_(\\d{1,3})");
+    private static final Pattern PATTERN_POLICY_RESPONSE = Pattern.compile("policyResponse_(\\w+)");
+
     private int decisionCounter = 0;
-    @SuppressWarnings({"CanBeFinal", "FieldCanBeLocal"})
-    // Do NOT change below to final as it needs to be set during test
-    private static int slowResponseTimeInSeconds = 40;
 
     @Override
     public ResponseEntity<PermissionResponse> initiatePermissionRequest(final String contentType,
@@ -58,45 +59,43 @@ public class PolicyExecutorStubController implements OperationPermissionApi {
             return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
         }
         final Operation firstOperation = permissionRequest.getOperations().iterator().next();
-        log.info("1st Operation: {}", firstOperation.getOperation());
+        log.info("1st Operation: {} for resource: {}", firstOperation.getOperation(),
+                                                       firstOperation.getResourceIdentifier());
         if (!"delete".equals(firstOperation.getOperation()) && firstOperation.getChangeRequest() == null) {
             log.warn("Change Request is required for {} operations", firstOperation.getOperation());
             return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
         }
-        return handleOperation(firstOperation);
-    }
-
-    private ResponseEntity<PermissionResponse> handleOperation(final Operation operation) {
-        final String targetIdentifier = operation.getTargetIdentifier();
-
-        final Matcher matcher = ERROR_CODE_PATTERN.matcher(targetIdentifier);
-        if (matcher.find()) {
-            final int errorCode = Integer.parseInt(matcher.group(1));
-            log.warn("Stub is mocking an error response, code: {}", errorCode);
-            return new ResponseEntity<>(HttpStatusCode.valueOf(errorCode));
-        }
-
-        return createPolicyExecutionResponse(targetIdentifier);
+        return createPolicyExecutionResponse(firstOperation.getResourceIdentifier());
     }
 
-    private ResponseEntity<PermissionResponse> createPolicyExecutionResponse(final String targetIdentifier) {
+    private ResponseEntity<PermissionResponse> createPolicyExecutionResponse(final String resourceIdentifier) {
         final String id = String.valueOf(++decisionCounter);
-        final String permissionResult;
-        final String message;
-        if (targetIdentifier.toLowerCase(Locale.getDefault()).contains("slow")) {
-            try {
-                sleeper.haveALittleRest(slowResponseTimeInSeconds);
-            } catch (final InterruptedException e) {
-                log.trace("Sleep interrupted, re-interrupting the thread");
-                Thread.currentThread().interrupt(); // Re-interrupt the thread
+        String permissionResult = "allow";
+        String message = "all good";
+        Matcher matcher = PATTERN_SIMULATION.matcher(resourceIdentifier);
+        if (matcher.find()) {
+            final String simulation = matcher.group(1);
+            matcher = PATTERN_SLOW_RESPONSE.matcher(simulation);
+            if (matcher.matches()) {
+                try {
+                    final int slowResponseTimeInSeconds = Integer.parseInt(matcher.group(1));
+                    sleeper.haveALittleRest(slowResponseTimeInSeconds);
+                } catch (final InterruptedException e) {
+                    log.trace("Sleep interrupted, re-interrupting the thread");
+                    Thread.currentThread().interrupt(); // Re-interrupt the thread
+                }
+            }
+            matcher = PATTERN_HTTP_ERROR.matcher(simulation);
+            if (matcher.matches()) {
+                final int errorCode = Integer.parseInt(matcher.group(1));
+                log.warn("Stub is mocking an error response, code: {}", errorCode);
+                return new ResponseEntity<>(HttpStatusCode.valueOf(errorCode));
+            }
+            matcher = PATTERN_POLICY_RESPONSE.matcher(simulation);
+            if (matcher.matches()) {
+                permissionResult = matcher.group(1);
+                message = "Stub is mocking a policy response: " + permissionResult;
             }
-        }
-        if (targetIdentifier.toLowerCase(Locale.getDefault()).contains("cps-is-great")) {
-            permissionResult = "allow";
-            message = "All good";
-        } else {
-            permissionResult = "deny";
-            message = "Only FDNs containing 'cps-is-great' are allowed";
         }
         log.info("Decision: {} ({})", permissionResult, message);
         return ResponseEntity.ok(new PermissionResponse(id, permissionResult, message));
index 75bd676..1bda3c2 100644 (file)
@@ -48,13 +48,9 @@ class PolicyExecutorStubControllerSpec extends Specification {
 
     def url = '/operation-permission/v1/permissions'
 
-    def setup() {
-        PolicyExecutorStubController.slowResponseTimeInSeconds = 1
-    }
-
-    def 'Permission request with #targetIdentifier.'() {
+    def 'Permission request with #resourceIdentifier.'() {
         given: 'a permission request with target: #targetIdentifier'
-            def requestBody = createRequestBody(targetIdentifier)
+            def requestBody = createRequestBody(resourceIdentifier)
         when: 'request is posted'
             def response = mockMvc.perform(post(url)
                     .header('Authorization','some string')
@@ -70,15 +66,17 @@ class PolicyExecutorStubControllerSpec extends Specification {
             assert permissionResponse.permissionResult == expectedResult
             assert permissionResponse.message == expectedMessage
         where: 'the following targets are used'
-            targetIdentifier        || expectedId | expectedResult | expectedMessage
-            'some fdn'              || '1'        | 'deny'         | "Only FDNs containing 'cps-is-great' are allowed"
-            'fdn with cps-is-great' || '2'        | 'allow'        | 'All good'
-            'slow'                  || '3'        | 'deny'         | "Only FDNs containing 'cps-is-great' are allowed"
+            resourceIdentifier                             || expectedId | expectedResult | expectedMessage
+            'some fdn'                                     || '1'        | 'allow'        | 'all good'
+            'prefix/policySimulation=slowResponse_1'       || '2'        | 'allow'        | 'all good'
+            'prefix/policySimulation=policyResponse_deny'  || '3'        | 'deny'         | 'Stub is mocking a policy response: deny'
+            'prefix/policySimulation=policyResponse_other' || '4'        | 'other'        | 'Stub is mocking a policy response: other'
+
     }
 
     def 'Permission request with a HTTP error code.'() {
-        given: 'a permission request with a target fdn with a 3-digit error code'
-            def requestBody = createRequestBody('target with error code 418')
+        given: 'a permission request with a target fdn to simulate an http error code'
+            def requestBody = createRequestBody('segment1=1/policySimulation=httpError_418')
         when: 'request is posted'
             def response = mockMvc.perform(post(url)
                 .header('Authorization','some string')
@@ -127,8 +125,8 @@ class PolicyExecutorStubControllerSpec extends Specification {
     }
 
     def 'Permission request with interrupted exception during slow response.'() {
-        given: 'a permission request with target: "slow" (stub will be slow)'
-            def requestBody = createRequestBody('slow')
+        given: 'a permission request with a target fdn to simulate a slow response'
+            def requestBody = createRequestBody('policySimulation=slowResponse_5')
             sleeper.haveALittleRest(_) >> { throw new InterruptedException() }
         when: 'request is posted'
             mockMvc.perform(post(url)
@@ -140,8 +138,8 @@ class PolicyExecutorStubControllerSpec extends Specification {
     }
 
     def 'Permission request with missing or invalid attributes.'() {
-        given: 'Permission request with operation=#operation and targetIdentifier=#targetIdentifier'
-            def requestBody = createRequestBody(operation, targetIdentifier, changeRequest)
+        given: 'Permission request with operation=#operation and resourceIdentifier=#resourceIdentifier'
+            def requestBody = createRequestBody(operation, 'some resource', changeRequest)
         when: 'request is posted'
             def response = mockMvc.perform(post(url)
                 .header('Authorization','something')
@@ -151,20 +149,20 @@ class PolicyExecutorStubControllerSpec extends Specification {
         then: 'response status as expected'
             assert response.status == expectedStatus.value()
         where: 'following parameters are used'
-            operation | targetIdentifier | changeRequest || expectedStatus
-            'delete'  | 'something'      | null          || HttpStatus.OK
-            'other'   | 'something'      | '{}'          || HttpStatus.OK
-            'delete'  | null             | null          || HttpStatus.BAD_REQUEST
-            'other'   | 'something'      | null          || HttpStatus.BAD_REQUEST
+            operation | changeRequest || expectedStatus
+            'delete'  | null          || HttpStatus.OK
+            'other'   | '{}'          || HttpStatus.OK
+            'other'   | null          || HttpStatus.BAD_REQUEST
     }
 
-    def createRequestBody(targetIdentifier) {
-        return createRequestBody('delete', targetIdentifier, '{}')
+    def createRequestBody(resourceIdentifier) {
+        return createRequestBody('delete', resourceIdentifier, '{}')
     }
 
-    def createRequestBody(operationName, targetIdentifier, changeRequest) {
-        def operation = new Operation(operationName, targetIdentifier)
+    def createRequestBody(operationName, resourceIdentifier, changeRequest) {
+        def operation = new Operation(operationName, 'some cm-handle')
         operation.setChangeRequest(changeRequest)
+        operation.setResourceIdentifier(resourceIdentifier)
         def permissionRequest = new PermissionRequest('cm-legacy', [operation])
         return objectMapper.writeValueAsString(permissionRequest)
     }
index 33aa49a..a5bf331 100644 (file)
@@ -1,10 +1,11 @@
 {
        "info": {
-               "_postman_id": "3fb9f537-3b7a-4b48-a336-ed66e1f5a05e",
+               "_postman_id": "f67af205-d2ab-4859-afdf-0e1eb2137463",
                "name": "CPS",
                "description": "<img src=\"https://content.pstmn.io/bfbd86c2-7aa4-4afd-bd4a-207de1305bb7/Q1BTTG9nby5wbmc=\">\n\n# [CPS ONAP Documentation](https://docs.onap.org/projects/onap-cps/en/latest/index.html)\n\n# [DMI ONAP Documentation](https://docs.onap.org/projects/onap-cps-ncmp-dmi-plugin/en/latest/index.html)\n\n### How-to\n\nBuild CPS docker images with maven:\n\n`mvn clean install`\n\nor\n\n`mvn clean install -DskipTests`\n\nNavigate to docker-compose folder:\n\n`cd .\\docker-compose\\`\n\nBring up docker containers using commands found in docker-compose.yaml or run CPS services including dmi plugin\n\n`docker-compose --profile dmi-service up -d`\n\n### CPS-Enviroment\n\nTo enable the CPS enviroment, go to the top right of the screen in Postman and click envrioments. Import the CPS-envrioment file from the Postman Collections file in CPS.\n\n**To utilise NCMP-DMI-Stub endpoints begin the docker containers with:**\n\n`docker-compose --profile dmi-stub --profile monitoring up -d`\n\n# CPS Core Example\n\n- Create dataspace\n    \n- Verify dataspace exists\n    \n- etc...\n    \n\n# CPS-NCMP Example\n\n- Create CM handles\n    \n- Verify CM handles exist\n    \n- etc...",
                "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
-               "_exporter_id": "21077354"
+               "_exporter_id": "16927565",
+               "_collection_link": "https://cps555.postman.co/workspace/CPS-Workspace~388a7e32-81fe-4932-8636-02ccf8b51aca/collection/16927565-f67af205-d2ab-4859-afdf-0e1eb2137463?action=share&source=collection_link&creator=16927565"
        },
        "item": [
                {
                                                                                                        ""
                                                                                                ],
                                                                                                "type": "text/javascript",
-                                                                                               "packages": {}
+                                                                                               "packages": {},
+                                                                                               "requests": {}
                                                                                        }
                                                                                }
                                                                        ],
                                                                                "header": [],
                                                                                "body": {
                                                                                        "mode": "raw",
-                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://ncmp-dmi-plugin-demo-and-csit-stub:8092\",\r\n  \"createdCmHandles\": [\r\n    {\r\n      \"cmHandle\": \"cm-handle-1\",\r\n      \"alternateId\": \"Subnetwork=Europe,ManagedElement=X1\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"publicCmHandleProperties\": {\r\n        \"id\": \"123\",\r\n        \"userLabel\": \"test\"\r\n      },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    },\r\n    {\r\n      \"cmHandle\": \"cm-handle-2\",\r\n      \"alternateId\": \"Subnetwork=Europe,ManagedElement=X2\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"publicCmHandleProperties\": {\r\n        \"id\": \"456\",\r\n        \"userLabel\": \"test\"\r\n      },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    }\r\n  ]\r\n}",
+                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://ncmp-dmi-plugin-demo-and-csit-stub:8092\",\r\n  \"createdCmHandles\": [\r\n    {\r\n      \"cmHandle\": \"cm-handle-1\",\r\n      \"alternateId\": \"/Subnetwork=Europe/ManagedElement=X1\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"publicCmHandleProperties\": {\r\n        \"id\": \"123\",\r\n        \"userLabel\": \"test\"\r\n      },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    },\r\n    {\r\n      \"cmHandle\": \"cm-handle-2\",\r\n      \"alternateId\": \"/Subnetwork=Europe/ManagedElement=X2\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"publicCmHandleProperties\": {\r\n        \"id\": \"456\",\r\n        \"userLabel\": \"test2\"\r\n      },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    }\r\n  ]\r\n}",
                                                                                        "options": {
                                                                                                "raw": {
                                                                                                        "language": "json"
                                                {
                                                        "name": "Northbound (rApps)",
                                                        "item": [
-                                                               {
-                                                                       "name": "ProvMnS",
-                                                                       "item": [
-                                                                               {
-                                                                                       "name": "Get Resource Data",
-                                                                                       "protocolProfileBehavior": {
-                                                                                               "disableBodyPruning": true
-                                                                                       },
-                                                                                       "request": {
-                                                                                               "method": "GET",
-                                                                                               "header": [],
-                                                                                               "body": {
-                                                                                                       "mode": "raw",
-                                                                                                       "raw": ""
-                                                                                               },
-                                                                                               "url": {
-                                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/test=another",
-                                                                                                       "protocol": "http",
-                                                                                                       "host": [
-                                                                                                               "{{CPS_HOST}}"
-                                                                                                       ],
-                                                                                                       "port": "{{CPS_PORT}}",
-                                                                                                       "path": [
-                                                                                                               "ProvMnS",
-                                                                                                               "test=another"
-                                                                                                       ]
-                                                                                               }
-                                                                                       },
-                                                                                       "response": []
-                                                                               },
-                                                                               {
-                                                                                       "name": "Patch Resource Data",
-                                                                                       "protocolProfileBehavior": {
-                                                                                               "disabledSystemHeaders": {
-                                                                                                       "content-type": true
-                                                                                               }
-                                                                                       },
-                                                                                       "request": {
-                                                                                               "method": "PATCH",
-                                                                                               "header": [
-                                                                                                       {
-                                                                                                               "key": "Content-Type",
-                                                                                                               "value": "application/json-patch+json",
-                                                                                                               "type": "text"
-                                                                                                       }
-                                                                                               ],
-                                                                                               "body": {
-                                                                                                       "mode": "raw",
-                                                                                                       "raw": "{\r\n    \"id\": \"test\"\r\n}",
-                                                                                                       "options": {
-                                                                                                               "raw": {
-                                                                                                                       "language": "json"
-                                                                                                               }
-                                                                                                       }
-                                                                                               },
-                                                                                               "url": {
-                                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/test=another",
-                                                                                                       "protocol": "http",
-                                                                                                       "host": [
-                                                                                                               "{{CPS_HOST}}"
-                                                                                                       ],
-                                                                                                       "port": "{{CPS_PORT}}",
-                                                                                                       "path": [
-                                                                                                               "ProvMnS",
-                                                                                                               "test=another"
-                                                                                                       ]
-                                                                                               }
-                                                                                       },
-                                                                                       "response": []
-                                                                               },
-                                                                               {
-                                                                                       "name": "Put Resource Data",
-                                                                                       "protocolProfileBehavior": {
-                                                                                               "disabledSystemHeaders": {}
-                                                                                       },
-                                                                                       "request": {
-                                                                                               "method": "PUT",
-                                                                                               "header": [],
-                                                                                               "body": {
-                                                                                                       "mode": "raw",
-                                                                                                       "raw": "{\r\n    \"id\": \"test\"\r\n}",
-                                                                                                       "options": {
-                                                                                                               "raw": {
-                                                                                                                       "language": "json"
-                                                                                                               }
-                                                                                                       }
-                                                                                               },
-                                                                                               "url": {
-                                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/test=another",
-                                                                                                       "protocol": "http",
-                                                                                                       "host": [
-                                                                                                               "{{CPS_HOST}}"
-                                                                                                       ],
-                                                                                                       "port": "{{CPS_PORT}}",
-                                                                                                       "path": [
-                                                                                                               "ProvMnS",
-                                                                                                               "test=another"
-                                                                                                       ]
-                                                                                               }
-                                                                                       },
-                                                                                       "response": []
-                                                                               },
-                                                                               {
-                                                                                       "name": "Delete Resource Data",
-                                                                                       "request": {
-                                                                                               "method": "DELETE",
-                                                                                               "header": [],
-                                                                                               "url": {
-                                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/test=another",
-                                                                                                       "protocol": "http",
-                                                                                                       "host": [
-                                                                                                               "{{CPS_HOST}}"
-                                                                                                       ],
-                                                                                                       "port": "{{CPS_PORT}}",
-                                                                                                       "path": [
-                                                                                                               "ProvMnS",
-                                                                                                               "test=another"
-                                                                                                       ]
-                                                                                               }
-                                                                                       },
-                                                                                       "response": []
-                                                                               }
-                                                                       ]
-                                                               },
                                                                {
                                                                        "name": "Get module references",
                                                                        "protocolProfileBehavior": {
                                        "description": "CPS-NCMP-Inventory endpoints as defined by Rest OpenApi Specification [here](https://docs.onap.org/projects/onap-cps/en/latest/design.html#cps-ncmp-inventory)"
                                },
                                {
-                                       "name": "Data",
+                                       "name": "Data (ProvMnS)",
+                                       "item": [
+                                               {
+                                                       "name": "Get Resource Data",
+                                                       "protocolProfileBehavior": {
+                                                               "disableBodyPruning": true
+                                                       },
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [
+                                                                       {
+                                                                               "key": "Authorization",
+                                                                               "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=",
+                                                                               "type": "text"
+                                                                       }
+                                                               ],
+                                                               "body": {
+                                                                       "mode": "raw",
+                                                                       "raw": ""
+                                                               },
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/v1/Subnetwork=Europe/ManagedElement=X1",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "ProvMnS",
+                                                                               "v1",
+                                                                               "Subnetwork=Europe",
+                                                                               "ManagedElement=X1"
+                                                                       ],
+                                                                       "query": [
+                                                                               {
+                                                                                       "key": "outputAlternateId",
+                                                                                       "value": "true",
+                                                                                       "description": "Returns alternate ids rather then cm handle ids",
+                                                                                       "disabled": true
+                                                                               }
+                                                                       ]
+                                                               }
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "Request with http Error",
+                                                       "protocolProfileBehavior": {
+                                                               "disableBodyPruning": true
+                                                       },
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [
+                                                                       {
+                                                                               "key": "Authorization",
+                                                                               "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=",
+                                                                               "type": "text"
+                                                                       }
+                                                               ],
+                                                               "body": {
+                                                                       "mode": "raw",
+                                                                       "raw": ""
+                                                               },
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/v1/Subnetwork=Europe/ManagedElement=X1/dmiSimulation=httpError_418",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "ProvMnS",
+                                                                               "v1",
+                                                                               "Subnetwork=Europe",
+                                                                               "ManagedElement=X1",
+                                                                               "dmiSimulation=httpError_418"
+                                                                       ],
+                                                                       "query": [
+                                                                               {
+                                                                                       "key": "outputAlternateId",
+                                                                                       "value": "true",
+                                                                                       "description": "Returns alternate ids rather then cm handle ids",
+                                                                                       "disabled": true
+                                                                               }
+                                                                       ]
+                                                               }
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "Request with Timeout",
+                                                       "protocolProfileBehavior": {
+                                                               "disableBodyPruning": true
+                                                       },
+                                                       "request": {
+                                                               "auth": {
+                                                                       "type": "noauth"
+                                                               },
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "body": {
+                                                                       "mode": "raw",
+                                                                       "raw": ""
+                                                               },
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/v1/Subnetwork=Europe/ManagedElement=X2/dmiSimulation=slowResponse_40",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "ProvMnS",
+                                                                               "v1",
+                                                                               "Subnetwork=Europe",
+                                                                               "ManagedElement=X2",
+                                                                               "dmiSimulation=slowResponse_40"
+                                                                       ],
+                                                                       "query": [
+                                                                               {
+                                                                                       "key": "outputAlternateId",
+                                                                                       "value": "true",
+                                                                                       "description": "Returns alternate ids rather then cm handle ids",
+                                                                                       "disabled": true
+                                                                               }
+                                                                       ]
+                                                               }
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "Patch Resource Data (TBC)",
+                                                       "protocolProfileBehavior": {
+                                                               "disabledSystemHeaders": {
+                                                                       "content-type": true
+                                                               }
+                                                       },
+                                                       "request": {
+                                                               "method": "PATCH",
+                                                               "header": [
+                                                                       {
+                                                                               "key": "Content-Type",
+                                                                               "value": "application/json-patch+json",
+                                                                               "type": "text"
+                                                                       }
+                                                               ],
+                                                               "body": {
+                                                                       "mode": "raw",
+                                                                       "raw": "[\r\n {\r\n   \"op\": \"add\",\r\n   \"path\":\"/SomeChildType=child1\",\r\n   \"value\": {\r\n     \"id\": \"child1\",\r\n     \"objectClass\": \"SomeChildType\",\r\n     \"attributes\": {\r\n       \"userLabel\": \"My first child\",\r\n       \"vendorName\": \"Company XY\"\r\n     }\r\n   }\r\n }\r\n]\r\n",
+                                                                       "options": {
+                                                                               "raw": {
+                                                                                       "language": "json"
+                                                                               }
+                                                                       }
+                                                               },
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/v1/Subnetwork=Europe/ManagedElement=X1",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "ProvMnS",
+                                                                               "v1",
+                                                                               "Subnetwork=Europe",
+                                                                               "ManagedElement=X1"
+                                                                       ]
+                                                               }
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "Put Resource Data",
+                                                       "protocolProfileBehavior": {
+                                                               "disabledSystemHeaders": {}
+                                                       },
+                                                       "request": {
+                                                               "method": "PUT",
+                                                               "header": [],
+                                                               "body": {
+                                                                       "mode": "raw",
+                                                                       "raw": "{\r\n    \"id\": \"xyz1\",\r\n    \"objectClass\": \"XyzFunction\",\r\n    \"attributes\": {\r\n        \"attrC\": \"some new value\"\r\n    }\r\n}",
+                                                                       "options": {
+                                                                               "raw": {
+                                                                                       "language": "json"
+                                                                               }
+                                                                       }
+                                                               },
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/v1/Subnetwork=Europe/ManagedElement=X1/XyzFunction=xyz1",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "ProvMnS",
+                                                                               "v1",
+                                                                               "Subnetwork=Europe",
+                                                                               "ManagedElement=X1",
+                                                                               "XyzFunction=xyz1"
+                                                                       ]
+                                                               }
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "Delete Resource Data",
+                                                       "request": {
+                                                               "method": "DELETE",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ProvMnS/v1/Subnetwork=Europe/ManagedElement=X1",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "ProvMnS",
+                                                                               "v1",
+                                                                               "Subnetwork=Europe",
+                                                                               "ManagedElement=X1"
+                                                                       ]
+                                                               }
+                                                       },
+                                                       "response": []
+                                               }
+                                       ]
+                               },
+                               {
+                                       "name": "Data (legacy)",
                                        "item": [
                                                {
                                                        "name": "Create resource data",
                                                        },
                                                        "response": []
                                                }
-                                       ],
-                                       "description": "CPS-NCMP endpoints as defined by Rest OpenApi Specification [here](https://docs.onap.org/projects/onap-cps/en/latest/design.html#cps-ncmp)\n\nDepends on the ncmp-dmi-stub for some endpoints returns static content"
+                                       ]
                                }
                        ],
                        "description": "CPS-NCMP endpoints as defined by Rest OpenApi Specification [here](https://docs.onap.org/projects/onap-cps/en/latest/design.html#cps-ncmp)\n\nCPS-NCMP-Inventory endpoints as defined by Rest OpenApi Specification [here](https://docs.onap.org/projects/onap-cps/en/latest/design.html#cps-ncmp-inventory)"