Merge postman collections for docker/k8 using environment variables 52/143152/2
authorshikha0203 <shivani.khare@est.tech>
Tue, 10 Feb 2026 13:57:44 +0000 (13:57 +0000)
committershikha0203 <shivani.khare@est.tech>
Tue, 10 Feb 2026 15:21:51 +0000 (15:21 +0000)
- Moved dmi-stub-2 requests from kubernetes folder to CPS-NCMP/Inventory/Southbound (dmi)
- Added Liveness & Readiness folder with health checks for CPS and DMI-Stub services
- Updated all DMI URLs to use environment variables ({{DMI_HOST}}:{{DMI_PORT}})
- Renamed environments: "CPS Environment Docker" and "CPS Environment k8s-linux-minikube"
- Added DMI_HOST_2 and DMI_PORT_2 variables for dmi-stub-2 support
- Updated README with Kubernetes setup instructions for Linux/Windows

Issue-ID: CPS-3058
Change-Id: I9045c72873eaaca316138d5303945d8441ded1b2
Signed-off-by: shikha0203 <shivani.khare@est.tech>
postman-collections/CPS.postman_collection.json
postman-collections/Env_docker.json [moved from postman-collections/CPS Environment.postman_environment.json with 64% similarity]
postman-collections/Env_k8s.json [moved from postman-collections/CPS Environment k8s.postman_environment.json with 73% similarity]
postman-collections/README.md

