From 11c5783d20e52601853552ab00819a546b49fa83 Mon Sep 17 00:00:00 2001 From: Rene_Robert Date: Tue, 22 Oct 2019 17:27:21 +0200 Subject: update Postman collections and doc,with corrections Issue-ID: INT-1340 Signed-off-by: Rene_Robert Change-Id: Idcb5ef7669805f0d8c4266ee45310078d33260c2 --- .../06_Onboard_Service.postman_collection.json | 102 ++++++++++----------- 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'test/postman/06_Onboard_Service.postman_collection.json') diff --git a/test/postman/06_Onboard_Service.postman_collection.json b/test/postman/06_Onboard_Service.postman_collection.json index 91ac556e5..eb4724c97 100644 --- a/test/postman/06_Onboard_Service.postman_collection.json +++ b/test/postman/06_Onboard_Service.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "4421ffe4-0af9-4957-949a-a183a02ad0c9", + "_postman_id": "dcfc4671-1cb4-453a-8fef-97a0ba533daa", "name": "06_Onboard_Service", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -20,18 +20,18 @@ "var jsonData = pm.response.json();", "var service_found = false;", "for (var i = 0; i < jsonData.length; i++) { ", - " if (jsonData[i].name === pm.globals.get(\"service\")) {", + " if (jsonData[i].name === pm.environment.get(\"service\")) {", " service_found = true;", - " pm.globals.set(\"auto_service_uuid\", \"\"+jsonData[i].uuid+\"\");", - " pm.globals.set(\"auto_service_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", + " pm.environment.set(\"auto_service_uuid\", \"\"+jsonData[i].uuid+\"\");", + " pm.environment.set(\"auto_service_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", " }", "}", "if (service_found === false) {", - " tests[pm.globals.get(\"service\")+\" does not exist yet, we continue the run\"] = true;", + " tests[pm.environment.get(\"service\")+\" does not exist yet, we continue the run\"] = true;", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" already exists, stop the run\"] = false;", + " tests[pm.environment.get(\"service\")+\" already exists, stop the run\"] = false;", " postman.setNextRequest(null);", "}" ], @@ -103,9 +103,9 @@ "});", "", "var jsonData = pm.response.json();", - "pm.globals.set(\"auto_service_invariant_uuid\", \"\"+jsonData[\"invariantUUID\"]+\"\");", - "pm.globals.set(\"auto_service_uuid\", \"\"+jsonData[\"uuid\"]+\"\");", - "pm.globals.set(\"auto_service_unique_id\", \"\"+jsonData[\"uniqueId\"]+\"\");", + "pm.environment.set(\"auto_service_invariant_uuid\", \"\"+jsonData[\"invariantUUID\"]+\"\");", + "pm.environment.set(\"auto_service_uuid\", \"\"+jsonData[\"uuid\"]+\"\");", + "pm.environment.set(\"auto_service_unique_id\", \"\"+jsonData[\"uniqueId\"]+\"\");", "", "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKOUT\";" ], @@ -180,21 +180,21 @@ "", "var jsonData = pm.response.json();", "var vf_found = false;", - "if (jsonData.name === pm.globals.get(\"vf_name\")) {", + "if (jsonData.name === pm.environment.get(\"vf_name\")) {", " vf_found = true;", - " pm.globals.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");", - " pm.globals.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");", + " pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");", + " pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");", " ", "}", "", "if (vf_found === false) {", - " tests[\"VF \"+pm.globals.get(\"vf_name\")+\" does not exists, we stop the run\"] = false;", + " tests[\"VF \"+pm.environment.get(\"vf_name\")+\" does not exists, we stop the run\"] = false;", " postman.setNextRequest(null);", "", "}", "", "else {", - " tests[\"VF \"+pm.globals.get(\"vf_name\")+\" exists, we continue the run\"] = true;", + " tests[\"VF \"+pm.environment.get(\"vf_name\")+\" exists, we continue the run\"] = true;", "}" ], "type": "text/javascript" @@ -268,9 +268,9 @@ "var jsonData = pm.response.json();", "var vf_found = false;", "for (var i = 0; i < jsonData.resources.length; i++) { ", - " if (jsonData.resources[i].name === pm.globals.get(\"vf_name\")) {", + " if (jsonData.resources[i].name === pm.environment.get(\"vf_name\")) {", " vf_found = true;", - " pm.globals.set(\"auto_vf_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");", + " pm.environment.set(\"auto_vf_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");", " }", "}", "" @@ -353,8 +353,8 @@ " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", - "pm.globals.set(\"auto_vf_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");", - "pm.globals.set(\"auto_vf_name_for_model\", \"\"+jsonData.name+\"\");", + "pm.environment.set(\"auto_vf_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");", + "pm.environment.set(\"auto_vf_name_for_model\", \"\"+jsonData.name+\"\");", "", "" ], @@ -427,7 +427,7 @@ "exec": [ "var vl_found = false;", "if (pm.response.code === 404) {", - " tests[pm.globals.get(\"virtual_link_type\")+\" does not exists\"] = true;", + " tests[pm.environment.get(\"virtual_link_type\")+\" does not exists\"] = true;", "}", "else {", " if (pm.response.code === 200) {", @@ -435,19 +435,19 @@ " }", " var jsonData = pm.response.json();", " for (var i = 0; i < jsonData.length; i++) { ", - " if (jsonData[i].name === pm.globals.get(\"virtual_link_type\")) {", + " if (jsonData[i].name === pm.environment.get(\"virtual_link_type\")) {", " vl_found = true;", - " pm.globals.set(\"auto_virtual_link_uuid\", \"\"+jsonData[i].uuid+\"\");", - " pm.globals.set(\"auto_virtual_link_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", + " pm.environment.set(\"auto_virtual_link_uuid\", \"\"+jsonData[i].uuid+\"\");", + " pm.environment.set(\"auto_virtual_link_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", " }", " }", " if (vl_found === false) {", - " tests[pm.globals.get(\"virtual_link_type\")+\" does not exists, we stop the run\"] = false;", + " tests[pm.environment.get(\"virtual_link_type\")+\" does not exists, we stop the run\"] = false;", " postman.setNextRequest(null);", " }", " ", " else {", - " tests[pm.globals.get(\"virtual_link_type\")+\" exists, we continue the run\"] = true;", + " tests[pm.environment.get(\"virtual_link_type\")+\" exists, we continue the run\"] = true;", " }", "}" ], @@ -527,10 +527,10 @@ "var jsonData = pm.response.json();", "var vl_found = false;", "for (var i = 0; i < jsonData.resources.length; i++) { ", - " if (jsonData.resources[i].name === pm.globals.get(\"virtual_link_type\")) {", + " if (jsonData.resources[i].name === pm.environment.get(\"virtual_link_type\")) {", " vl_found = true;", - " pm.globals.set(\"auto_virtual_link_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");", - " tests[\"Virtual Link : \"+pm.globals.get(\"virtual_link_type\")+\" found in SDC catalog with uniqueId = \"+pm.globals.get(\"auto_virtual_link_unique_id\")] = true;", + " pm.environment.set(\"auto_virtual_link_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");", + " tests[\"Virtual Link : \"+pm.environment.get(\"virtual_link_type\")+\" found in SDC catalog with uniqueId = \"+pm.environment.get(\"auto_virtual_link_unique_id\")] = true;", " }", "}", "" @@ -614,8 +614,8 @@ "});", "", "var jsonData = pm.response.json();", - "pm.globals.set(\"auto_virtual_link_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");", - "pm.globals.set(\"auto_virtual_link_name_for_model\", \"\"+jsonData.name+\"\");", + "pm.environment.set(\"auto_virtual_link_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");", + "pm.environment.set(\"auto_virtual_link_name_for_model\", \"\"+jsonData.name+\"\");", "", "" ], @@ -846,7 +846,7 @@ "", "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFIED\";", "", - "pm.globals.set(\"auto_service_new_unique_id\", \"\"+jsonData.uniqueId+\"\");", + "pm.environment.set(\"auto_service_new_unique_id\", \"\"+jsonData.uniqueId+\"\");", "" ], "type": "text/javascript" @@ -922,7 +922,7 @@ "});", "", "var jsonData = pm.response.json();", - "pm.globals.set(\"auto_service_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");", + "pm.environment.set(\"auto_service_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");", "" ], "type": "text/javascript" @@ -1083,12 +1083,12 @@ "", "tests[\"Distribution status is : \"+jsonData.distributionStatus] = jsonData.distributionStatus === \"DISTRIBUTED\";", "", - "pm.globals.set(\"auto_vf_module_model_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");", - "pm.globals.set(\"auto_vf_module_model_customization_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");", - "pm.globals.set(\"auto_vf_module_model_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupUUID+\"\");", - "pm.globals.set(\"auto_vf_module_model_invariant_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].invariantUUID+\"\");", - "pm.globals.set(\"auto_vf_module_model_customization_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].customizationUUID+\"\");", - "pm.globals.set(\"auto_virtual_link_model_customization_uuid\", \"\"+jsonData.componentInstances[1].customizationUUID+\"\");" + "pm.environment.set(\"auto_vf_module_model_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");", + "pm.environment.set(\"auto_vf_module_model_customization_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");", + "pm.environment.set(\"auto_vf_module_model_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupUUID+\"\");", + "pm.environment.set(\"auto_vf_module_model_invariant_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].invariantUUID+\"\");", + "pm.environment.set(\"auto_vf_module_model_customization_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].customizationUUID+\"\");", + "pm.environment.set(\"auto_virtual_link_model_customization_uuid\", \"\"+jsonData.componentInstances[1].customizationUUID+\"\");" ], "type": "text/javascript" } @@ -1168,17 +1168,17 @@ "for (var i = 0; i < jsonData.distributionStatusOfServiceList.length; i++) { ", " if (jsonData.distributionStatusOfServiceList[i].deployementStatus === \"Distributed\") {", " distrib_done = true;", - " pm.globals.set(\"auto_distribution_id\", \"\"+jsonData.distributionStatusOfServiceList[i].distributionID+\"\");", + " pm.environment.set(\"auto_distribution_id\", \"\"+jsonData.distributionStatusOfServiceList[i].distributionID+\"\");", "", " }", "}", "if (distrib_done === false) {", - " tests[pm.globals.get(\"service\")+\" not distributed, we stop the run\"] = false;", + " tests[pm.environment.get(\"service\")+\" not distributed, we stop the run\"] = false;", " postman.setNextRequest(null);", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed\"] = true;", "}" ], "type": "text/javascript" @@ -1291,44 +1291,44 @@ "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed to SO\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed to SO\"] = true;", "}", "", "if (distrib_AAI === false) {", - " tests[pm.globals.get(\"service\")+\" not distributed to AAI\"] = false;", + " tests[pm.environment.get(\"service\")+\" not distributed to AAI\"] = false;", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed to AAI\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed to AAI\"] = true;", "}", "", "if (distrib_SDNC === false) {", - " tests[pm.globals.get(\"service\")+\" not distributed to SDNC\"] = false;", + " tests[pm.environment.get(\"service\")+\" not distributed to SDNC\"] = false;", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed to SDNC\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed to SDNC\"] = true;", "}", "if (distrib_MultiCloud === false) {", - " tests[pm.globals.get(\"service\")+\" not distributed to MultiCloud\"] = false;", + " tests[pm.environment.get(\"service\")+\" not distributed to MultiCloud\"] = false;", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed to MultiCloud\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed to MultiCloud\"] = true;", "}", "if (distrib_CDS === false) {", - " tests[pm.globals.get(\"service\")+\" not distributed to CDS\"] = false;", + " tests[pm.environment.get(\"service\")+\" not distributed to CDS\"] = false;", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed to CDS\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed to CDS\"] = true;", "}", "if (distrib_policy === false) {", - " tests[pm.globals.get(\"service\")+\" not distributed to Policy\"] = false;", + " tests[pm.environment.get(\"service\")+\" not distributed to Policy\"] = false;", "}", "", "else {", - " tests[pm.globals.get(\"service\")+\" distributed to Policy\"] = true;", + " tests[pm.environment.get(\"service\")+\" distributed to Policy\"] = true;", "}", "" ], -- cgit 1.2.3-korg