From eb5b0769be72d241a633963091a3b0e8962b8894 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Tue, 30 Jul 2024 17:00:21 +0100 Subject: [PATCH] Fix DMI host/port and clean up Postman collection Currently, Postman collection does not work out-of-the-box, due to DMI host being incorrect. DMI Plugin URL supplied to NCMP inventory must be accessible from inside the docker network. Using localhost does not work, as it will point to NCMP itself. Issue-ID: CPS-2336 Signed-off-by: danielhanrahan Change-Id: I2870ef4dd966a26e5931c95ce74a2125dc857f16 --- .../CPS Environment.postman_environment.json | 24 +-- .../DMI Stub.postman_collection.json | 161 --------------------- 2 files changed, 6 insertions(+), 179 deletions(-) delete mode 100644 postman-collections/DMI Stub.postman_collection.json diff --git a/postman-collections/CPS Environment.postman_environment.json b/postman-collections/CPS Environment.postman_environment.json index 84dcb642d7..7ee9c6779e 100644 --- a/postman-collections/CPS Environment.postman_environment.json +++ b/postman-collections/CPS Environment.postman_environment.json @@ -1,5 +1,5 @@ { - "id": "e8e90dd2-20be-49be-813f-07db44c6a4c2", + "id": "fd705c16-c17e-434d-ad2e-ba040a7ed062", "name": "CPS Environment", "values": [ { @@ -16,30 +16,18 @@ }, { "key": "DMI_HOST", - "value": "localhost", + "value": "ncmp-dmi-plugin-demo-and-csit-stub", "type": "default", "enabled": true }, { "key": "DMI_PORT", - "value": "8784", - "type": "default", - "enabled": true - }, - { - "key": "SDNC_HOST", - "value": "localhost", - "type": "default", - "enabled": true - }, - { - "key": "SDNC_PORT", - "value": "8282", + "value": "8092", "type": "default", "enabled": true } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2024-02-23T13:00:33.537Z", - "_postman_exported_using": "Postman/10.23.4" -} \ No newline at end of file + "_postman_exported_at": "2024-07-30T15:54:00.831Z", + "_postman_exported_using": "Postman/11.5.1" +} diff --git a/postman-collections/DMI Stub.postman_collection.json b/postman-collections/DMI Stub.postman_collection.json deleted file mode 100644 index fe7250f7db..0000000000 --- a/postman-collections/DMI Stub.postman_collection.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "info": { - "_postman_id": "4baf7902-0f1e-49a9-9c6a-f68f412240af", - "name": "DMI Stub", - "description": "A collection of the DMI Stub endpoints.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17907116" - }, - "item": [ - { - "name": "Execute a data operation for group of cm handle ids by supplied operation details", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{ \"operations\":\n [\n {\n \"resourceIdentifier\": \"some resource identifier\",\n \"datastore\": \"ncmp-datastore:passthrough-operational\",\n \"options\": \"some option\",\n \"operationId\": \"12\",\n \"cmHandles\": [\n {\n \"id\": \"cmHandle123\",\n \"cmHandleProperties\": {\n \"myProp\": \"some value\",\n \"otherProp\": \"other value\"\n }\n },\n {\n \"id\": \"cmHandle123\",\n \"cmHandleProperties\": {\n \"myProp\": \"some value\",\n \"otherProp\": \"other value\"\n }\n }\n ],\n \"operation\": \"read\"\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{DMI_HOST}}:{{DMI_PORT}}/dmi/v1/data?topic=ncmp-async-m2m&requestId=4753fc1f-7de2-449a-b306-a6204b5370b33", - "protocol": "http", - "host": [ - "{{DMI_HOST}}" - ], - "port": "{{DMI_PORT}}", - "path": [ - "dmi", - "v1", - "data" - ], - "query": [ - { - "key": "topic", - "value": "ncmp-async-m2m" - }, - { - "key": "requestId", - "value": "4753fc1f-7de2-449a-b306-a6204b5370b33" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve module resources for one or more modules", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{DMI_HOST}}:{{DMI_PORT}}/dmi/v1/ch/cm-bookStore/moduleResources", - "protocol": "http", - "host": [ - "{{DMI_HOST}}" - ], - "port": "{{DMI_PORT}}", - "path": [ - "dmi", - "v1", - "ch", - "cm-bookStore", - "moduleResources" - ] - } - }, - "response": [] - }, - { - "name": "Get all modules for given cm handle", - "protocolProfileBehavior": { - "disabledSystemHeaders": { - "accept": true - } - }, - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{DMI_HOST}}:{{DMI_PORT}}/dmi/v1/ch/cm-bookStore/modules", - "protocol": "http", - "host": [ - "{{DMI_HOST}}" - ], - "port": "{{DMI_PORT}}", - "path": [ - "dmi", - "v1", - "ch", - "cm-bookStore", - "modules" - ] - } - }, - "response": [] - } - ], - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "cpsr0cks!", - "type": "string" - }, - { - "key": "username", - "value": "cpsuser", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ] -} \ No newline at end of file -- 2.16.6