diff options
Diffstat (limited to 'postman-collections')
-rw-r--r-- | postman-collections/CPS-CORE.postman_collection.json | 822 | ||||
-rw-r--r-- | postman-collections/CPS.postman_collection.json | 1715 | ||||
-rw-r--r-- | postman-collections/Data Operational Performance Test.postman_collection.json | 339 | ||||
-rw-r--r-- | postman-collections/NCMP Register CmHandle and Query.postman_collection.json | 649 | ||||
-rw-r--r-- | postman-collections/README.md | 5 | ||||
-rw-r--r-- | postman-collections/bookstore-types.yang | 18 | ||||
-rw-r--r-- | postman-collections/bookstore.yang | 127 | ||||
-rw-r--r-- | postman-collections/bookstore.zip | bin | 0 -> 1177 bytes |
8 files changed, 1719 insertions, 1956 deletions
diff --git a/postman-collections/CPS-CORE.postman_collection.json b/postman-collections/CPS-CORE.postman_collection.json deleted file mode 100644 index 730f69eac5..0000000000 --- a/postman-collections/CPS-CORE.postman_collection.json +++ /dev/null @@ -1,822 +0,0 @@ -{ - "info": { - "_postman_id": "e864733f-4781-45b6-8ea2-0b841a703dae", - "name": "CPS-CORE", - "description": "A collection of the endpoints in CPS-CORE. This is not an exhaustive collection but captures the main functionality.\n\nTo perform this functionality execute the API calls in order to create a dataspace, schema set (file is provided), anchor, and data node. Then GET the nodes to retrieve the information. The APIs in CPS-ADMIN can be used after initial POST requests.\n\nbookstore-model.yang can be found at cps/postman-collections/bookstore-model.yang", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17907116" - }, - "item": [ - { - "name": "CPS-ADMIN", - "item": [ - { - "name": "Get all dataspaces", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "admin", - "dataspaces" - ] - }, - "description": "Read all dataspaces" - }, - "response": [] - }, - { - "name": "Get a dataspace", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces/my-store", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "admin", - "dataspaces", - "my-store" - ] - }, - "description": "Read a dataspace given a dataspace name" - }, - "response": [] - }, - { - "name": "Get anchors", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors" - ] - }, - "description": "Read all anchors, given a dataspace" - }, - "response": [] - }, - { - "name": "Get an anchor", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor" - ] - }, - "description": "Read all anchors, given a dataspace" - }, - "response": [] - }, - { - "name": "Get schema sets", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "schema-sets" - ] - }, - "description": "Read all schema sets, given a dataspace" - }, - "response": [] - }, - { - "name": "Get a schema set", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "schema-sets", - "stores-module" - ] - }, - "description": "Read a schema set given a schema set name and a dataspace" - }, - "response": [] - } - ], - "description": "Some endpoints of CPS-ADMIN not mentioed in the CPS-CORE folder" - }, - { - "name": "Create Dataspace", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces" - ], - "query": [ - { - "key": "dataspace-name", - "value": "my-store" - } - ] - } - }, - "response": [] - }, - { - "name": "Create Schema Set", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "multipart/form-data", - "type": "text", - "disabled": true - } - ], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "src": "cps/postman-collections/bookstore.zip" - } - ] - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets?schema-set-name=stores-module", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "schema-sets" - ], - "query": [ - { - "key": "schema-set-name", - "value": "stores-module" - } - ] - }, - "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file." - }, - "response": [] - }, - { - "name": "Create Anchor", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors?schema-set-name=stores-module&anchor-name=bookstore-anchor", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors" - ], - "query": [ - { - "key": "schema-set-name", - "value": "stores-module" - }, - { - "key": "anchor-name", - "value": "bookstore-anchor" - } - ] - } - }, - "response": [] - }, - { - "name": "Create DataNodes", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"bookstore-address\": [\n {\n \"bookstore-name\": \"Easons\",\n \"address\": \"Dublin,Ireland\",\n \"postal-code\": \"D02HA21\"\n }\n ],\n \"bookstore\": {\n \"bookstore-name\": \"Easons\",\n \"premises\": {\n \"addresses\": [\n {\n \"house-number\": 2,\n \"street\": \"Main Street\",\n \"town\": \"Maynooth\",\n \"county\": \"Kildare\"\n },\n {\n \"house-number\": 24,\n \"street\": \"Grafton Street\",\n \"town\": \"Dublin\",\n \"county\": \"Dublin\"\n }\n ]\n },\n \"categories\": [\n {\n \"code\": 1,\n \"name\": \"Children\",\n \"books\" : [\n {\n \"title\": \"Matilda\",\n \"lang\": \"English\",\n \"authors\": [\"Roald Dahl\"],\n \"editions\": [1988, 2000],\n \"price\": 20\n },\n {\n \"title\": \"The Gruffalo\",\n \"lang\": \"English\",\n \"authors\": [\"Julia Donaldson\"],\n \"editions\": [1999],\n \"price\": 15\n }\n ]\n },\n {\n \"code\": 2,\n \"name\": \"Thriller\",\n \"books\" : [\n {\n \"title\": \"Annihilation\",\n \"lang\": \"English\",\n \"authors\": [\"Jeff VanderMeer\"],\n \"editions\": [2014],\n \"price\": 15\n }\n ]\n },\n {\n \"code\": 3,\n \"name\": \"Comedy\",\n \"books\" : [\n {\n \"title\": \"Good Omens\",\n \"lang\": \"English\",\n \"authors\": [\"Neil Gaiman\", \"Terry Pratchett\"],\n \"editions\": [2006],\n \"price\": 13\n },\n {\n \"title\": \"The Colour of Magic\",\n \"lang\": \"English\",\n \"authors\": [\"Terry Pratchett\"],\n \"editions\": [1983],\n \"price\": 12\n },\n {\n \"title\": \"The Light Fantastic\",\n \"lang\": \"English\",\n \"authors\": [\"Terry Pratchett\"],\n \"editions\": [1986],\n \"price\": 14\n },\n {\n \"title\": \"A Book with No Language\",\n \"lang\": \"\",\n \"authors\": [\"Joe Bloggs\"],\n \"editions\": [2023],\n \"price\": 20\n }\n ]\n },\n {\n \"code\": 4,\n \"name\": \"Computing\",\n \"books\" : [\n {\n \"title\": \"Debian GNU/Linux\",\n \"lang\": \"German\",\n \"authors\": [\"Peter H. Ganten\", \"Wulf Alex\"],\n \"editions\": [2007, 2013, 2021],\n \"price\": 39\n },\n {\n \"title\": \"Logarithm tables\",\n \"lang\": \"N/A\",\n \"authors\": [\"Joe Bloggs\"],\n \"editions\": [2009],\n \"price\": 11\n }\n ]\n },\n {\n \"code\": 5,\n \"name\": \"Discount books\",\n \"books\" : [\n {\n \"title\": \"Book 1\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 1\n },\n {\n \"title\": \"Book 2\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 2\n },\n {\n \"title\": \"Book 3\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 3\n },\n {\n \"title\": \"Book 4\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 4\n },\n {\n \"title\": \"Book 5\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 5\n },\n {\n \"title\": \"Book 6\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 6\n },\n {\n \"title\": \"Book 7\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 7\n },\n {\n \"title\": \"Book 8\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 8\n },\n {\n \"title\": \"Book 9\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 9\n },\n {\n \"title\": \"Book 10\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 10\n }\n ]\n }\n ]\n }\n}\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "nodes" - ] - } - }, - "response": [] - }, - { - "name": "Get Root Node All Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/&descendants=all", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "node" - ], - "query": [ - { - "key": "xpath", - "value": "/" - }, - { - "key": "descendants", - "value": "all" - } - ] - } - }, - "response": [] - }, - { - "name": "Get Node Categories No Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories&descendants=none", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "node" - ], - "query": [ - { - "key": "xpath", - "value": "/bookstore/categories" - }, - { - "key": "descendants", - "value": "none" - } - ] - } - }, - "response": [] - }, - { - "name": "Get Node Premises All Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=all", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "node" - ], - "query": [ - { - "key": "xpath", - "value": "/bookstore/premises" - }, - { - "key": "descendants", - "value": "all" - } - ] - } - }, - "response": [] - }, - { - "name": "Get Node Categories with code 2 Direct Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories[@code='2']&descendants=direct", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "node" - ], - "query": [ - { - "key": "xpath", - "value": "/bookstore/categories[@code='2']" - }, - { - "key": "descendants", - "value": "direct" - } - ] - } - }, - "response": [] - }, - { - "name": "Query Path Leaf Condition All Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes/query?cps-path=/bookstore/categories[@name=\"Discount books\"]&descendants=-1", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "nodes", - "query" - ], - "query": [ - { - "key": "cps-path", - "value": "/bookstore/categories[@name=\"Discount books\"]" - }, - { - "key": "descendants", - "value": "-1" - } - ] - } - }, - "response": [] - }, - { - "name": "Query Path Ancestor No Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes/query?cps-path=//books[@lang=\"German\"]/ancestor::categories&descendants=0", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "nodes", - "query" - ], - "query": [ - { - "key": "cps-path", - "value": "//books[@lang=\"German\"]/ancestor::categories" - }, - { - "key": "descendants", - "value": "0" - } - ] - } - }, - "response": [] - }, - { - "name": "Patch Nodes", - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"bookstore\": {\r\n \"bookstore-name\": \"Chapters\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "nodes" - ], - "query": [ - { - "key": "xpath", - "value": "/" - } - ] - } - }, - "response": [] - }, - { - "name": "Put Nodes", - "request": { - "method": "PUT", - "header": [], - "body": { - "mode": "raw", - "raw": "\r\n {\r\n \"premises\": {\r\n \"addresses\": [\r\n {\r\n \"town\": \"Maynooth\",\r\n \"county\": \"Kildare\",\r\n \"street\": \"Main Street\",\r\n \"house-number\": 2\r\n },\r\n {\r\n \"town\": \"Dublin\",\r\n \"county\": \"Dublin\",\r\n \"street\": \"Grafton Street\",\r\n \"house-number\": 24\r\n },\r\n {\r\n \"house-number\": 13,\r\n \"street\": \"Church Street\",\r\n \"town\": \"Athlone\",\r\n \"county\": \"Westmeath\"\r\n }\r\n ]\r\n }\r\n }\r\n", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/bookstore", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "nodes" - ], - "query": [ - { - "key": "xpath", - "value": "/bookstore" - } - ] - } - }, - "response": [] - }, - { - "name": "Get Node Premises Direct Descendants", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=1", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "node" - ], - "query": [ - { - "key": "xpath", - "value": "/bookstore/premises" - }, - { - "key": "descendants", - "value": "1" - } - ] - } - }, - "response": [] - }, - { - "name": "Delete DataNodes", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor", - "nodes" - ], - "query": [ - { - "key": "xpath", - "value": "/" - } - ] - } - }, - "response": [] - }, - { - "name": "Delete Anchor", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "anchors", - "bookstore-anchor" - ] - } - }, - "response": [] - }, - { - "name": "Delete Schema Set", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "multipart/form-data", - "type": "text", - "disabled": true - } - ], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "type": "file", - "src": "/home/jeff/Downloads/bookstore-model.yang" - } - ] - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces", - "my-store", - "schema-sets", - "stores-module" - ] - }, - "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file." - }, - "response": [] - }, - { - "name": "Delete Dataspace", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "cps", - "api", - "v2", - "dataspaces" - ], - "query": [ - { - "key": "dataspace-name", - "value": "my-store" - } - ] - } - }, - "response": [] - } - ], - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "cpsr0cks!", - "type": "string" - }, - { - "key": "username", - "value": "cpsuser", - "type": "string" - } - ] - } -}
\ No newline at end of file diff --git a/postman-collections/CPS.postman_collection.json b/postman-collections/CPS.postman_collection.json new file mode 100644 index 0000000000..ca630e2e17 --- /dev/null +++ b/postman-collections/CPS.postman_collection.json @@ -0,0 +1,1715 @@ +{ + "info": { + "_postman_id": "284e78f0-74c9-45f5-bdd5-25869a51028c", + "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": "26733783" + }, + "item": [ + { + "name": "CPS-Core", + "item": [ + { + "name": "CPS-Admin", + "item": [ + { + "name": "Create a dataspace", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces" + ], + "query": [ + { + "key": "dataspace-name", + "value": "my-store" + } + ] + } + }, + "response": [] + }, + { + "name": "Get a dataspace", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces/my-store", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "admin", + "dataspaces", + "my-store" + ] + }, + "description": "Read a dataspace given a dataspace name" + }, + "response": [] + }, + { + "name": "Get all dataspaces", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/admin/dataspaces", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "admin", + "dataspaces" + ] + }, + "description": "Read all dataspaces" + }, + "response": [] + }, + { + "name": "Create a schema set", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "cps/postman-collections/bookstore.zip" + } + ] + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets?schema-set-name=stores-module", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "schema-sets" + ], + "query": [ + { + "key": "schema-set-name", + "value": "stores-module" + } + ] + }, + "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file." + }, + "response": [] + }, + { + "name": "Get a schema set", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "schema-sets", + "stores-module" + ] + }, + "description": "Read a schema set given a schema set name and a dataspace" + }, + "response": [] + }, + { + "name": "Get schema sets", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "schema-sets" + ] + }, + "description": "Read all schema sets, given a dataspace" + }, + "response": [] + }, + { + "name": "Create an anchor", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors?schema-set-name=stores-module&anchor-name=bookstore-anchor", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors" + ], + "query": [ + { + "key": "schema-set-name", + "value": "stores-module" + }, + { + "key": "anchor-name", + "value": "bookstore-anchor" + } + ] + } + }, + "response": [] + }, + { + "name": "Get an anchor", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor" + ] + }, + "description": "Read all anchors, given a dataspace" + }, + "response": [] + }, + { + "name": "Get anchors", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors" + ] + }, + "description": "Read all anchors, given a dataspace" + }, + "response": [] + }, + { + "name": "Delete a schema set", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/home/jeff/Downloads/bookstore-model.yang" + } + ] + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/schema-sets/stores-module", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "schema-sets", + "stores-module" + ] + }, + "description": "Make sure in the body there is form data. key = file and value will be the zip/yang file." + }, + "response": [] + }, + { + "name": "Delete an anchor", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor" + ] + } + }, + "response": [] + }, + { + "name": "Delete a dataspace", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces?dataspace-name=my-store", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces" + ], + "query": [ + { + "key": "dataspace-name", + "value": "my-store" + } + ] + } + }, + "response": [] + } + ], + "description": "Some endpoints of CPS-ADMIN not mentioned in the CPS-CORE folder" + }, + { + "name": "CPS-Data", + "item": [ + { + "name": "Create data nodes", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"bookstore-address\": [\n {\n \"bookstore-name\": \"Easons\",\n \"address\": \"Dublin,Ireland\",\n \"postal-code\": \"D02HA21\"\n }\n ],\n \"bookstore\": {\n \"bookstore-name\": \"Easons\",\n \"premises\": {\n \"addresses\": [\n {\n \"house-number\": 2,\n \"street\": \"Main Street\",\n \"town\": \"Maynooth\",\n \"county\": \"Kildare\"\n },\n {\n \"house-number\": 24,\n \"street\": \"Grafton Street\",\n \"town\": \"Dublin\",\n \"county\": \"Dublin\"\n }\n ]\n },\n \"categories\": [\n {\n \"code\": 1,\n \"name\": \"Children\",\n \"books\" : [\n {\n \"title\": \"Matilda\",\n \"lang\": \"English\",\n \"authors\": [\"Roald Dahl\"],\n \"editions\": [1988, 2000],\n \"price\": 20\n },\n {\n \"title\": \"The Gruffalo\",\n \"lang\": \"English\",\n \"authors\": [\"Julia Donaldson\"],\n \"editions\": [1999],\n \"price\": 15\n }\n ]\n },\n {\n \"code\": 2,\n \"name\": \"Thriller\",\n \"books\" : [\n {\n \"title\": \"Annihilation\",\n \"lang\": \"English\",\n \"authors\": [\"Jeff VanderMeer\"],\n \"editions\": [2014],\n \"price\": 15\n }\n ]\n },\n {\n \"code\": 3,\n \"name\": \"Comedy\",\n \"books\" : [\n {\n \"title\": \"Good Omens\",\n \"lang\": \"English\",\n \"authors\": [\"Neil Gaiman\", \"Terry Pratchett\"],\n \"editions\": [2006],\n \"price\": 13\n },\n {\n \"title\": \"The Colour of Magic\",\n \"lang\": \"English\",\n \"authors\": [\"Terry Pratchett\"],\n \"editions\": [1983],\n \"price\": 12\n },\n {\n \"title\": \"The Light Fantastic\",\n \"lang\": \"English\",\n \"authors\": [\"Terry Pratchett\"],\n \"editions\": [1986],\n \"price\": 14\n },\n {\n \"title\": \"A Book with No Language\",\n \"lang\": \"\",\n \"authors\": [\"Joe Bloggs\"],\n \"editions\": [2023],\n \"price\": 20\n }\n ]\n },\n {\n \"code\": 4,\n \"name\": \"Computing\",\n \"books\" : [\n {\n \"title\": \"Debian GNU/Linux\",\n \"lang\": \"German\",\n \"authors\": [\"Peter H. Ganten\", \"Wulf Alex\"],\n \"editions\": [2007, 2013, 2021],\n \"price\": 39\n },\n {\n \"title\": \"Logarithm tables\",\n \"lang\": \"N/A\",\n \"authors\": [\"Joe Bloggs\"],\n \"editions\": [2009],\n \"price\": 11\n }\n ]\n },\n {\n \"code\": 5,\n \"name\": \"Discount books\",\n \"books\" : [\n {\n \"title\": \"Book 1\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 1\n },\n {\n \"title\": \"Book 2\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 2\n },\n {\n \"title\": \"Book 3\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 3\n },\n {\n \"title\": \"Book 4\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 4\n },\n {\n \"title\": \"Book 5\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 5\n },\n {\n \"title\": \"Book 6\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 6\n },\n {\n \"title\": \"Book 7\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 7\n },\n {\n \"title\": \"Book 8\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 8\n },\n {\n \"title\": \"Book 9\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 9\n },\n {\n \"title\": \"Book 10\",\n \"lang\": \"blah\",\n \"authors\": [],\n \"editions\": [],\n \"price\": 10\n }\n ]\n }\n ]\n }\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "nodes" + ] + } + }, + "response": [] + }, + { + "name": "Get root node, all descendants", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/&descendants=all", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "node" + ], + "query": [ + { + "key": "xpath", + "value": "/" + }, + { + "key": "descendants", + "value": "all" + } + ] + } + }, + "response": [] + }, + { + "name": "Get node categories, no descendants", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories&descendants=none", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "node" + ], + "query": [ + { + "key": "xpath", + "value": "/bookstore/categories" + }, + { + "key": "descendants", + "value": "none" + } + ] + } + }, + "response": [] + }, + { + "name": "Get node category by key, direct descendants only", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/categories[@code='2']&descendants=direct", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "node" + ], + "query": [ + { + "key": "xpath", + "value": "/bookstore/categories[@code='2']" + }, + { + "key": "descendants", + "value": "direct" + } + ] + } + }, + "response": [] + }, + { + "name": "Get node premises, all descendants", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/bookstore/premises&descendants=all", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "node" + ], + "query": [ + { + "key": "xpath", + "value": "/bookstore/premises" + }, + { + "key": "descendants", + "value": "all" + } + ] + } + }, + "response": [] + }, + { + "name": "Patch nodes", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"bookstore\": {\r\n \"bookstore-name\": \"Chapters\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "nodes" + ], + "query": [ + { + "key": "xpath", + "value": "/" + } + ] + } + }, + "response": [] + }, + { + "name": "Put nodes", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "\r\n {\r\n \"premises\": {\r\n \"addresses\": [\r\n {\r\n \"town\": \"Maynooth\",\r\n \"county\": \"Kildare\",\r\n \"street\": \"Main Street\",\r\n \"house-number\": 2\r\n },\r\n {\r\n \"town\": \"Dublin\",\r\n \"county\": \"Dublin\",\r\n \"street\": \"Grafton Street\",\r\n \"house-number\": 24\r\n },\r\n {\r\n \"house-number\": 13,\r\n \"street\": \"Church Street\",\r\n \"town\": \"Athlone\",\r\n \"county\": \"Westmeath\"\r\n }\r\n ]\r\n }\r\n }\r\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/bookstore", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "nodes" + ], + "query": [ + { + "key": "xpath", + "value": "/bookstore" + } + ] + } + }, + "response": [] + }, + { + "name": "Delete data nodes", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes?xpath=/", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "nodes" + ], + "query": [ + { + "key": "xpath", + "value": "/" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "CPS-Query", + "item": [ + { + "name": "Query path leaf condition, all descendants", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes/query?cps-path=/bookstore/categories[@name=\"Discount books\"]&descendants=-1", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "nodes", + "query" + ], + "query": [ + { + "key": "cps-path", + "value": "/bookstore/categories[@name=\"Discount books\"]" + }, + { + "key": "descendants", + "value": "-1" + } + ] + } + }, + "response": [] + }, + { + "name": "Query path ancestor, no descendants", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/nodes/query?cps-path=//books[@lang=\"German\"]/ancestor::categories&descendants=0", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "cps", + "api", + "v2", + "dataspaces", + "my-store", + "anchors", + "bookstore-anchor", + "nodes", + "query" + ], + "query": [ + { + "key": "cps-path", + "value": "//books[@lang=\"German\"]/ancestor::categories" + }, + { + "key": "descendants", + "value": "0" + } + ] + } + }, + "response": [] + } + ] + } + ], + "description": "CPS-Core endpoints as defined by Rest OpenApi Specification [here](https://docs.onap.org/projects/onap-cps/en/latest/design.html#cps-core)\n\nTo perform this functionality execute the API calls in order to create a dataspace, schema set (file is provided), anchor, and data node. Then GET the nodes to retrieve the information. The APIs in CPS-ADMIN can be used after initial POST requests.\n\n## Running the collection\n\nTo run the requests in the collection 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)\n\nbookstore-model.yang can be found at cps/postman-collections/bookstore-model.yang" + }, + { + "name": "CPS-NCMP", + "item": [ + { + "name": "Inventory", + "item": [ + { + "name": "CM handle registration (discovery)", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "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}", + "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 handle references", + "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://ncmp-dmi-plugin-demo-and-csit-stub:8092", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmpInventory", + "v1", + "ch", + "cmHandles" + ], + "query": [ + { + "key": "dmi-plugin-identifier", + "value": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092" + }, + { + "key": "outputAlternateId", + "value": "true", + "description": "Returns alternate ids rather then cm handle ids", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Query for CM handle ids", + "request": { + "method": "POST", + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmpInventory/v1/ch/searches", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmpInventory", + "v1", + "ch", + "searches" + ], + "query": [ + { + "key": "outputAlternateId", + "value": "true", + "description": "Returns alternate ids rather then cm handle ids", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Get module references", + "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}}/ncmp/v1/ch/cm-handle-1/modules", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "modules" + ] + } + }, + "response": [] + }, + { + "name": "Get module definitions", + "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}}/ncmp/v1/ch/cm-handle-1/modules/definitions", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "modules", + "definitions" + ] + } + }, + "response": [] + }, + { + "name": "CM handle id search", + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/id-searches", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "id-searches" + ], + "query": [ + { + "key": "outputAlternateId", + "value": "true", + "description": "Returns alternate ids rather then cm handle ids", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "CM handle object search", + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "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}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "searches" + ] + } + }, + "response": [] + }, + { + "name": "Get CM handle details", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1" + ] + } + }, + "response": [] + }, + { + "name": "Get CM handle details using alternate-id", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/Subnetwork%3DEurope%2CManagedElement%3DX1", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "Subnetwork%3DEurope%2CManagedElement%3DX1" + ] + } + }, + "response": [] + }, + { + "name": "Get CM handle properties", + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/properties", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "properties" + ] + } + }, + "response": [] + }, + { + "name": "Get CM handle state", + "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}}/ncmp/v1/ch/cm-handle-1/state", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "state" + ] + } + }, + "response": [] + }, + { + "name": "Set CM handle 'dataSync' flag", + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/data-sync?dataSyncEnabled=false", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data-sync" + ], + "query": [ + { + "key": "dataSyncEnabled", + "value": "false" + } + ] + } + }, + "response": [] + }, + { + "name": "CM handle de-registration", + "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\"]\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": "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", + "item": [ + { + "name": "Create resource data", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"ietf-network:networks\": {\r\n \"network\": [\r\n {\r\n \"network-types\": {},\r\n \"network-id\": \"otn-hc\",\r\n \"node\": [\r\n {\r\n \"node-id\": \"D1\",\r\n \"termination-point\": [\r\n {\r\n \"tp-id\": \"1-0-1\"\r\n },\r\n {\r\n \"tp-id\": \"1-2-1\"\r\n },\r\n {\r\n \"tp-id\": \"1-3-1\"\r\n }\r\n ]\r\n },\r\n {\r\n \"node-id\": \"D2\",\r\n \"termination-point\": [\r\n {\r\n \"tp-id\": \"2-0-1\"\r\n },\r\n {\r\n \"tp-id\": \"2-1-1\"\r\n },\r\n {\r\n \"tp-id\": \"2-3-1\"\r\n }\r\n ]\r\n },\r\n {\r\n \"node-id\": \"D3\",\r\n \"termination-point\": [\r\n {\r\n \"tp-id\": \"3-1-1\"\r\n },\r\n {\r\n \"tp-id\": \"3-2-1\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"ietf-network-topology:link\": [\r\n {\r\n \"link-id\": \"D1,1-2-1,D2,2-1-1\",\r\n \"source\": {\r\n \"source-node\": \"D1\",\r\n \"source-tp\": \"1-2-1\"\r\n },\r\n \"destination\": {\r\n \"dest-node\": \"D2\",\r\n \"dest-tp\": \"2-1-1\"\r\n }\r\n },\r\n {\r\n \"link-id\": \"D2,2-1-1,D1,1-2-1\",\r\n \"source\": {\r\n \"source-node\": \"D2\",\r\n \"source-tp\": \"2-1-1\"\r\n },\r\n \"destination\": {\r\n \"dest-node\": \"D1\",\r\n \"dest-tp\": \"1-2-1\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=NRCellDU/attributes/cellLocalId", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data", + "ds", + "ncmp-datastore:passthrough-running" + ], + "query": [ + { + "key": "resourceIdentifier", + "value": "NRCellDU/attributes/cellLocalId" + } + ] + } + }, + "response": [] + }, + { + "name": "Get resource data", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=NRCellDU/attributes/cellLocalId", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data", + "ds", + "ncmp-datastore:passthrough-running" + ], + "query": [ + { + "key": "resourceIdentifier", + "value": "NRCellDU/attributes/cellLocalId" + } + ] + } + }, + "response": [] + }, + { + "name": "Query 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}}/ncmp/v1/ch/cm-handle-1/data/ds/ncmp-datastore:operational/query", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data", + "ds", + "ncmp-datastore:operational", + "query" + ], + "query": [ + { + "key": "options", + "value": "{ \"options\": \"(depth=3)\"}", + "disabled": true + }, + { + "key": "topic", + "value": "{ \"topic\": \"my-topic-name\"}", + "disabled": true + }, + { + "key": "include-descendants", + "value": "true", + "disabled": true + }, + { + "key": "cps-path", + "value": "", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Update resource data", + "request": { + "method": "PUT", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"ietf-network:networks\": {\r\n \"network\": [\r\n {\r\n \"network-types\": {},\r\n \"network-id\": \"otn-hc\",\r\n \"node\": [\r\n {\r\n \"node-id\": \"D1\",\r\n \"termination-point\": [\r\n {\r\n \"tp-id\": \"1-0-1\"\r\n },\r\n {\r\n \"tp-id\": \"1-2-1\"\r\n },\r\n {\r\n \"tp-id\": \"1-3-1\"\r\n }\r\n ]\r\n },\r\n {\r\n \"node-id\": \"D2\",\r\n \"termination-point\": [\r\n {\r\n \"tp-id\": \"2-0-1\"\r\n },\r\n {\r\n \"tp-id\": \"2-1-1\"\r\n },\r\n {\r\n \"tp-id\": \"2-3-1\"\r\n }\r\n ]\r\n },\r\n {\r\n \"node-id\": \"D3\",\r\n \"termination-point\": [\r\n {\r\n \"tp-id\": \"3-1-1\"\r\n },\r\n {\r\n \"tp-id\": \"3-2-1\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"ietf-network-topology:link\": [\r\n {\r\n \"link-id\": \"D1,1-2-1,D2,2-1-1\",\r\n \"source\": {\r\n \"source-node\": \"D1\",\r\n \"source-tp\": \"1-2-1\"\r\n },\r\n \"destination\": {\r\n \"dest-node\": \"D2\",\r\n \"dest-tp\": \"2-1-1\"\r\n }\r\n },\r\n {\r\n \"link-id\": \"D2,2-1-1,D1,1-2-1\",\r\n \"source\": {\r\n \"source-node\": \"D2\",\r\n \"source-tp\": \"2-1-1\"\r\n },\r\n \"destination\": {\r\n \"dest-node\": \"D1\",\r\n \"dest-tp\": \"1-2-1\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=NRCellDU/attributes/cellLocalId", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data", + "ds", + "ncmp-datastore:passthrough-running" + ], + "query": [ + { + "key": "resourceIdentifier", + "value": "NRCellDU/attributes/cellLocalId" + } + ] + } + }, + "response": [] + }, + { + "name": "Patch resource data", + "request": { + "method": "PATCH", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"ietf-restconf:yang-patch\": {\r\n \"patch-id\": \"patch-1\",\r\n \"edit\": [\r\n {\r\n \"edit-id\": \"edit1\",\r\n \"operation\": \"merge\",\r\n \"target\": \"/\",\r\n \"value\": {\r\n \"test:bookstore\": {\r\n \"bookstore-name\": \"Chapters\",\r\n \"categories\": [\r\n {\r\n \"code\": \"01\",\r\n \"name\": \"Science\",\r\n \"books\": [\r\n {\r\n \"authors\": [\r\n \"Author1\",\r\n \"Author2\"\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": \"02\",\r\n \"name\": \"Arts\",\r\n \"books\": [\r\n {\r\n \"authors\": [\r\n \"Author3\"\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"edit-id\": \"edit2\",\r\n \"operation\": \"merge\",\r\n \"target\": \"/\",\r\n \"value\": {\r\n \"test:bookstore\": {\r\n \"bookstore-name\": \"Novels\",\r\n \"categories\": [\r\n {\r\n \"code\": \"03\",\r\n \"name\": \"History\",\r\n \"books\": [\r\n {\r\n \"authors\": [\r\n \"Iain M. Banks\",\r\n \"Ursula K. Le Guin\"\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n \"code\": \"04\",\r\n \"name\": \"Fiction\",\r\n \"books\": [\r\n {\r\n \"authors\": [\r\n \"Philip Pullman\"\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=NRCellDU/attributes/cellLocalId", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data", + "ds", + "ncmp-datastore:passthrough-running" + ], + "query": [ + { + "key": "resourceIdentifier", + "value": "NRCellDU/attributes/cellLocalId" + } + ] + } + }, + "response": [] + }, + { + "name": "Execute a batch data operation", + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic Y3BzdXNlcjpjcHNyMGNrcyE=", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"operations\": [\r\n {\r\n \"resourceIdentifier\": \"NRCellDU/attributes/cellLocalId\",\r\n \"targetIds\": [\r\n \"cm-handle-1\",\"cm-handle-2\"\r\n ],\r\n \"datastore\": \"ncmp-datastore:passthrough-operational\",\r\n \"options\": \"(fields=NRCellDU/attributes/cellLocalId)\",\r\n \"operationId\": \"12\",\r\n \"operation\": \"read\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/data?topic=batch-read-topic", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "data" + ], + "query": [ + { + "key": "topic", + "value": "batch-read-topic" + } + ] + } + }, + "response": [] + }, + { + "name": "Delete resource data", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/cm-handle-1/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=NRCellDU/attributes/cellLocalId", + "protocol": "http", + "host": [ + "{{CPS_HOST}}" + ], + "port": "{{CPS_PORT}}", + "path": [ + "ncmp", + "v1", + "ch", + "cm-handle-1", + "data", + "ds", + "ncmp-datastore:passthrough-running" + ], + "query": [ + { + "key": "resourceIdentifier", + "value": "NRCellDU/attributes/cellLocalId" + } + ] + } + }, + "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)" + }, + { + "name": "NCMP-DMI-Stub", + "item": [ + { + "name": "Execute a batch data operation (DMI)", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{ \"operations\":\n [\n {\n \"resourceIdentifier\": \"NRCellDU/attributes/cellLocalId\",\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": "Get module resources", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{DMI_HOST}}:{{DMI_PORT}}/dmi/v1/ch/cm/moduleResources", + "protocol": "http", + "host": [ + "{{DMI_HOST}}" + ], + "port": "{{DMI_PORT}}", + "path": [ + "dmi", + "v1", + "ch", + "cm", + "moduleResources" + ] + } + }, + "response": [] + }, + { + "name": "Get all modules (DMI)", + "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": [] + } + ], + "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`" + } + ] +}
\ No newline at end of file diff --git a/postman-collections/Data Operational Performance Test.postman_collection.json b/postman-collections/Data Operational Performance Test.postman_collection.json deleted file mode 100644 index 668c541d91..0000000000 --- a/postman-collections/Data Operational Performance Test.postman_collection.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "info": { - "_postman_id": "23a07cf3-5e20-48d5-8af3-8aa65c6a681f", - "name": "Data Operational Performance Test", - "description": "A collection to test performance of registering and getting cmHandles (20000 is the default)", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17907116" - }, - "item": [ - { - "name": "Register CM Handles", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "const uuid = require(\"uuid\");", - "", - "const TOTAL_CMHANDLES = Number(pm.collectionVariables.get(\"TOTAL_CMHANDLES\"));", - "", - "var cmHandleIds = [];", - "var createdCmHandles = []", - "", - "for (i = 0; i < TOTAL_CMHANDLES; i++) {", - " let cmHandleId = uuid.v4().replace(/-/g, \"\");", - " cmHandleIds.push(cmHandleId);", - " createdCmHandles.push({", - " \"cmHandle\": cmHandleId,", - " \"cmHandleProperties\": { \"neType\": \"RadioNode\" },", - " \"publicCmHandleProperties\": {", - " \"Book\": \"Harry Potter\",", - " \"Author\": \"JK Rowling\"", - " }", - " });", - "}", - "", - "pm.collectionVariables.set(\"createdCmHandleIds\", JSON.stringify(cmHandleIds));", - "pm.collectionVariables.set(\"createdCmHandles\", JSON.stringify(createdCmHandles));", - "pm.collectionVariables.set(\"targetIds\", cmHandleIds);" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"HTTP Status is 200\", function () {\r", - " pm.response.to.be.ok;\r", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"dmiPlugin\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\",\r\n \"createdCmHandles\": {{createdCmHandles}}\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" - ] - } - }, - "response": [] - }, - { - "name": "Get All Cm Handle IDs", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "// Convert the response body to a JSON object\r", - "var responseBodyAsJsonArray = JSON.parse(responseBody);\r", - "\r", - "var cmHandleInReadyState = [];\r", - "var cmHandleInNonReadyState = [];\r", - "\r", - "function countCmHandleStateInReady() {\r", - "for(var index = 0; index < responseBodyAsJsonArray.length; index++) {\r", - " if(typeof responseBodyAsJsonArray[index].state.cmHandleState !== 'undefined'\r", - " && responseBodyAsJsonArray[index].state.cmHandleState == 'READY') {\r", - " cmHandleInReadyState.push(responseBodyAsJsonArray[index].state.cmHandleState);\r", - " }else{\r", - " cmHandleInNonReadyState.push(responseBodyAsJsonArray[index].state.cmHandleState);\r", - " }\r", - "}\r", - "}\r", - "\r", - "countCmHandleStateInReady();\r", - "\r", - "pm.collectionVariables.set(\"numberOfCmHandlesInReadyState\", cmHandleInReadyState.length);\r", - "pm.collectionVariables.set(\"numberOfCmHandlesInNonReadyState\", cmHandleInNonReadyState.length);\r", - "\r", - "pm.test(\"HTTP Status is 200 with valid JSON response\", function () {\r", - " pm.response.to.be.ok;\r", - " pm.response.to.be.withBody;\r", - " pm.response.to.be.json;\r", - "});\r", - "\r", - "pm.test(\"20000 cm handles are in Ready state\", function () {\r", - " pm.expect(cmHandleInReadyState.length).to.eql(20000);\r", - "});\r", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"conditions\": [\r\n {\r\n \"name\": \"hasAllModules\"\r\n }\r\n ]\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ], - "query": [ - { - "key": "resourceIdentifier", - "value": "stores:bookstore", - "disabled": true - }, - { - "key": "options", - "value": "(fields=schemas/schema/location,depth=5)", - "disabled": true - } - ] - } - }, - "response": [] - }, - { - "name": "ReadResourceDataForCmHandles", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "const cmHandleIds = pm.collectionVariables.get(\"targetIds\"); \r", - "\r", - "var dataOperationRequest = []\r", - "var targetIds = [];\r", - "\r", - "for (index = 0; index < cmHandleIds.length ; index++) {\r", - "\r", - " targetIds.push(cmHandleIds[index]);\r", - " var dataOperationTargetIds = [];\r", - " if (targetIds.length == 5){\r", - " dataOperationTargetIds = targetIds;\r", - " dataOperationRequest.push({\r", - " \"operation\": \"read\",\r", - " \"operationId\": \"operational-\"+index,\r", - " \"datastore\": \"ncmp-datastore:passthrough-running\",\r", - " \"resourceIdentifier\": \"parent/child\",\r", - " \"targetIds\": dataOperationTargetIds\r", - " });\r", - "\r", - " pm.collectionVariables.unset(\"dataOperationTargetIds\");\r", - " // pm.globals.unset(\"variable_key\");\r", - " // pm.environment.unset(\"variable_key\");\r", - " // pm.collectionVariables.set(\"variable_key\", \"variable_value\");\r", - " // pm.sendRequest(\"https://postman-echo.com/get\", function (err, response) {\r", - " // console.log(response.json());\r", - " // });\r", - " // for (index = 0; index < dataOperationTargetIds.length ; index++) {\r", - " // targetIds.pop(dataOperationTargetIds[index]);\r", - " // }\r", - " }\r", - "}\r", - "\r", - " pm.collectionVariables.set(\"dataOperationRequest\", JSON.stringify(dataOperationRequest));" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"HTTP Status is 200 with valid JSON response\", function () {\r", - " pm.response.to.be.ok;\r", - " pm.response.to.be.withBody;\r", - " pm.response.to.be.json;\r", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "topic", - "value": "client-topic", - "type": "default", - "disabled": true - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"operations\":\r\n {{dataOperationRequest}}\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/data?topic=my-client-topic", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "data" - ], - "query": [ - { - "key": "topic", - "value": "my-client-topic" - } - ] - } - }, - "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": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "createdCmHandleIds", - "value": "" - }, - { - "key": "createdCmHandles", - "value": "" - }, - { - "key": "TOTAL_CMHANDLES", - "value": "20000", - "type": "default" - }, - { - "key": "numberOfCmHandlesInReadyState", - "value": "", - "type": "default" - }, - { - "key": "numberOfCmHandlesInNonReadyState", - "value": "", - "type": "default" - }, - { - "key": "dataOperationRequest", - "value": "", - "type": "default" - }, - { - "key": "targetIds", - "value": "", - "type": "default" - } - ] -}
\ No newline at end of file diff --git a/postman-collections/NCMP Register CmHandle and Query.postman_collection.json b/postman-collections/NCMP Register CmHandle and Query.postman_collection.json deleted file mode 100644 index fb14287241..0000000000 --- a/postman-collections/NCMP Register CmHandle and Query.postman_collection.json +++ /dev/null @@ -1,649 +0,0 @@ -{ - "info": { - "_postman_id": "4e232e66-914a-4b5e-8f7f-f9ae0d476f54", - "name": "NCMP Register CmHandle and Query", - "description": "A collection to register a cmHandle then query. There are \"Valid Queries\" and \"Invalid Queries\" sub-folders containing examples. These are by no means exhaustive.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "17907116" - }, - "item": [ - { - "name": "Valid Queries", - "item": [ - { - "name": "search cmHandles without conditions", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "search cmHandles with modules query", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllModules\",\n \"conditionParameters\": [ {\"moduleName\": \"notifications\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "search cmHandles with public properties", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllProperties\",\n \"conditionParameters\": [ {\"Color\": \"yellow\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "search cmHandles with multiple public properties", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllProperties\",\n \"conditionParameters\": [ {\"Color\": \"yellow\"}, {\"Size\": \"small\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "search cmHandles with modules & pubprop query", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllModules\",\n \"conditionParameters\": [ {\"moduleName\": \"notifications\"} ]\n },\n {\n \"conditionName\": \"hasAllProperties\",\n \"conditionParameters\": [ {\"Color\": \"yellow\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Invalid Queries", - "item": [ - { - "name": "get cmHandles with wrong condition name", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"wrong\",\n \"conditionParameters\": [ {\"Color\": \"yellow\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with empty condition name", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"\",\n \"conditionParameters\": [ {\"Color\": \"yellow\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with null condition name", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionParameters\": [ {\"Color\": \"yellow\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with empty key", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllProperties\",\n \"conditionParameters\": [ {\"\": \"yellow\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with empty condition", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllProperties\",\n \"conditionParameters\": [ {} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with empty condition list", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllProperties\",\n \"conditionParameters\": [ ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with null condition list", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllProperties\"\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with empty module value", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllModules\",\n \"conditionParameters\": [ {\"moduleName\": \"\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandles with wrong module name", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"cmHandleQueryParameters\": [\n {\n \"conditionName\": \"hasAllModules\",\n \"conditionParameters\": [ {\"moduleName2\": \"mudule-1\"} ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/searches", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "searches" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Register cmHandle for Node", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"dmiPlugin\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\",\n \"createdCmHandles\": [\n {\n \"cmHandle\": \"CmHandle0\",\n \"cmHandleProperties\": {\n \"Books\": \"Sci-Fi Book\"\n },\n \"publicCmHandleProperties\": {\n \"Color\": \"yellow\",\n \"Size\": \"small\",\n \"Shape\": \"cube\"\n }\n }\n ]\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" - ] - } - }, - "response": [] - }, - { - "name": "get cmHandle", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/CmHandle0", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "CmHandle0" - ] - } - }, - "response": [] - }, - { - "name": "get modules for cmHandle", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://{{CPS_HOST}}:{{CPS_PORT}}/ncmp/v1/ch/CmHandle0/modules", - "protocol": "http", - "host": [ - "{{CPS_HOST}}" - ], - "port": "{{CPS_PORT}}", - "path": [ - "ncmp", - "v1", - "ch", - "CmHandle0", - "modules" - ] - } - }, - "response": [] - }, - { - "name": "Update cmHandle for Node", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"dmiPlugin\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\",\n \"updatedCmHandles\": [\n {\n \"cmHandle\": \"CmHandle0\",\n \"cmHandleProperties\": {\n \"Books\": \"Sci-Fi Book\",\n \"Some property\": \"Some value\"\n },\n \"publicCmHandleProperties\": {\n \"Color\": \"yellow\",\n \"Size\": \"small\",\n \"Shape\": \"cube\",\n \"Some public property\": \"Some public value\"\n }\n }\n ]\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" - ] - } - }, - "response": [] - }, - { - "name": "De-register cmHandle for Node", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"dmiPlugin\": \"http://{{DMI_HOST}}:{{DMI_PORT}}\",\n \"removedCmHandles\": [\n \"CmHandle0\"\n ]\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" - ] - } - }, - "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 diff --git a/postman-collections/README.md b/postman-collections/README.md index 004ef5b744..d4a1c63adf 100644 --- a/postman-collections/README.md +++ b/postman-collections/README.md @@ -27,8 +27,11 @@ To import the CPS collections and environment: 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 +## 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. + ## Running the collections -To run the requests in the collections 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) +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) ## Notes When exporting postman collections tabs are used for spacing, so replacing all the tabs is necessary diff --git a/postman-collections/bookstore-types.yang b/postman-collections/bookstore-types.yang deleted file mode 100644 index 5ad7b6e130..0000000000 --- a/postman-collections/bookstore-types.yang +++ /dev/null @@ -1,18 +0,0 @@ -module bookstore-types { - yang-version 1.1; - namespace "org:onap:cps:types:sample"; - - prefix types; - - revision "2024-01-30" { - description - "Sample Types"; - } - - typedef year { - type uint16 { - range "1000..9999"; - } - } - -}
\ No newline at end of file diff --git a/postman-collections/bookstore.yang b/postman-collections/bookstore.yang deleted file mode 100644 index 0d093ea36c..0000000000 --- a/postman-collections/bookstore.yang +++ /dev/null @@ -1,127 +0,0 @@ -module stores { - yang-version 1.1; - namespace "org:onap:cps:sample"; - - prefix book-store; - - import bookstore-types { - prefix "types"; - revision-date 2024-01-30; - } - - revision "2024-02-08" { - description - "Order of book authors is preserved"; - } - - revision "2024-01-30" { - description - "Extracted bookstore types"; - } - - revision "2020-09-15" { - description - "Sample Model"; - } - - list bookstore-address { - key "bookstore-name"; - leaf bookstore-name { - type string; - description - "Name of bookstore. Example: My Bookstore"; - } - leaf address { - type string; - description - "Address of store"; - } - leaf postal-code { - type string; - description - "Postal code of store"; - } - } - - container bookstore { - - leaf bookstore-name { - type string; - } - - container webinfo { - leaf domain-name { - type string; - } - leaf contact-email { - type string; - } - } - - container support-info { - leaf support-office { - type string; - } - container contact-emails { - leaf email { - type string; - } - } - } - - container container-without-leaves { } - - container premises { - list addresses { - key "house-number street"; - - leaf house-number { - type uint16; - } - leaf street { - type string; - } - leaf town { - type string; - } - leaf county { - type string; - } - } - } - - list categories { - - key "code"; - - leaf code { - type string; - } - - leaf name { - type string; - } - - list books { - key title; - - leaf title { - type string; - } - leaf lang { - type string; - } - leaf-list authors { - ordered-by user; - type string; - } - leaf-list editions { - type types:year; - } - leaf price { - type uint64; - } - } - } - } -} diff --git a/postman-collections/bookstore.zip b/postman-collections/bookstore.zip Binary files differnew file mode 100644 index 0000000000..2d5e15b6ea --- /dev/null +++ b/postman-collections/bookstore.zip |