index 721dedf..434457e 100644 (file)
@@ -7,6 +7,154 @@
                "_exporter_id": "26733783"
        },
        "item": [
+               {
+                       "name": "Liveness & Readiness",
+                       "item": [
+                               {
+                                       "name": "CPS",
+                                       "item": [
+                                               {
+                                                       "name": "CPS Liveness Check",
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/actuator/health/liveness",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "actuator",
+                                                                               "health",
+                                                                               "liveness"
+                                                                       ]
+                                                               },
+                                                               "description": "Check if CPS service is alive"
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "CPS Readiness Check",
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/actuator/health/readiness",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{CPS_HOST}}"
+                                                                       ],
+                                                                       "port": "{{CPS_PORT}}",
+                                                                       "path": [
+                                                                               "actuator",
+                                                                               "health",
+                                                                               "readiness"
+                                                                       ]
+                                                               },
+                                                               "description": "Check if CPS service is ready to accept traffic"
+                                                       },
+                                                       "response": []
+                                               }
+                                       ]
+                               },
+                               {
+                                       "name": "DMI-Stub",
+                                       "item": [
+                                               {
+                                                       "name": "DMI-Stub-1 Liveness Check",
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{DMI_HOST_1}}:{{DMI_PORT_1}}/actuator/health/liveness",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{DMI_HOST_1}}"
+                                                                       ],
+                                                                       "port": "{{DMI_PORT_1}}",
+                                                                       "path": [
+                                                                               "actuator",
+                                                                               "health",
+                                                                               "liveness"
+                                                                       ]
+                                                               },
+                                                               "description": "Check if DMI-Stub-1 service is alive"
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "DMI-Stub-1 Readiness Check",
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{DMI_HOST_1}}:{{DMI_PORT_1}}/actuator/health/readiness",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{DMI_HOST_1}}"
+                                                                       ],
+                                                                       "port": "{{DMI_PORT_1}}",
+                                                                       "path": [
+                                                                               "actuator",
+                                                                               "health",
+                                                                               "readiness"
+                                                                       ]
+                                                               },
+                                                               "description": "Check if DMI-Stub-1 service is ready to accept traffic"
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "DMI-Stub-2 Liveness Check",
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{DMI_HOST_2}}:{{DMI_PORT_2}}/actuator/health/liveness",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{DMI_HOST_2}}"
+                                                                       ],
+                                                                       "port": "{{DMI_PORT_2}}",
+                                                                       "path": [
+                                                                               "actuator",
+                                                                               "health",
+                                                                               "liveness"
+                                                                       ]
+                                                               },
+                                                               "description": "Check if DMI-Stub-2 service is alive"
+                                                       },
+                                                       "response": []
+                                               },
+                                               {
+                                                       "name": "DMI-Stub-2 Readiness Check",
+                                                       "request": {
+                                                               "method": "GET",
+                                                               "header": [],
+                                                               "url": {
+                                                                       "raw": "http://{{DMI_HOST_2}}:{{DMI_PORT_2}}/actuator/health/readiness",
+                                                                       "protocol": "http",
+                                                                       "host": [
+                                                                               "{{DMI_HOST_2}}"
+                                                                       ],
+                                                                       "port": "{{DMI_PORT_2}}",
+                                                                       "path": [
+                                                                               "actuator",
+                                                                               "health",
+                                                                               "readiness"
+                                                                       ]
+                                                               },
+                                                               "description": "Check if DMI-Stub-2 service is ready to accept traffic"
+                                                       },
+                                                       "response": []
+                                               }
+                                       ]
+                               }
+                       ],
+                       "description": "Health check endpoints for CPS and DMI-Stub services. Use environment variables to switch between docker and k8s deployments."
+               },
                {
                        "name": "CPS-Core",
                        "item": [
                                                        "name": "Southbound (dmi)",
                                                        "item": [
                                                                {
-                                                                       "name": "CM handle registration (discovery)",
+                                                                       "name": "CM handle registration for dmi-stub-1",
                                                                        "event": [
                                                                                {
                                                                                        "listen": "prerequest",
                                                                                "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\": \"test2\"\r\n      },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    },\r\n    {\r\n      \"cmHandle\": \"cm-handle-3-never-ready\",\r\n      \"alternateId\": \"/Subnetwork=Europe/ManagedElement=X3\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"moduleSetTag\": \"errorTag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    }\r\n  ]\r\n}",
+                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST_1}}:{{DMI_PORT_1}}\",\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        \"color\": \"red\"         },\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        \"color\": \"purple\"           },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    },\r\n    {\r\n      \"cmHandle\": \"cm-handle-3-never-ready\",\r\n      \"alternateId\": \"/Subnetwork=Europe/ManagedElement=X3\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"moduleSetTag\": \"errorTag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    }\r\n  ]\r\n}",
                                                                                        "options": {
                                                                                                "raw": {
                                                                                                        "language": "json"
                                                                        "response": []
                                                                },
                                                                {
-                                                                       "name": "Get registered CM handle references",
+                                                                       "name": "Get registered CM handles for dmi-stub-1",
                                                                        "protocolProfileBehavior": {
                                                                                "disableBodyPruning": true
                                                                        },
                                                                                        "query": [
                                                                                                {
                                                                                                        "key": "dmi-plugin-identifier",
-                                                                                                       "value": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092"
+                                                                                                       "value": "http://{{DMI_HOST_1}}:{{DMI_PORT_1}}"
                                                                                                },
                                                                                                {
                                                                                                        "key": "outputAlternateId",
                                                                        "response": []
                                                                },
                                                                {
-                                                                       "name": "CM handle de-registration",
+                                                                       "name": "CM handle de-registration for dmi-stub-1",
                                                                        "request": {
                                                                                "method": "POST",
                                                                                "header": [],
                                                                                "body": {
                                                                                        "mode": "raw",
-                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://ncmp-dmi-plugin-demo-and-csit-stub:8092\",\r\n  \"removedCmHandles\": [ \"cm-handle-1\", \"cm-handle-2\", \"cm-handle-3-never-ready\"]\r\n}",
+                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST_1}}:{{DMI_PORT_1}}\",\r\n  \"removedCmHandles\": [ \"cm-handle-1\", \"cm-handle-2\", \"cm-handle-3-never-ready\"]\r\n}",
                                                                                        "options": {
                                                                                                "raw": {
                                                                                                        "language": "json"
                                                                                "header": [],
                                                                                "body": {
                                                                                        "mode": "raw",
-                                                                                       "raw": "{\r\n  \"cmHandleQueryParameters\": [\r\n    {\r\n      \"conditionName\": \"hasAllProperties\",\r\n      \"conditionParameters\": [\r\n        {\r\n          \"id\": \"123\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}",
+                                                                                       "raw": "{\r\n  \"cmHandleQueryParameters\": [\r\n    {\r\n      \"conditionName\": \"hasAllProperties\",\r\n      \"conditionParameters\": [\r\n        {\r\n          \"color\": \"red\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}",
                                                                                        "options": {
                                                                                                "raw": {
                                                                                                        "language": "json"
                                                                                "header": [],
                                                                                "body": {
                                                                                        "mode": "raw",
-                                                                                       "raw": "{\r\n  \"cmHandleQueryParameters\": [\r\n    {\r\n      \"conditionName\": \"hasAllProperties\",\r\n      \"conditionParameters\": [\r\n        {\r\n          \"id\": \"123\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}",
+                                                                                       "raw": "{\r\n  \"cmHandleQueryParameters\": [\r\n    {\r\n      \"conditionName\": \"hasAllProperties\",\r\n      \"conditionParameters\": [\r\n        {\r\n          \"color\": \"green\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}",
                                                                                        "options": {
                                                                                                "raw": {
                                                                                                        "language": "json"
                                                                                "header": [],
                                                                                "body": {
                                                                                        "mode": "raw",
-                                                                                       "raw": "{\r\n  \"cmHandleQueryParameters\": [\r\n    {\r\n      \"conditionName\": \"cmHandleWithDmiPlugin\",\r\n      \"conditionParameters\": [\r\n        {\r\n          \"dmiPluginName\": \"http://ncmp-dmi-plugin-demo-and-csit-stub:8092\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}",
+                                                                                       "raw": "{\r\n  \"cmHandleQueryParameters\": [\r\n    {\r\n      \"conditionName\": \"cmHandleWithDmiPlugin\",\r\n      \"conditionParameters\": [\r\n        {\r\n          \"dmiPluginName\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}",
                                                                                        "options": {
                                                                                                "raw": {
                                                                                                        "language": "json"
                                                                                }
                                                                        },
                                                                        "response": []
+                                                               },
+                                                               {
+                                                                       "name": "CM handle registration for dmi-stub-2",
+                                                                       "event": [
+                                                                               {
+                                                                                       "listen": "prerequest",
+                                                                                       "script": {
+                                                                                               "exec": [
+                                                                                                       ""
+                                                                                               ],
+                                                                                               "type": "text/javascript",
+                                                                                               "packages": {},
+                                                                                               "requests": {}
+                                                                                       }
+                                                                               },
+                                                                               {
+                                                                                       "listen": "test",
+                                                                                       "script": {
+                                                                                               "exec": [
+                                                                                                       ""
+                                                                                               ],
+                                                                                               "type": "text/javascript",
+                                                                                               "packages": {},
+                                                                                               "requests": {}
+                                                                                       }
+                                                                               }
+                                                                       ],
+                                                                       "request": {
+                                                                               "method": "POST",
+                                                                               "header": [],
+                                                                               "body": {
+                                                                                       "mode": "raw",
+                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST_2}}:{{DMI_PORT_2}}\",\r\n  \"createdCmHandles\": [\r\n    {\r\n      \"cmHandle\": \"cm-handle-3\",\r\n      \"alternateId\": \"Subnetwork=Europe,ManagedElement=X3\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"publicCmHandleProperties\": {\r\n        \"color\": \"red\"           },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    },\r\n    {\r\n      \"cmHandle\": \"cm-handle-4\",\r\n      \"alternateId\": \"Subnetwork=Europe,ManagedElement=X4\",\r\n      \"dataProducerIdentifier\": \"my-data-producer-identifier\",\r\n      \"cmHandleProperties\": {},\r\n      \"publicCmHandleProperties\": {\r\n        \"color\": \"green\"     },\r\n      \"moduleSetTag\": \"my-module-set-tag\",\r\n      \"trustLevel\": \"COMPLETE\"\r\n    }\r\n  ]\r\n}",
+                                                                                       "options": {
+                                                                                               "raw": {
+                                                                                                       "language": "json"
+                                                                                               }
+                                                                                       }
+                                                                               },
+                                                                               "url": {
+                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch",
+                                                                                       "protocol": "http",
+                                                                                       "host": [
+                                                                                               "{{CPS_HOST}}"
+                                                                                       ],
+                                                                                       "port": "{{CPS_PORT}}",
+                                                                                       "path": [
+                                                                                               "ncmpInventory",
+                                                                                               "v1",
+                                                                                               "ch"
+                                                                                       ]
+                                                                               },
+                                                                               "description": "DMI notifies NCMP of new CM handles"
+                                                                       },
+                                                                       "response": []
+                                                               },
+                                                               {
+                                                                       "name": "Get registered CM handles for dmi-stub-2",
+                                                                       "protocolProfileBehavior": {
+                                                                               "disableBodyPruning": true
+                                                                       },
+                                                                       "request": {
+                                                                               "method": "GET",
+                                                                               "header": [
+                                                                                       {
+                                                                                               "key": "Authorization",
+                                                                                               "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=",
+                                                                                               "type": "text"
+                                                                                       }
+                                                                               ],
+                                                                               "body": {
+                                                                                       "mode": "raw",
+                                                                                       "raw": "",
+                                                                                       "options": {
+                                                                                               "raw": {
+                                                                                                       "language": "json"
+                                                                                               }
+                                                                                       }
+                                                                               },
+                                                                               "url": {
+                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch/cmHandles?dmi-plugin-identifier=http://{{DMI_HOST_2}}:{{DMI_PORT_2}}",
+                                                                                       "protocol": "http",
+                                                                                       "host": [
+                                                                                               "{{CPS_HOST}}"
+                                                                                       ],
+                                                                                       "port": "{{CPS_PORT}}",
+                                                                                       "path": [
+                                                                                               "ncmpInventory",
+                                                                                               "v1",
+                                                                                               "ch",
+                                                                                               "cmHandles"
+                                                                                       ],
+                                                                                       "query": [
+                                                                                               {
+                                                                                                       "key": "dmi-plugin-identifier",
+                                                                                                       "value": "http://{{DMI_HOST_2}}:{{DMI_PORT_2}}"
+                                                                                               },
+                                                                                               {
+                                                                                                       "key": "outputAlternateId",
+                                                                                                       "value": "true",
+                                                                                                       "description": "Returns alternate ids rather then cm handle ids",
+                                                                                                       "disabled": true
+                                                                                               }
+                                                                                       ]
+                                                                               }
+                                                                       },
+                                                                       "response": []
+                                                               },
+                                                               {
+                                                                       "name": "CM handle de-registration for dmi-stub-2",
+                                                                       "event": [
+                                                                               {
+                                                                                       "listen": "prerequest",
+                                                                                       "script": {
+                                                                                               "exec": [
+                                                                                                       ""
+                                                                                               ],
+                                                                                               "type": "text/javascript",
+                                                                                               "packages": {},
+                                                                                               "requests": {}
+                                                                                       }
+                                                                               }
+                                                                       ],
+                                                                       "request": {
+                                                                               "method": "POST",
+                                                                               "header": [],
+                                                                               "body": {
+                                                                                       "mode": "raw",
+                                                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST_2}}:{{DMI_PORT_2}}\",\r\n  \"removedCmHandles\": [\r\n    \"cm-handle-3\",\r\n    \"cm-handle-4\"\r\n  ]\r\n}",
+                                                                                       "options": {
+                                                                                               "raw": {
+                                                                                                       "language": "json"
+                                                                                               }
+                                                                                       }
+                                                                               },
+                                                                               "url": {
+                                                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch",
+                                                                                       "protocol": "http",
+                                                                                       "host": [
+                                                                                               "{{CPS_HOST}}"
+                                                                                       ],
+                                                                                       "port": "{{CPS_PORT}}",
+                                                                                       "path": [
+                                                                                               "ncmpInventory",
+                                                                                               "v1",
+                                                                                               "ch"
+                                                                                       ]
+                                                                               },
+                                                                               "description": "DMI notifies NCMP of new CM handles"
+                                                                       },
+                                                                       "response": []
                                                                }
                                                        ]
                                                },
                                }
                        ],
                        "description": "NCMP-DMI-Stub endpoints as defined by Rest OpenApi Specification [here](https://docs.onap.org/projects/onap-cps-ncmp-dmi-plugin/en/latest/design.html#offered-apis)\n\n**To utilise NCMP-DMI-Stub begin the docker containers with:**\n\n`docker-compose --profile dmi-stub --profile monitoring up -d`"
-               },
-               {
-                       "name": "CPS-NCMP-K8s",
-                       "item": [
-                               {
-                                       "name": "CM handle registration for dmi-stub-1",
-                                       "event": [
-                                               {
-                                                       "listen": "prerequest",
-                                                       "script": {
-                                                               "exec": [
-                                                                       ""
-                                                               ],
-                                                               "type": "text/javascript",
-                                                               "packages": {},
-                                                               "requests": {}
-                                                       }
-                                               },
-                                               {
-                                                       "listen": "test",
-                                                       "script": {
-                                                               "exec": [
-                                                                       ""
-                                                               ],
-                                                               "type": "text/javascript",
-                                                               "packages": {},
-                                                               "requests": {}
-                                                       }
-                                               }
-                                       ],
-                                       "request": {
-                                               "method": "POST",
-                                               "header": [],
-                                               "body": {
-                                                       "mode": "raw",
-                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\",\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}",
-                                                       "options": {
-                                                               "raw": {
-                                                                       "language": "json"
-                                                               }
-                                                       }
-                                               },
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmpInventory",
-                                                               "v1",
-                                                               "ch"
-                                                       ]
-                                               },
-                                               "description": "DMI notifies NCMP of new CM handles"
-                                       },
-                                       "response": []
-                               },
-                               {
-                                       "name": "CM handle registration for dmi-stub-2",
-                                       "event": [
-                                               {
-                                                       "listen": "prerequest",
-                                                       "script": {
-                                                               "exec": [
-                                                                       ""
-                                                               ],
-                                                               "type": "text/javascript",
-                                                               "packages": {},
-                                                               "requests": {}
-                                                       }
-                                               },
-                                               {
-                                                       "listen": "test",
-                                                       "script": {
-                                                               "exec": [
-                                                                       ""
-                                                               ],
-                                                               "type": "text/javascript",
-                                                               "packages": {},
-                                                               "requests": {}
-                                                       }
-                                               }
-                                       ],
-                                       "request": {
-                                               "method": "POST",
-                                               "header": [],
-                                               "body": {
-                                                       "mode": "raw",
-                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST_2}}:{{DMI_PORT_2}}\",\r\n  \"createdCmHandles\": [\r\n    {\r\n      \"cmHandle\": \"cm-handle-3\",\r\n      \"alternateId\": \"Subnetwork=Europe,ManagedElement=X3\",\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-4\",\r\n      \"alternateId\": \"Subnetwork=Europe,ManagedElement=X4\",\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}",
-                                                       "options": {
-                                                               "raw": {
-                                                                       "language": "json"
-                                                               }
-                                                       }
-                                               },
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmpInventory",
-                                                               "v1",
-                                                               "ch"
-                                                       ]
-                                               },
-                                               "description": "DMI notifies NCMP of new CM handles"
-                                       },
-                                       "response": []
-                               },
-                               {
-                                       "name": "Get All CM handles for dmi-stub-1",
-                                       "protocolProfileBehavior": {
-                                               "disableBodyPruning": true
-                                       },
-                                       "request": {
-                                               "method": "GET",
-                                               "header": [
-                                                       {
-                                                               "key": "Authorization",
-                                                               "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=",
-                                                               "type": "text"
-                                                       }
-                                               ],
-                                               "body": {
-                                                       "mode": "raw",
-                                                       "raw": "",
-                                                       "options": {
-                                                               "raw": {
-                                                                       "language": "json"
-                                                               }
-                                                       }
-                                               },
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch/cmHandles?dmi-plugin-identifier=http://{{DMI_HOST}}:{{DMI_PORT}}",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmpInventory",
-                                                               "v1",
-                                                               "ch",
-                                                               "cmHandles"
-                                                       ],
-                                                       "query": [
-                                                               {
-                                                                       "key": "dmi-plugin-identifier",
-                                                                       "value": "http://{{DMI_HOST}}:{{DMI_PORT}}"
-                                                               },
-                                                               {
-                                                                       "key": "outputAlternateId",
-                                                                       "value": "true",
-                                                                       "description": "Returns alternate ids rather then cm handle ids",
-                                                                       "disabled": true
-                                                               }
-                                                       ]
-                                               }
-                                       },
-                                       "response": []
-                               },
-                               {
-                                       "name": "Get All CM handles for dmi-stub-2",
-                                       "protocolProfileBehavior": {
-                                               "disableBodyPruning": true
-                                       },
-                                       "request": {
-                                               "method": "GET",
-                                               "header": [
-                                                       {
-                                                               "key": "Authorization",
-                                                               "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=",
-                                                               "type": "text"
-                                                       }
-                                               ],
-                                               "body": {
-                                                       "mode": "raw",
-                                                       "raw": "",
-                                                       "options": {
-                                                               "raw": {
-                                                                       "language": "json"
-                                                               }
-                                                       }
-                                               },
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch/cmHandles?dmi-plugin-identifier=http://{{DMI_HOST_2}}:{{DMI_PORT_2}}",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmpInventory",
-                                                               "v1",
-                                                               "ch",
-                                                               "cmHandles"
-                                                       ],
-                                                       "query": [
-                                                               {
-                                                                       "key": "dmi-plugin-identifier",
-                                                                       "value": "http://{{DMI_HOST_2}}:{{DMI_PORT_2}}"
-                                                               },
-                                                               {
-                                                                       "key": "outputAlternateId",
-                                                                       "value": "true",
-                                                                       "description": "Returns alternate ids rather then cm handle ids",
-                                                                       "disabled": true
-                                                               }
-                                                       ]
-                                               }
-                                       },
-                                       "response": []
-                               },
-                               {
-                                       "name": "Get resource data",
-                                       "request": {
-                                               "method": "GET",
-                                               "header": [],
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-2/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=my-data-producer-identifier",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmp",
-                                                               "v1",
-                                                               "ch",
-                                                               "cm-handle-2",
-                                                               "data",
-                                                               "ds",
-                                                               "ncmp-datastore:passthrough-running"
-                                                       ],
-                                                       "query": [
-                                                               {
-                                                                       "key": "resourceIdentifier",
-                                                                       "value": "my-data-producer-identifier"
-                                                               }
-                                                       ]
-                                               }
-                                       },
-                                       "response": []
-                               },
-                               {
-                                       "name": "CM handle de-registration for dmi-stub-1",
-                                       "event": [
-                                               {
-                                                       "listen": "prerequest",
-                                                       "script": {
-                                                               "exec": [
-                                                                       ""
-                                                               ],
-                                                               "type": "text/javascript",
-                                                               "packages": {},
-                                                               "requests": {}
-                                                       }
-                                               }
-                                       ],
-                                       "request": {
-                                               "method": "POST",
-                                               "header": [],
-                                               "body": {
-                                                       "mode": "raw",
-                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\",\r\n  \"removedCmHandles\": [\r\n    \"cm-handle-1\",\r\n    \"cm-handle-2\"\r\n  ]\r\n}",
-                                                       "options": {
-                                                               "raw": {
-                                                                       "language": "json"
-                                                               }
-                                                       }
-                                               },
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmpInventory",
-                                                               "v1",
-                                                               "ch"
-                                                       ]
-                                               },
-                                               "description": "DMI notifies NCMP of new CM handles"
-                                       },
-                                       "response": []
-                               },
-                               {
-                                       "name": "CM handle de-registration for dmi-stub-2",
-                                       "event": [
-                                               {
-                                                       "listen": "prerequest",
-                                                       "script": {
-                                                               "exec": [
-                                                                       ""
-                                                               ],
-                                                               "type": "text/javascript",
-                                                               "packages": {},
-                                                               "requests": {}
-                                                       }
-                                               }
-                                       ],
-                                       "request": {
-                                               "method": "POST",
-                                               "header": [],
-                                               "body": {
-                                                       "mode": "raw",
-                                                       "raw": "{\r\n  \"dmiPlugin\": \"http://{{DMI_HOST_2}}:{{DMI_PORT_2}}\",\r\n  \"removedCmHandles\": [\r\n    \"cm-handle-3\",\r\n    \"cm-handle-4\"\r\n  ]\r\n}",
-                                                       "options": {
-                                                               "raw": {
-                                                                       "language": "json"
-                                                               }
-                                                       }
-                                               },
-                                               "url": {
-                                                       "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch",
-                                                       "protocol": "http",
-                                                       "host": [
-                                                               "{{CPS_HOST}}"
-                                                       ],
-                                                       "port": "{{CPS_PORT}}",
-                                                       "path": [
-                                                               "ncmpInventory",
-                                                               "v1",
-                                                               "ch"
-                                                       ]
-                                               },
-                                               "description": "DMI notifies NCMP of new CM handles"
-                                       },
-                                       "response": []
-                               }
-                       ]
                }
        ],
        "event": [
@@ -1,6 +1,6 @@
 {
     "id": "fd705c16-c17e-434d-ad2e-ba040a7ed062",
-    "name": "CPS Environment",
+    "name": "CPS Environment Docker",
     "values": [
         {
             "key": "CPS_HOST",
             "enabled": true
         },
         {
-            "key": "DMI_HOST",
+            "key": "DMI_HOST_1",
             "value": "ncmp-dmi-plugin-demo-and-csit-stub",
             "type": "default",
             "enabled": true
         },
         {
-            "key": "DMI_PORT",
+            "key": "DMI_PORT_1",
             "value": "8092",
             "type": "default",
             "enabled": true
+        },
+        {
+            "key": "DMI_HOST_2",
+            "value": "ncmp-dmi-plugin-demo-and-csit-stub-2",
+            "type": "default",
+            "enabled": true
+        },
+        {
+            "key": "DMI_PORT_2",
+            "value": "8093",
+            "type": "default",
+            "enabled": true
         }
     ],
     "_postman_variable_scope": "environment",
@@ -1,10 +1,10 @@
 {
        "id": "a0df880f-ad98-482a-8725-ee4577cf224e",
-       "name": "CPS Environment k8s",
+       "name": "CPS Environment k8s-linux-minikube",
        "values": [
                {
                        "key": "CPS_HOST",
-                       "value": "localhost",
+                       "value": "192.168.49.2",
                        "type": "default",
                        "enabled": true
                },
                        "enabled": true
                },
                {
-                       "key": "DMI_HOST",
-                       "value": "cps-ncmp-dmi-stub-1-service",
+                       "key": "DMI_HOST_1",
+                       "value": "192.168.49.2",
                        "type": "default",
                        "enabled": true
                },
                {
-                       "key": "DMI_PORT",
-                       "value": "8092",
+                       "key": "DMI_PORT_1",
+                       "value": "30092",
                        "type": "default",
                        "enabled": true
                },
                {
                        "key": "DMI_HOST_2",
-                       "value": "cps-ncmp-dmi-stub-2-service",
+                       "value": "192.168.49.2",
                        "type": "default",
                        "enabled": true
                },
                {
                        "key": "DMI_PORT_2",
-                       "value": "8093",
+                       "value": "30094",
                        "type": "default",
                        "enabled": true
                }
index d4a1c63..f31b7be 100644 (file)
 -->
 
 # Importing and running the CPS postman collections
+
 ## Importing the CPS collections
 To import the CPS collections and environment:
 1. Create a "Workspace" (or if you have one already you can use that)
 2. Click "Import" (or click "File" then "Import")
 3. Drag and drop the "postman-collection" folder into the import pop-up
 4. The collections and environment should now be imported
-5. Set the current environment to "CPS Environment" (usually at the top right. Default is "No Environment") This will provide the necessary variables such as "CPS_HOST" and "CPS_PORT" to allow the requests to be run
+5. Set the current environment based on your deployment:
+   - For **Docker**: Select "CPS Environment Docker" (CPS_PORT=8883)
+   - For **Kubernetes**: Select "CPS Environment k8s-linux-minikube" (CPS_PORT=30080)
+
+## Switching Between Docker and Kubernetes
+The collection now supports both docker-compose and k8s deployments using environment variables:
+- Simply change the active environment in Postman (top right dropdown)
+- All requests will automatically use the correct ports and hosts
+- No need for separate folders or duplicate tests
+
+### Kubernetes Environment Setup
+For Kubernetes deployments, you need to configure the correct host and ports based on your local setup:
+
+**Linux (minikube):**
+```bash
+# Get minikube IP and NodePorts
+minikube service list
+
+# Update environment variables with:
+# CPS_HOST = <minikube-ip>  (e.g., 192.168.49.2)
+# CPS_PORT = <nodeport>     (e.g., 30080)
+# DMI_HOST = <minikube-ip>
+# DMI_PORT = <nodeport>     (e.g., 30092)
+# DMI_HOST_2 = <minikube-ip>
+# DMI_PORT_2 = <nodeport>   (e.g., 30094)
+```
+
+**Windows (Docker Desktop / minikube):**
+```powershell
+# For Docker Desktop Kubernetes:
+# CPS_HOST = localhost
+# Ports = NodePort values from: kubectl get svc
+
+# For minikube:
+minikube service list
+# Use the URLs shown (host:port)
+```
+
+**Verify your services:**
+```bash
+kubectl get svc | grep -E "cps|dmi"
+# Note the NodePort values (e.g., 8080:30080/TCP)
+# Use the second port (30080) in your environment
+```
+
+## Environment Variables
+Both environments support:
+- `CPS_HOST` and `CPS_PORT` - CPS service endpoint
+- `DMI_HOST` and `DMI_PORT` - DMI-Stub-1 endpoint
+- `DMI_HOST_2` and `DMI_PORT_2` - DMI-Stub-2 endpoint
 
 ## Using collections in Postman
 A how-to guide is provided in the CPS collection. To access this guide click on the parent CPS folder icon at the top of the collection and follow the provided instructions.
@@ -33,5 +83,13 @@ A how-to guide is provided in the CPS collection. To access this guide click on
 ## Running the collections
 To run the requests in the collections in CPS-CORE simply select the request and click send. "Create Schema Set" in "CPS-CORE" requires a file to send the request. Example files are provided: "bookstore.yang" and "bookstore-types.yang" (these files must be zipped before adding them to the request)
 
+## Liveness & Readiness Checks
+The collection includes health check endpoints for all services:
+- **CPS**: Liveness and Readiness checks
+- **DMI-Stub-1**: Liveness and Readiness checks
+- **DMI-Stub-2**: Liveness and Readiness checks
+
+These checks work with both docker and k8s deployments by using environment variables.
+
 ## Notes
 When exporting postman collections tabs are used for spacing, so replacing all the tabs is necessary