From f049426bfd8142f0ee9851d7ec6281b5c2b5f2e0 Mon Sep 17 00:00:00 2001 From: Rene_Robert Date: Tue, 30 Jul 2019 17:11:26 +0200 Subject: Issue-ID: INT-1178 updated Postman collection for Dublin Signed-off-by: Rene_Robert Change-Id: I94b9180e86b96f75780854211da67d85acc90d48 (cherry picked from commit 0ebd04f1cbce5640747b6791582c7b8db09ef8ea) --- ...vice_Subscription_Cloud.postman_collection.json | 1094 ++++++++++++-------- 1 file changed, 655 insertions(+), 439 deletions(-) (limited to 'test/postman/08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json') diff --git a/test/postman/08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json b/test/postman/08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json index faa53d2f7..aac2f008b 100644 --- a/test/postman/08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json +++ b/test/postman/08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json @@ -1,10 +1,8 @@ { - "variables": [], "info": { + "_postman_id": "f60d6e53-cb99-447c-b35d-37912228ee5e", "name": "08_Declare_Customer_Service_Subscription_Cloud", - "_postman_id": "ea6f17c2-1abd-62ff-a260-17fad1bdf6b8", - "description": "", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { @@ -13,71 +11,77 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "5c0ee107-621b-4b01-9506-cd8628b01179", "exec": [ "var customer_found = false;", - "if (responseCode.code === 404) {", - " tests[postman.getGlobalVariable(\"customer_name\")+\" does not exists\"] = true;", + "if (pm.response.code === 404) {", + " tests[pm.globals.get(\"customer_name\")+\" does not exists\"] = true;", "}", "else {", - " if (responseCode.code === 200) {", - " tests[\"Status code is 200\"] = responseCode.code === 200;", + " if (pm.response.code === 200) {", + " tests[\"Status code is 200\"] = pm.response.code === 200;", " }", - " var jsonData = JSON.parse(responseBody);", + " var jsonData = pm.response.json();", " for (var i = 0; i < jsonData.customer.length; i++) { ", - " if (jsonData.customer[i][\"global-customer-id\"] === postman.getGlobalVariable(\"customer_name\")) {", + " if (jsonData.customer[i][\"global-customer-id\"] === pm.globals.get(\"customer_name\")) {", " customer_found = true;", - " postman.setGlobalVariable(\"auto_customer_id\", \"\"+jsonData.customer[i][\"global-customer-id\"]+\"\");", + " pm.globals.set(\"auto_customer_id\", \"\"+jsonData.customer[i][\"global-customer-id\"]+\"\");", " }", " }", " if (customer_found === false) {", - " tests[postman.getGlobalVariable(\"customer_name\")+\" does not exists\"] = true;", + " tests[pm.globals.get(\"customer_name\")+\" does not exists\"] = true;", " }", " ", " else {", - " tests[postman.getGlobalVariable(\"customer_name\")+\" already exists, we skip creation\"] = true;", + " tests[pm.globals.get(\"customer_name\")+\" already exists, we skip creation\"] = true;", " postman.setNextRequest(\"List Services from SDC catalog\");", " }", "}" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/business/customers", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], "body": { "mode": "raw", - "raw": "{\r\n \"global-customer-id\": \"Chouchen22\",\r\n \"subscriber-name\": \"Chouchen22\",\r\n \"subscriber-type\": \"INFRA\"\r\n}" + "raw": "" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/business/customers", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "business", + "customers" + ] + } }, "response": [] }, @@ -87,48 +91,58 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "3f8fbd67-36f6-4ae2-a2ab-d23f1f690133", "exec": [ - "tests[\"Status code is 201\"] = responseCode.code === 201;" - ] + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/business/customers/customer/{{customer_name}}", "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], "body": { "mode": "raw", "raw": "{\n \"global-customer-id\": \"{{customer_name}}\",\n \"subscriber-name\": \"{{customer_name}}\",\n \"subscriber-type\": \"INFRA\"\n}" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/business/customers/customer/{{customer_name}}", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "business", + "customers", + "customer", + "{{customer_name}}" + ] + } }, "response": [] }, @@ -138,58 +152,66 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "e459dbcf-bf32-4aef-a9b1-5d1adfb525fc", "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", "", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "var customer_found = false;", "for (var i = 0; i < jsonData.customer.length; i++) { ", - " if (jsonData.customer[i][\"global-customer-id\"] === postman.getGlobalVariable(\"customer_name\")) {", + " if (jsonData.customer[i][\"global-customer-id\"] === pm.globals.get(\"customer_name\")) {", " customer_found = true;", - " postman.setGlobalVariable(\"auto_customer_id\", \"\"+jsonData.customer[i][\"global-customer-id\"]+\"\");", + " pm.globals.set(\"auto_customer_id\", \"\"+jsonData.customer[i][\"global-customer-id\"]+\"\");", " }", "}", - "tests[postman.getGlobalVariable(\"customer_name\")+\" found\"] = customer_found === true;" - ] + "tests[pm.globals.get(\"customer_name\")+\" found\"] = customer_found === true;" + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/business/customers", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], "body": { "mode": "raw", - "raw": "{\r\n \"global-customer-id\": \"Chouchen22\",\r\n \"subscriber-name\": \"Chouchen22\",\r\n \"subscriber-type\": \"INFRA\"\r\n}" + "raw": "" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/business/customers", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "business", + "customers" + ] + } }, "response": [] }, @@ -199,76 +221,82 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "a496d4dc-e343-42d4-8377-6d18d3570c82", "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", "", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "var service_found = false;", "for (var i = 0; i < jsonData.length; i++) { ", - " if (jsonData[i][\"name\"] === postman.getGlobalVariable(\"service\")) {", + " if (jsonData[i].name === pm.globals.get(\"service\")) {", " service_found = true;", - " postman.setGlobalVariable(\"auto_service_invariantUUID\", \"\"+jsonData[i][\"invariantUUID\"]+\"\");", + " pm.globals.set(\"auto_service_invariantUUID\", \"\"+jsonData[i].invariantUUID+\"\");", " }", "}", "", "if (service_found === false) {", - " tests[postman.getGlobalVariable(\"service\")+\" does not exists\"] = true;", + " tests[\"Service : \"+pm.globals.get(\"service\")+\" does not exist in SDC catalog, we stop the run\"] = true;", " postman.setNextRequest(null);", "}", "", "else {", - " tests[postman.getGlobalVariable(\"service\")+\" exists, we continue the run\"] = true;", + " tests[\"Service : \"+pm.globals.get(\"service\")+\" exists in SDC catalog, we can continue the run\"] = true;", "}" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-sdc}}/sdc/v1/catalog/services", "method": "GET", "header": [ { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "ONAP-Test", - "description": "" + "value": "ONAP-Test" }, { "key": "USER_ID", - "value": "cs0008", - "description": "" + "value": "cs0008" }, { "key": "X-FromAppId", - "value": "ONAP-Test", - "description": "" + "value": "ONAP-Test" }, { "key": "Authorization", - "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=", - "description": "" + "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" }, { "key": "x-ecomp-instanceid", - "value": "ONAP-Test", - "description": "" + "value": "ONAP-Test" } ], "body": { "mode": "raw", - "raw": "{\"contactId\": \"cs0008\", \"vendorRelease\": \"1.0\", \"requirements\": {}, \"artifacts\": {}, \"capabilities\": {}, \"componentInstancesProperties\": {}, \"deploymentArtifacts\": {}, \"icon\": \"defaulticon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor software product\", \"tags\": [\"test-vsp\"], \"groups\": [], \"properties\": [], \"categories\": [{\"subcategories\": [{\"normalizedName\": \"abstract\", \"name\": \"Abstract\", \"uniqueId\": \"resourceNewCategory.generic.abstract\", \"icons\": [\"icon\"]}], \"normalizedName\": \"generic\", \"name\": \"Generic\", \"uniqueId\": \"resourceNewCategory.generic\"}], \"name\": \"test-vsp\", \"toscaArtifacts\": {}, \"csarUUID\": \"F3CD5189C2DF45B4B1CFA6D6E45FD613\", \"resourceType\": \"VF\", \"csarVersion\": \"1.0\", \"componentType\": \"RESOURCE\", \"componentInstancesAttributes\": {}, \"attributes\": [], \"componentInstances\": []}" + "raw": "" }, - "description": "" + "url": { + "raw": "{{url-sdc}}/sdc/v1/catalog/services", + "host": [ + "{{url-sdc}}" + ], + "path": [ + "sdc", + "v1", + "catalog", + "services" + ] + } }, "response": [] }, @@ -278,111 +306,138 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "654cc91a-920b-4b79-9177-15b622749cb4", "exec": [ "var service_found = false;", - "if (responseCode.code === 404) {", - " tests[postman.getGlobalVariable(\"service\")+\" does not exists in AAI\"] = true;", + "if (pm.response.code === 404) {", + " tests[pm.globals.get(\"service\")+\" does not exists in AAI\"] = true;", "}", "else {", - " if (responseCode.code === 200) {", - " tests[\"Status code is 200\"] = responseCode.code === 200;", + " if (pm.response.code === 200) {", + " tests[\"Status code is 200\"] = pm.response.code === 200;", " }", - " var jsonData = JSON.parse(responseBody);", + " var jsonData = pm.response.json();", " for (var i = 0; i < jsonData.service.length; i++) { ", - " if (jsonData.service[i][\"service-description\"] === postman.getGlobalVariable(\"service\")) {", + " if (jsonData.service[i][\"service-description\"] === pm.globals.get(\"service\")) {", " service_found = true;", " }", " }", " ", " if (service_found === false) {", - " tests[postman.getGlobalVariable(\"service\")+\" does not exists in AAI\"] = true;", + " tests[\"Service subscription : \"+pm.globals.get(\"service\")+\" does not exists in AAI\"] = true;", " }", " ", " else {", - " tests[postman.getGlobalVariable(\"service\")+\" already exists in AAI, we skip creation\"] = true;", + " tests[\"Service subscription : \"+pm.globals.get(\"service\")+\" already exists in AAI, we skip creation\"] = true;", " postman.setNextRequest(\"check cloud-region exists\");", " }", "}" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/service-design-and-creation/services", "method": "GET", "header": [ { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "X-TransactionId", - "value": "get_aai_subscr", - "description": "" + "value": "get_aai_subscr" }, { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" } ], "body": { "mode": "raw", "raw": "" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/service-design-and-creation/services", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "service-design-and-creation", + "services" + ] + } }, "response": [] }, { "name": "Declare subscription in AAI", + "event": [ + { + "listen": "test", + "script": { + "id": "c82062d1-c394-47d8-ab3d-14f777c32971", + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { - "url": "{{url-aai}}/aai/v14/service-design-and-creation/services/service/{{auto_service_invariantUUID}}", "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\"service-id\": \"{{auto_service_invariantUUID}}\",\r\n\"service-description\": \"{{service}}\"\r\n}" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/service-design-and-creation/services/service/{{auto_service_invariantUUID}}", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "service-design-and-creation", + "services", + "service", + "{{auto_service_invariantUUID}}" + ] + } }, "response": [] }, @@ -392,58 +447,65 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "ddb1ab24-cbf4-4d50-a237-614143e66a66", "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", - "", - "var jsonData = JSON.parse(responseBody);", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var jsonData = pm.response.json();", "var service_found = false;", "for (var i = 0; i < jsonData.service.length; i++) { ", - " if (jsonData.service[i][\"service-description\"] === postman.getGlobalVariable(\"service\")) {", + " if (jsonData.service[i][\"service-description\"] === pm.globals.get(\"service\")) {", " service_found = true;", - " postman.setGlobalVariable(\"auto_service_resource_version\", \"\"+jsonData.service[i][\"resource-version\"]+\"\");", + " pm.globals.set(\"auto_service_resource_version\", \"\"+jsonData.service[i][\"resource-version\"]+\"\");", " }", "}", - "tests[postman.getGlobalVariable(\"service\")+\" found\"] = service_found === true;" - ] + "tests[\"Service subscription : \"+pm.globals.get(\"service\")+\" found in AAI\"] = service_found === true;" + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/service-design-and-creation/services", "method": "GET", "header": [ { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "X-TransactionId", - "value": "get_aai_subscr", - "description": "" + "value": "get_aai_subscr" }, { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" } ], "body": { "mode": "raw", "raw": "" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/service-design-and-creation/services", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "service-design-and-creation", + "services" + ] + } }, "response": [] }, @@ -453,62 +515,72 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "12df16bd-e361-45ec-8663-b8a404bb13ce", "exec": [ "var complex_found = false;", - "if (responseCode.code === 404) {", - " tests[postman.getGlobalVariable(\"complex_name\")+\" does not exists in AAI\"] = true;", + "if (pm.response.code === 404) {", + " tests[pm.globals.get(\"complex_name\")+\" does not exists in AAI\"] = true;", "}", "else {", - " if (responseCode.code === 200) {", - " tests[\"Status code is 200\"] = responseCode.code === 200;", + " if (pm.response.code === 200) {", + " tests[\"Status code is 200\"] = pm.response.code === 200;", " }", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "for (var i = 0; i < jsonData[\"complex\"].length; i++) { ", - " if (jsonData[\"complex\"][i][\"complex-name\"] === postman.getGlobalVariable(\"complex_name\")) {", + " if (jsonData[\"complex\"][i][\"complex-name\"] === pm.globals.get(\"complex_name\")) {", " complex_found = true;", " }", "}", "", "if (complex_found === false) {", - " tests[postman.getGlobalVariable(\"complex_name\")+\" does not exists\"] = true;", + " tests[pm.globals.get(\"complex_name\")+\" does not exist yet\"] = true;", "}", "else {", - " tests[postman.getGlobalVariable(\"complex_name\")+\" already exists, we skip creation\"] = true;", + " tests[pm.globals.get(\"complex_name\")+\" already exists, we skip creation\"] = true;", " postman.setNextRequest(\"check cloud-region exists\");", "}", "}" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/complexes", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], - "body": {}, - "description": "" + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/complexes", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "complexes" + ] + } }, "response": [] }, @@ -518,48 +590,58 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "c6021ddb-13b1-472b-acdd-55c4f550461f", "exec": [ - "tests[\"Status code is 201\"] = responseCode.code === 201;" - ] + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/complexes/complex/{{complex_name}}", "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"physical-location-id\": \"{{complex_name}}\",\n \"data-center-code\": \"\",\n \"complex-name\": \"{{complex_name}}\",\n \"identity-url\": \"\",\n \"physical-location-type\": \"\",\n \"street1\": \"\",\n \"street2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postal-code\": \"\",\n \"country\": \"\",\n \"region\": \"\",\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"elevation\": \"\",\n \"lata\": \"\"\n}" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/complexes/complex/{{complex_name}}", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "complexes", + "complex", + "{{complex_name}}" + ] + } }, "response": [] }, @@ -569,50 +651,62 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "eed67b4e-d3b5-4ba7-a254-6e8d44e10be0", "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", "", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "var complex_found = false;", "for (var i = 0; i < jsonData[\"complex\"].length; i++) { ", - " if (jsonData[\"complex\"][i][\"complex-name\"] === postman.getGlobalVariable(\"complex_name\")) {", + " if (jsonData[\"complex\"][i][\"complex-name\"] === pm.globals.get(\"complex_name\")) {", " complex_found = true;", " }", "}", - "tests[postman.getGlobalVariable(\"complex_name\")+\" found\"] = complex_found === true;", + "tests[\"Complex : \"+pm.globals.get(\"complex_name\")+\" found\"] = complex_found === true;", "" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/complexes", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], - "body": {}, - "description": "" + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/complexes", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "complexes" + ] + } }, "response": [] }, @@ -622,113 +716,134 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "705695aa-21b8-4b3f-9e00-4f46178f37d0", "exec": [ "var region_found = false;", - "if (responseCode.code === 404) {", - " tests[postman.getGlobalVariable(\"onap_cloud_region_id\")+\" does not exists in AAI\"] = true;", + "if (pm.response.code === 404) {", + " tests[pm.globals.get(\"onap_cloud_region_id\")+\" does not exists in AAI\"] = true;", "}", "else {", - " if (responseCode.code === 200) {", - " tests[\"Status code is 200\"] = responseCode.code === 200;", + " if (pm.response.code === 200) {", + " tests[\"Status code is 200\"] = pm.response.code === 200;", " }", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "for (var i = 0; i < jsonData[\"cloud-region\"].length; i++) { ", - " if (jsonData[\"cloud-region\"][i][\"cloud-region-id\"] === postman.getGlobalVariable(\"onap_cloud_region_id\")) {", + " if ((jsonData[\"cloud-region\"][i][\"cloud-region-id\"] === pm.globals.get(\"onap_cloud_region_id\")) && (jsonData[\"cloud-region\"][i][\"cloud-owner\"] === pm.globals.get(\"cloud_owner_name\"))) {", " region_found = true;", " }", "}", "", "if (region_found === false) {", - " tests[postman.getGlobalVariable(\"onap_cloud_region_id\")+\" does not exists\"] = true;", + " tests[pm.globals.get(\"onap_cloud_region_id\")+\" does not exist yet for cloudOwner \"+pm.globals.get(\"cloud_owner_name\")] = true;", "}", "else {", - " tests[postman.getGlobalVariable(\"onap_cloud_region_id\")+\" already exists, we skip creation\"] = true;", + " tests[pm.globals.get(\"onap_cloud_region_id\")+\" already exists, we skip creation\"] = true;", " postman.setNextRequest(\"check tenant in cloud region\");", "}", "}" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], - "body": {}, - "description": "" + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions" + ] + } }, "response": [] }, { - "name": "create CloudOwner/RegionOne cloud-region", + "name": "create cloud-region", "event": [ { "listen": "test", "script": { - "type": "text/javascript", + "id": "41f77bea-f6cd-4bd9-961d-b02f42751db0", "exec": [ - "tests[\"Status code is 201\"] = responseCode.code === 201;" - ] + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}", "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"cloud-owner\": \"{{cloud_owner_name}}\",\r\n \"cloud-region-id\": \"{{onap_cloud_region_id}}\",\r\n \"cloud-type\": \"{{cloud_type}}\",\r\n \"owner-defined-type\": \"\",\r\n \"cloud-region-version\": \"{{cloud_region_version}}\",\r\n \"cloud-zone\": \"\",\r\n \"complex-name\": \"{{complex_name}}\",\r\n \"identity-url\": \"WillBeUpdatedByMultiCloud\",\r\n \"sriov-automation\": false,\r\n \"cloud-extra-info\": \"{\\\"openstack-region-id\\\":\\\"{{openstack_region_id}}\\\"}\",\r\n \"esr-system-info-list\": {\r\n \t\"esr-system-info\": [\r\n {\r\n \"esr-system-info-id\": \"{{random_uuid}}\",\r\n \"service-url\": \"{{keystone_url}}\",\r\n \"user-name\": \"{{user_name}}\",\r\n \"password\": \"{{keystone_password}}\",\r\n \"system-type\": \"VIM\",\r\n \"ssl-insecure\": true,\r\n \"cloud-domain\": \"Default\",\r\n \"default-tenant\": \"{{tenant_name}}\",\r\n \"system-status\": \"active\"\r\n }\r\n ]\r\n }\r\n}" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions", + "cloud-region", + "{{cloud_owner_name}}", + "{{onap_cloud_region_id}}" + ] + } }, "response": [] }, @@ -738,50 +853,61 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "a386bb95-c0fa-49b2-9837-efcdc6b40a86", "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", - "", - "var jsonData = JSON.parse(responseBody);", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var jsonData = pm.response.json();", "var region_found = false;", "for (var i = 0; i < jsonData[\"cloud-region\"].length; i++) { ", - " if (jsonData[\"cloud-region\"][i][\"cloud-region-id\"] === postman.getGlobalVariable(\"onap_cloud_region_id\")) {", + " if (jsonData[\"cloud-region\"][i][\"cloud-region-id\"] === pm.globals.get(\"onap_cloud_region_id\")) {", " region_found = true;", " }", "}", - "tests[postman.getGlobalVariable(\"onap_cloud_region_id\")+\" found\"] = region_found === true;", + "tests[\"Cloud-Region : \"+pm.globals.get(\"onap_cloud_region_id\")+\" found\"] = region_found === true;", "" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], - "body": {}, - "description": "" + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions" + ] + } }, "response": [] }, @@ -791,49 +917,60 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "ad16fc86-7954-434f-bc45-25710ebeee57", "exec": [ - "tests[\"Status code is 200 : cloud-region associated to a complex\"] = responseCode.code === 200;", + "tests[\"Status code is 200 : cloud-region associated to complex\"] = pm.response.code === 200;", "" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/relationship-list/relationship", "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], "body": { "mode": "raw", - "raw": "{\n \"related-to\": \"complex\",\n \"related-link\": \"/aai/v13/cloud-infrastructure/complexes/complex/{{complex_name}}\",\n \"relationship-data\": [\n {\n \"relationship-key\": \"complex.physical-location-id\",\n \"relationship-value\": \"{{complex_name}}\"\n }\n ]\n }" + "raw": "{\n \"related-to\": \"complex\",\n \"related-link\": \"/aai/v16/cloud-infrastructure/complexes/complex/{{complex_name}}\",\n \"relationship-data\": [\n {\n \"relationship-key\": \"complex.physical-location-id\",\n \"relationship-value\": \"{{complex_name}}\"\n }\n ]\n }" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/relationship-list/relationship", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions", + "cloud-region", + "{{cloud_owner_name}}", + "{{onap_cloud_region_id}}", + "relationship-list", + "relationship" + ] + } }, "response": [] }, @@ -843,75 +980,88 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "4367f5c4-0bf0-4e09-bc58-9a8bd6578685", "exec": [ "var tenant_found = false;", - "if (responseCode.code === 404) {", - " tests[postman.getGlobalVariable(\"tenant_name\")+\" does not exists in AAI\"] = true;", + "if (pm.response.code === 404) {", + " tests[pm.globals.get(\"tenant_name\")+\" does not exists in AAI\"] = true;", "}", "else {", - " if (responseCode.code === 200) {", - " tests[\"Status code is 200\"] = responseCode.code === 200;", + " if (pm.response.code === 200) {", + " tests[\"Status code is 200\"] = pm.response.code === 200;", " }", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "", "if(jsonData.hasOwnProperty('tenant'))", " {", " for (var i = 0; i < jsonData.tenant.length; i++) ", " { ", - " if (jsonData.tenant[i]['tenant-id'] === postman.getGlobalVariable(\"tenant_id\")) ", + " if (jsonData.tenant[i]['tenant-id'] === pm.globals.get(\"tenant_id\")) ", " {", " tenant_found = true;", " }", " }", " if (tenant_found === true) ", " {", - " tests[postman.getGlobalVariable(\"tenant_name\")+\" already exists, we skip creation\"] = true;", + " tests[pm.globals.get(\"tenant_name\")+\" already exists, we skip creation\"] = true;", " postman.setNextRequest(\"check customer-service-tenant relations\");", " }", "", "if (tenant_found === false)", " {", - " tests[postman.getGlobalVariable(\"tenant_name\")+\" does not exists\"] = true;", + " tests[pm.globals.get(\"tenant_name\")+\" does not exists\"] = true;", " }", "}", "}" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], - "body": {}, - "description": "" + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions", + "cloud-region", + "{{cloud_owner_name}}", + "{{onap_cloud_region_id}}", + "tenants" + ] + } }, "response": [] }, @@ -921,48 +1071,62 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "4d1eee0e-6afd-44e8-b1cc-269a1249232d", "exec": [ - "tests[\"Status code is 201\"] = responseCode.code === 201;" - ] + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants/tenant/{{tenant_id}}", "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "get_aai_subscr", - "description": "" + "value": "get_aai_subscr" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"tenant-id\": \"{{tenant_id}}\",\n \"tenant-name\": \"{{tenant_name}}\"\n}" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants/tenant/{{tenant_id}}", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions", + "cloud-region", + "{{cloud_owner_name}}", + "{{onap_cloud_region_id}}", + "tenants", + "tenant", + "{{tenant_id}}" + ] + } }, "response": [] }, @@ -972,55 +1136,69 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "716f0a8a-37b3-412f-8d7b-acef34597bee", "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;", - "", - "var jsonData = JSON.parse(responseBody);", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var jsonData = pm.response.json();", "var tenant_found = false;", - "for (var i = 0; i < jsonData[\"tenant\"].length; i++) { ", - " if (jsonData[\"tenant\"][i][\"tenant-id\"] === postman.getGlobalVariable(\"tenant_id\")) {", + "for (var i = 0; i < jsonData.tenant.length; i++) { ", + " if (jsonData.tenant[i][\"tenant-id\"] === pm.globals.get(\"tenant_id\")) {", " tenant_found = true;", " }", "}", - "tests[postman.getGlobalVariable(\"tenant_name\")+\" found\"] = tenant_found === true;", + "tests[pm.globals.get(\"tenant_name\")+\" found\"] = tenant_found === true;", "" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": "{{url-aai}}/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants", "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" } ], - "body": {}, - "description": "" + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url-aai}}/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "cloud-infrastructure", + "cloud-regions", + "cloud-region", + "{{cloud_owner_name}}", + "{{onap_cloud_region_id}}", + "tenants" + ] + } }, "response": [] }, @@ -1030,46 +1208,74 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "587ed4e3-e181-49c1-9f21-08d366a52587", "exec": [ "var relation_found = false;", - "if (responseCode.code === 404) {", - " tests[postman.getGlobalVariable(\"tenant_name\")+\" / \"+postman.getGlobalVariable(\"service\")+ \" relation does not exists\"] = true;", + "if (pm.response.code === 404) {", + " tests[pm.globals.get(\"tenant_name\")+\" / \"+pm.globals.get(\"service\")+ \" relation does not exists\"] = true;", "}", "else {", - " if (responseCode.code === 200) {", - " tests[\"Status code is 200\"] = responseCode.code === 200;", + " if (pm.response.code === 200) {", + " tests[\"Status code is 200\"] = pm.response.code === 200;", " }", "", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "for (var i = 0; i < jsonData[\"service-subscription\"].length; i++) { ", - " if (jsonData[\"service-subscription\"][i][\"service-type\"] === postman.getGlobalVariable(\"service\")) {", + " if (jsonData[\"service-subscription\"][i][\"service-type\"] === pm.globals.get(\"service\")) {", " relation_found = true;", " }", "}", "", "if (relation_found === false) {", - " tests[postman.getGlobalVariable(\"tenant_name\")+\" / \"+postman.getGlobalVariable(\"service\")+ \" relation does not exists\"] = true;", + " tests[pm.globals.get(\"tenant_name\")+\" / \"+pm.globals.get(\"service\")+ \" relation does not exists\"] = true;", "}", "", "else {", - " tests[postman.getGlobalVariable(\"tenant_name\")+\" / \"+postman.getGlobalVariable(\"service\")+ \" already exists, we skip relation creation\"] = true;", + " tests[pm.globals.get(\"tenant_name\")+\" / \"+pm.globals.get(\"service\")+ \" already exists, we skip relation creation\"] = true;", " postman.setNextRequest(\"check customer-service-tenant relation creation\");", "}", "}" - ] + ], + "type": "text/javascript" } } ], "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic QUFJOkFBSQ==" + }, + { + "key": "X-FromAppId", + "value": "AAI" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-TransactionId", + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, "url": { - "raw": "{{url-aai}}/aai/v14/business/customers/customer/{{customer_name}}/service-subscriptions?depth=all", + "raw": "{{url-aai}}/aai/v16/business/customers/customer/{{customer_name}}/service-subscriptions?depth=all", "host": [ "{{url-aai}}" ], "path": [ "aai", - "v14", + "v16", "business", "customers", "customer", @@ -1079,71 +1285,65 @@ "query": [ { "key": "depth", - "value": "all", - "equals": true, - "description": "" + "value": "all" } - ], - "variable": [] - }, - "method": "GET", + ] + } + }, + "response": [] + }, + { + "name": "Add service to customer", + "event": [ + { + "listen": "test", + "script": { + "id": "9a9da50d-49ce-4f9e-ae18-6131dce516eb", + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], "body": { "mode": "raw", - "raw": "{\r\n \"global-customer-id\": \"Sina\",\r\n \"subscriber-name\": \"Sina\",\r\n \"subscriber-type\": \"INFRA\"\r\n}" + "raw": "{\n \"service-id\": \"{{auto_service_id}}\"\n}" }, - "description": "" - }, - "response": [] - }, - { - "name": "Add customer-service-tenant relations init", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 201\"] = responseCode.code === 201;" - ] - } - } - ], - "request": { "url": { - "raw": "{{url-aai}}/aai/v14/business/customers/customer/{{customer_name}}/service-subscriptions/service-subscription/{{service}}?resource-version={{auto_service_resource_version}}", + "raw": "{{url-aai}}/aai/v16/business/customers/customer/{{customer_name}}/service-subscriptions/service-subscription/{{service}}", "host": [ "{{url-aai}}" ], "path": [ "aai", - "v14", + "v16", "business", "customers", "customer", @@ -1151,50 +1351,74 @@ "service-subscriptions", "service-subscription", "{{service}}" - ], - "query": [ - { - "key": "resource-version", - "value": "{{auto_service_resource_version}}", - "equals": true, - "description": "" - } - ], - "variable": [] - }, + ] + } + }, + "response": [] + }, + { + "name": "Add tenant to service-customer", + "event": [ + { + "listen": "test", + "script": { + "id": "9a9da50d-49ce-4f9e-ae18-6131dce516eb", + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { "method": "PUT", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], "body": { "mode": "raw", - "raw": "{\r\n\t\"service-type\": \"{{service}}\",\r\n\t\"relationship-list\": {\r\n\t\t\"relationship\": [{\r\n\t\t\t\"related-to\": \"tenant\",\r\n\t\t\t\"related-link\": \"https://aai.api.simpledemo.onap.org:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants/tenant/{{tenant_id}}\",\r\n\t\t\t\"relationship-data\": [{\r\n\t\t\t\t\t\"relationship-key\": \"cloud-region.cloud-owner\",\r\n\t\t\t\t\t\"relationship-value\": \"{{cloud_owner_name}}\"\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"relationship-key\": \"cloud-region.cloud-region-id\",\r\n\t\t\t\t\t\"relationship-value\": \"{{onap_cloud_region_id}}\"\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"relationship-key\": \"tenant.tenant-id\",\r\n\t\t\t\t\t\"relationship-value\": \"{{tenant_id}}\"\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"related-to-property\": [{\r\n\t\t\t\t\"property-key\": \"tenant.tenant-name\",\r\n\t\t\t\t\"property-value\": \"{{tenant_name}}\"\r\n\t\t\t}]\r\n\t\t}]\r\n\t}\r\n}" + "raw": "{\n \"related-to\": \"tenant\",\n \"related-link\": \"/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/{{cloud_owner_name}}/{{onap_cloud_region_id}}/tenants/tenant/{{tenant_id}}\",\n \"relationship-data\": [\n {\n \"relationship-key\": \"cloud-region.cloud-owner\",\n \"relationship-value\": \"{{cloud_owner_name}}\"\n },\n {\n \"relationship-key\": \"cloud-region.cloud-region-id\",\n \"relationship-value\": \"{{onap_cloud_region_id}}\"\n },\n {\n \"relationship-key\": \"tenant.tenant-id\",\n \"relationship-value\": \"{{tenant_id}}\"\n }\n ],\n \"related-to-property\": [\n {\n \"property-key\": \"tenant.tenant-name\",\n \"property-value\": \"{{tenant_name}}\"\n }\n ]\n}" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/business/customers/customer/{{customer_name}}/service-subscriptions/service-subscription/{{service}}/relationship-list/relationship", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "business", + "customers", + "customer", + "{{customer_name}}", + "service-subscriptions", + "service-subscription", + "{{service}}", + "relationship-list", + "relationship" + ] + } }, "response": [] }, @@ -1204,81 +1428,73 @@ { "listen": "test", "script": { - "type": "text/javascript", + "id": "10e61ec5-243b-4ce6-b9b8-a29054df2504", "exec": [ "tests[\"Status code is 200\"] = responseCode.code === 200;", "", - "var jsonData = JSON.parse(responseBody);", + "var jsonData = pm.response.json();", "var service_found = false;", "for (var i = 0; i < jsonData[\"service-subscription\"].length; i++) { ", - " if (jsonData[\"service-subscription\"][i][\"service-type\"] === postman.getGlobalVariable(\"service\")) {", + " if (jsonData[\"service-subscription\"][i][\"service-type\"] === pm.globals.get(\"service\")) {", " service_found = true;", " }", "}", - "tests[postman.getGlobalVariable(\"service\")+\" found\"] = service_found === true;", + "tests[\"Service subscription : \"+pm.globals.get(\"service\")+\" found for customer : \"+pm.globals.get(\"customer_name\")] = service_found === true;", "" - ] + ], + "type": "text/javascript" } } ], "request": { - "url": { - "raw": "{{url-aai}}/aai/v14/business/customers/customer/{{customer_name}}/service-subscriptions?depth=all", - "host": [ - "{{url-aai}}" - ], - "path": [ - "aai", - "v14", - "business", - "customers", - "customer", - "{{customer_name}}", - "service-subscriptions" - ], - "query": [ - { - "key": "depth", - "value": "all", - "equals": true, - "description": "" - } - ], - "variable": [] - }, "method": "GET", "header": [ { "key": "Authorization", - "value": "Basic QUFJOkFBSQ==", - "description": "" + "value": "Basic QUFJOkFBSQ==" }, { "key": "X-FromAppId", - "value": "AAI", - "description": "" + "value": "AAI" }, { "key": "Accept", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { "key": "X-TransactionId", - "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f", - "description": "" + "value": "808b54e3-e563-4144-a1b9-e24e2ed93d4f" } ], "body": { "mode": "raw", - "raw": "{\r\n \"global-customer-id\": \"Sina\",\r\n \"subscriber-name\": \"Sina\",\r\n \"subscriber-type\": \"INFRA\"\r\n}" + "raw": "" }, - "description": "" + "url": { + "raw": "{{url-aai}}/aai/v16/business/customers/customer/{{customer_name}}/service-subscriptions?depth=all", + "host": [ + "{{url-aai}}" + ], + "path": [ + "aai", + "v16", + "business", + "customers", + "customer", + "{{customer_name}}", + "service-subscriptions" + ], + "query": [ + { + "key": "depth", + "value": "all" + } + ] + } }, "response": [] } -- cgit 1.2.3-korg