{ "info": { "_postman_id": "a6c14143-8c4b-44c3-8d9f-007a4d943154", "name": "solution5-delete", "description": "This solution was created using template 1.8", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Set Collection Parameters", "item": [ { "name": "set parameters", "event": [ { "listen": "test", "script": { "id": "29db36c0-5d08-44ff-8ad6-ce9e161b7c3d", "exec": [ "pm.test(\"Setting Parameters\", function () {", " pm.response.to.have.status(200);", "});", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "b8482fc3-d754-4e77-8ef3-839d0f02a1a5", "exec": [ "//Define the number of virtual servers in this solution\r", "pm.collectionVariables.set(\"VIPS\", \"1\");\r", "\r", "//THis below varaibles are using for defining the tenant ID in AS3. This should be the solution number. Example: solution1 or solution2.\r", "pm.collectionVariables.set(\"PATH_NAME\", \"solution5\");\r", "pm.collectionVariables.set(\"PARTITION_NAME\", \"solution5\");\r", "\r", "//This is the primary section defining the settings for the application the solutions is going to deploy\r", "pm.collectionVariables.set(\"DNS1_NAME\", \"sp.acme.com\");\r", "pm.collectionVariables.set(\"VS1_NAME\", \"solution5\");\r", "\r", "\r", "//This section is used when building two virtrual servers as part of a solutions or when a reference is needed to another solutions. For example, if your solutions involved Federation you will need to define both the FQDNs for the both the SP and IDP. \r", "pm.collectionVariables.set(\"DNS2_NAME\", \"idp.acme.com\");\r", "pm.collectionVariables.set(\"VS2_NAME\", \"idp\");\r", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://10.1.1.4/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "protocolProfileBehavior": {} }, { "name": "Start-Loop Datacenters", "item": [ { "name": "start", "event": [ { "listen": "test", "script": { "id": "c47e5507-bd12-46b2-be55-73ae414a85a7", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "d85e715a-e80f-49f8-bdc1-316647e42896", "exec": [ "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");\r", "var DC2_APM = pm.environment.get(\"DC2_APM\");\r", "\r", "\r", "if (DC2_APM === 'true' && DC_COUNTER === '2') {\r", "pm.collectionVariables.set(\"BIGIP_MGMT\", \"10.1.1.5\");\r", "pm.collectionVariables.set(\"BIGIP_SCOPE\", pm.environment.get(\"BIGIP2_SCOPE\"));\r", "\r", "} else {\r", "pm.collectionVariables.set(\"BIGIP_MGMT\", \"10.1.1.4\");\r", "pm.collectionVariables.set(\"BIGIP_SCOPE\", pm.environment.get(\"BIGIP1_SCOPE\"));\r", "pm.collectionVariables.set('DC_COUNTER', '1' );\r", "\r", "\r", "}\r", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "c8bab4b5-b81d-4ca7-a9f2-30f3aea2754e", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "74aec3f3-89d8-4e45-b599-9fe60a4c3899", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }, { "name": "External DNS", "item": [ { "name": "Start DNS", "item": [ { "name": "start-dns", "event": [ { "listen": "test", "script": { "id": "30b155a3-8de8-4ddd-aaea-589761bf727a", "exec": [ "var DC2_APM = pm.environment.get(\"DC2_APM\");", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");", "", "if (DC2_APM === 'true' && DC_COUNTER === '2') {", " postman.setNextRequest(\"bigip5-retrieve-addres-server-vs1\");", " pm.test(\"Beginning DC2 Server deletion\", function () {", " pm.response.to.have.status(200);", " });", "} ", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "8db1a371-88b4-43f3-936e-d926c0e4df4d", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://10.1.1.11/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "Delete WideIP", "item": [ { "name": "bigip5-delete-wideip", "event": [ { "listen": "prerequest", "script": { "id": "a797fbcc-acda-46a5-9763-f685ebbc0da0", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "id": "433e2875-ff29-411b-8d82-8a1e6ff9411b", "exec": [ "var DNS_NAME = pm.collectionVariables.get(\"DNS1_NAME\");", "", "if (responseCode.code === 200) {", " pm.test(\"Wide IP \"+DNS_NAME+\" deleted\", function () {", " pm.response.to.have.status(200);", " });", "} else if (responseCode.code === 422) {", " pm.test(\"WideIP \"+DNS_NAME+\" does not exist\", function () {", " pm.expect(pm.response.text()).to.include(\"path does not exist\");", " });", "}", "", "setTimeout(function(){}, 1000);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://10.1.1.11/mgmt/shared/appsvcs/declare/{{PARTITION_NAME}}-gslb", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "shared", "appsvcs", "declare", "{{PARTITION_NAME}}-gslb" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "Delete Virtuals Server Address 1 from BIG-IP Server", "item": [ { "name": "bigip5-retrieve-addres-server-vs1", "event": [ { "listen": "prerequest", "script": { "id": "1ad5ad70-718c-41e8-9468-116f15546bce", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "id": "dd50f7f9-93ed-47fe-8056-4d4a66a757c3", "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");", "var jsonData = JSON.parse(responseBody);", "", "if (responseCode.code === 200) {", " ", " pm.collectionVariables.set(\"DNS_DEST\", jsonData.destination);", " address = (pm.collectionVariables.get(\"DNS_DEST\")).split(\":\");", " pm.collectionVariables.set('BIGIP_ADDRESS1', address[0]);", " ", " pm.test(\"VS \"+VS_NAME+ \" Address \"+address[0]+ \" found\", function () {", " pm.response.to.have.status(200);", " });", "", "} else", " pm.test(\"VS \"+VS_NAME+\" does not exist\", function () {", " pm.response.to.have.status(404);", " });", "", "", "", "", "", "", "", "", "", "", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server/~Common~bigip{{DC_COUNTER}}.f5lab.local/virtual-servers/~{{PARTITION_NAME}}~{{PATH_NAME}}~{{VS1_NAME}}", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server", "~Common~bigip{{DC_COUNTER}}.f5lab.local", "virtual-servers", "~{{PARTITION_NAME}}~{{PATH_NAME}}~{{VS1_NAME}}" ] } }, "response": [] }, { "name": "bigip-checkin-address", "event": [ { "listen": "test", "script": { "id": "8df84ab7-9b70-488d-a1a8-23683ddd2bd3", "exec": [ "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS1\");", "", "var jsonData = pm.response.json();", "", "if(jsonData.status === \"Success\") {", " pm.test(\"Address \"+ADDR+\" returned to Scope\", function () {", " pm.response.to.have.status(200);", " });", "} else {", " pm.test(\"Address \"+ADDR+\" not assigned in Scope\", function () {", " pm.response.to.have.status(200);", " });", "}", "", "setTimeout(function(){}, 1000);", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "http://10.1.20.6:81/addr/checkin?address={{BIGIP_ADDRESS1}}", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "addr", "checkin" ], "query": [ { "key": "address", "value": "{{BIGIP_ADDRESS1}}" } ] } }, "response": [] }, { "name": "bigip5-delete-server-vs", "event": [ { "listen": "prerequest", "script": { "id": "4e5f27ab-7a02-42ed-a51f-e2c7388067fe", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "id": "8a7be79a-1d06-41bd-ac1e-fe5356e88678", "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");", "", "if (responseCode.code === 200) {", "pm.test(\"Virtual Server \"+VS_NAME+\" deleted from server\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"Virtual Server \"+VS_NAME+\" does not exist\", function () {", " pm.response.to.have.status(404);", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server/~Common~bigip{{DC_COUNTER}}.f5lab.local/virtual-servers/~{{PARTITION_NAME}}~{{PATH_NAME}}~{{VS1_NAME}}", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server", "~Common~bigip{{DC_COUNTER}}.f5lab.local", "virtual-servers", "~{{PARTITION_NAME}}~{{PATH_NAME}}~{{VS1_NAME}}" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], "protocolProfileBehavior": {} }, { "name": "Applications", "item": [ { "name": "AS3-Single Tentant", "item": [ { "name": "bigip-delete-application", "event": [ { "listen": "prerequest", "script": { "id": "1cf5f609-862e-4f42-912c-b4b3e0018985", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "id": "edc58f00-2bed-4b95-b335-e517defbdab3", "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");", "", "pm.test(\"Application \"+VS_NAME+\" deleted\", function () {", " pm.response.to.have.status(200);", "});", "", "setTimeout(function(){}, 2000);", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/declare/{{PARTITION_NAME}}", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare", "{{PARTITION_NAME}}" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], "protocolProfileBehavior": {} }, { "name": "Start Loop - Imperative Calls", "item": [ { "name": "start-objects", "event": [ { "listen": "test", "script": { "id": "49c9d942-61f8-47dd-bb51-2731eddc73bb", "exec": [ "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var DNS_COUNTER = pm.collectionVariables.get(\"DNS_COUNTER\");\r", "\r", "if (!VS_COUNTER) {\r", "pm.collectionVariables.set(\"VS_COUNTER\", 1);\r", "pm.collectionVariables.set(\"DNS_COUNTER\", 1);\r", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var DNS_COUNTER = pm.collectionVariables.get(\"DNS_COUNTER\");\r", "pm.collectionVariables.set(\"VS_NAME\", pm.collectionVariables.get(\"VS\"+VS_COUNTER+\"_NAME\"));\r", "pm.collectionVariables.set(\"DNS_NAME\", pm.collectionVariables.get(\"DNS\"+DNS_COUNTER+\"_NAME\"));\r", " } else { \r", "\r", "pm.collectionVariables.set(\"VS_NAME\", pm.collectionVariables.get(\"VS\"+VS_COUNTER+\"_NAME\"));\r", "pm.collectionVariables.set(\"DNS_NAME\", pm.collectionVariables.get(\"DNS\"+DNS_COUNTER+\"_NAME\"));\r", "}" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "003c887e-cd8d-4036-bd6f-e5287e872ba9", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "912ba7c7-cc68-4f9e-a022-d925417a7016", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "32c2796a-1e42-4150-9871-30722089c7b5", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }, { "name": "PSP", "item": [ { "name": "start PSP", "item": [ { "name": "start-psp-1", "event": [ { "listen": "test", "script": { "id": "610bf037-e06a-4f73-8a11-8aa4cbe6789d", "exec": [ "//The NUMBER SPECIFICED BELOW CONTROL WHICH VIRTUAL THE OBJECTS WILL BE CONFIGURED FOR. THE DEFAULT IS 1.\r", "var VS = 1;\r", "\r", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");\r", "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "\r", "\r", "\r", "if (VS === VS_COUNTER) {\r", " pm.test(\"Deleting APM PSP for Virtual Server \"+VS_NAME+\" in Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else if (VS<=VS_COUNTER) {\r", " pm.test(\"Proceeding to deletion of APM PSP for Virtual Server \"+VS_NAME+\" in Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"end-psp-\"+VS);\r", "} else {\r", "pm.test(\"Currently running loop \"+VS_COUNTER+\" for \"+ VS_NAME+\" in Data Center \"+DC_COUNTER+\". Continuing to next section \", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"end-psp-\"+VS);\r", "}\r", "\r", "setTimeout(function(){}, 2000);" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "c9af14ee-7a9c-45f8-9647-db7d9afc10ed", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "50247622-aba8-4ec5-a547-2df318a59e75", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "8a9c4e6d-ff20-4a54-b7f4-4b6c1a9286f2", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "Profile/Policy", "item": [ { "name": "bigip-delete-profile-psp", "event": [ { "listen": "test", "script": { "id": "1e0d6d64-6885-4edf-ae7d-f4c403e9c6d3", "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "if (responseCode.code === 200) {\r", " pm.test(\"Profile \"+VS_NAME+\"-psp Deleted\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else \r", " pm.test(\"Profile \"+VS_NAME+\"-psp Does Not Exist\", function () {\r", " pm.response.to.have.status(404);\r", " });\r", "\r", "setTimeout(function(){}, 2000);\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "9644cf49-2561-4689-b6f2-a19f89170af8", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "", "disabled": true } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/profile/access/~Common~{{VS_NAME}}-psp", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "profile", "access", "~Common~{{VS_NAME}}-psp" ] } }, "response": [] }, { "name": "bigip-delete-policy-psp", "event": [ { "listen": "test", "script": { "id": "5fd7962e-bb9f-4746-9df8-71f99d97edcf", "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "if (responseCode.code === 200) {\r", " pm.test(\"Policy \"+VS_NAME+\"-psp deleted\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else \r", " pm.test(\"Policy \"+VS_NAME+\"-psp does not exist\", function () {\r", " pm.response.to.have.status(404);\r", " });\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "0d4c63e7-d03c-4015-b5eb-f336cebbedc4", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}", "disabled": true } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/access-policy/~Common~{{VS_NAME}}-psp", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "access-policy", "~Common~{{VS_NAME}}-psp" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "End PSP", "item": [ { "name": "end-psp-1", "event": [ { "listen": "test", "script": { "id": "1a549704-7240-41fe-a8fc-c3a49c3de01b", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "677384f8-487f-496a-ae39-0139f1f52af8", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "1aa2bea6-5a5e-4b1c-9b26-bee41d0a46df", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "e307dd84-e4d2-4cae-9aee-11fdc6f66d36", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], "protocolProfileBehavior": {} }, { "name": "APM Objects", "item": [ { "name": "start APM objects", "item": [ { "name": "start-apm-1", "event": [ { "listen": "test", "script": { "id": "a99f46b3-aeb1-4666-b2b3-2b82aa9c2339", "exec": [ "//The NUMBER SPECIFICED BELOW CONTROL WHICH VIRTUAL THE OBJECTS WILL BE CONFIGURED FOR. THE DEFAULT IS 1.\r", "var VS = 1;\r", "\r", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");\r", "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "\r", "\r", "\r", "if (VS === VS_COUNTER) {\r", " pm.test(\"Deleting APM objects for Virtual Server \"+VS_NAME+\" in Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else if (VS<=VS_COUNTER) {\r", " pm.test(\"Proceedibg to Deletion of Virtual Server \"+VS_NAME+\" in Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"end-apm-\"+VS);\r", "} else {\r", "pm.test(\"Currently running loop \"+VS_COUNTER+\" for \"+ VS_NAME+\" in Data Center \"+DC_COUNTER+\". Continuing to next section \", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"end-apm-\"+VS);\r", "}" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "6574b2d0-d00d-43a2-b4d4-d259d534c2a2", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "BIGIP SP", "item": [ { "name": "bigip-delete-sp service", "event": [ { "listen": "test", "script": { "id": "05efaaab-da0d-4f61-8429-65a19f704d0b", "exec": [ "var DNS_NAME = pm.collectionVariables.get(\"DNS_NAME\");", "", "if (responseCode.code === 200) {", "", " pm.test(\"SAML SP Service \"+DNS_NAME+\"-sp deleted\", function () {", " pm.response.to.have.status(200);", " });", "} else {", " pm.test(\"SAML SP Service \"+DNS_NAME+\"-sp does not exist\", function () {", " pm.response.to.have.status(404);", " });", "}" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "36c971ce-fb6e-4a70-ae61-58348401725a", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}", "disabled": true } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/aaa/saml/~Common~{{DNS_NAME}}-sp", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "aaa", "saml", "~Common~{{DNS_NAME}}-sp" ] } }, "response": [] }, { "name": "bigip-delete-idp connector", "event": [ { "listen": "test", "script": { "id": "c3b77725-7293-4ef2-b1b6-31560fa70617", "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");", "", "if (responseCode.code === 200) {", "", " pm.test(\"SAML IDP connector \"+VS_NAME+\"-idp deleted\", function () {", " pm.response.to.have.status(200);", " });", "} else ", " pm.test(\"SAML IDP connector \"+VS_NAME+\"-idp does not exist\", function () {", " pm.response.to.have.status(404);", " });", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "cce8d5ff-015a-42f7-892a-baa653873710", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}", "disabled": true } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/aaa/saml-idp-connector/~Common~{{VS_NAME}}-sso", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "aaa", "saml-idp-connector", "~Common~{{VS_NAME}}-sso" ] } }, "response": [] }, { "name": "bigip-delete-idp cert", "event": [ { "listen": "test", "script": { "id": "d9afbbe7-341f-4779-ac87-e0ca790ad4db", "exec": [ "var DNS_NAME = pm.collectionVariables.get(\"DNS_NAME\");\r", "\r", "if (responseCode.code === 200) {\r", "\r", " pm.test(\"SAML SP Service \"+DNS_NAME+\"-idp deleted\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else {\r", " pm.test(\"SAML SP Service \"+DNS_NAME+\"-idp does not exist\", function () {\r", " pm.response.to.have.status(404);\r", " });\r", "}" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "", "disabled": true }, { "key": "Content-Range", "type": "text", "value": "0-1321/1322", "disabled": true } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/sys/crypto/cert/~Common~{{VS_NAME}}-idp", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "sys", "crypto", "cert", "~Common~{{VS_NAME}}-idp" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "End APM Objects", "item": [ { "name": "end-apm-1", "event": [ { "listen": "test", "script": { "id": "47da0bd9-64a5-4b0f-ae75-af8014a7a456", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "db3aa0fd-5db9-479b-9d0a-477df2acc0c4", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "702be92a-cde1-4c25-a7b5-304cbbf51892", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "07cc7b0d-f93d-42ca-a8f3-5b67a7d2f90c", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], "protocolProfileBehavior": {} }, { "name": "Websites", "item": [ { "name": "start website", "item": [ { "name": "start-website-1", "event": [ { "listen": "test", "script": { "id": "0d6e000e-1188-4339-b055-d46e2f24d36d", "exec": [ "//The NUMBER SPECIFICED BELOW CONTROL WHICH VIRTUAL THE OBJECTS WILL BE CONFIGURED FOR. THE DEFAULT IS 1.\r", "var VS = 1;\r", "\r", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");\r", "var DNS_NAME = pm.collectionVariables.get(\"DNS_NAME\");\r", "\r", "\r", "\r", "\r", "if (VS === VS_COUNTER) {\r", " pm.test(\"Deleting website \"+DNS_NAME, function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else if (VS<=VS_COUNTER) {\r", " pm.test(\"Continuing deletion of Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"end-website-\"+VS);\r", "} else {\r", "pm.test(\"Currently running loop \"+VS_COUNTER+\" for \"+ DNS_NAME+\" in Data Center \"+DC_COUNTER+\". Continuing to next section \", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"end-website-\"+VS);\r", "}" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "92dd27f4-f6f3-489e-a406-06100fc1aefc", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "Website-10.1.20.6", "item": [ { "name": "iis-delete-website", "event": [ { "listen": "test", "script": { "id": "97fa6361-0ffe-443d-a278-d3d18b235492", "exec": [ "var DNS_NAME = pm.collectionVariables.get(\"DNS_NAME\");", "", "var jsonData = pm.response.json();", "pm.test(\"Website \"+DNS_NAME+\" deleted\", function () {", "", " pm.expect(jsonData.status).to.eql(\"Success\");", "});", "", "", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\"site_name\":\"{{DNS_NAME}}\" \n}" }, "url": { "raw": "http://10.1.20.6:81/website", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "website" ] } }, "response": [] }, { "name": "bigip-delete-node", "event": [ { "listen": "prerequest", "script": { "id": "e39f7804-ed9b-4096-8c9c-83b4dc436922", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "id": "7f4d7dac-7cf8-460b-a622-7f8e7d0ddcfc", "exec": [ "if (responseCode.code === 200) {", " pm.test(\"Node 10.1.20.6 deleted\", function () {", " pm.response.to.have.status(200);", " });", "} else if (responseCode.code === 404) { ", " pm.test(\"Node 10.1.20.6 does not exist\", function () {", " pm.response.to.have.status(404);", " });", "} else if (responseCode.code === 400) {", " pm.test(\"Unable to delete node 10.1.20.6. Still in use\", function () {", " pm.expect(pm.response.text()).to.include(\"member of pool\");", " });", "}", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/ltm/node/10.1.20.6", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "ltm", "node", "10.1.20.6" ] } }, "response": [] }, { "name": "delete-dns-record", "event": [ { "listen": "test", "script": { "id": "27a163e1-27d4-4a28-8b7c-2755207b26e2", "exec": [ " var jsonData = pm.response.json();", "\t", " if (jsonData.status === \"nonexistent\") {", " pm.test(\"nonexistent\", function () {", " pm.expect(jsonData.status).to.eql(\"nonexistent\");", " });", " } else {", "", " ", " pm.test(\"Success\", function () {", " pm.expect(jsonData[1].status).to.eql(\"Success\");", " });", " }", "" ], "type": "text/javascript" } } ], "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\"record_type\":\"a\",\n\"fqdn\":\"{{DNS_NAME}}\",\n\"computer_ip\":\"10.1.20.6\" \n}" }, "url": { "raw": "http://10.1.20.6:81/dns", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "dns" ] } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { "name": "End website", "item": [ { "name": "end-website-1", "event": [ { "listen": "test", "script": { "id": "d710a78a-9cc6-4bc4-84f7-b34b373a94f9", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "1ddf8c05-cc85-4ee5-900a-f792b8e9d300", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "9c8f6d3c-2268-4641-8162-ee0999697dda", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "fca7d8ef-2032-4c5f-8d16-0d796f0a0611", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], "protocolProfileBehavior": {} }, { "name": "End Loop - Imperative Calls", "item": [ { "name": "loop-objects", "event": [ { "listen": "test", "script": { "id": "97ef7839-93e9-4eee-9d62-9182dafd3ff2", "exec": [ "var VIPS = pm.collectionVariables.get(\"VIPS\");", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\")", "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");", "", "if (VS_COUNTER < VIPS ) {", " pm.test(\"Objects for Virutal Server \"+VS_NAME+\" deleted. Creating loop for next virtual server \" , function () {", " pm.response.to.have.status(200);", " });", " VS_COUNTER++", "pm.collectionVariables.set(\"VS_COUNTER\", VS_COUNTER)", "postman.setNextRequest(\"start-objects\");", "", "", "} else {", " pm.test(\"Objects for Virtual Server \"+VS_NAME+\" deleted. All objects deleted\" , function () {", " pm.response.to.have.status(200);", " });", " pm.collectionVariables.set(\"VS_COUNTER\", 1)", "}", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "ac1c0ca1-ff18-4a71-802c-6743555afb57", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "29df5023-6963-49af-9d3e-ed4fb096e6ea", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "d058df0e-506d-412f-b607-f938c3ba35b8", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }, { "name": "End Loop Datacenters", "item": [ { "name": "loop", "event": [ { "listen": "test", "script": { "id": "f95632e9-005e-44b9-82aa-40f4ff6b625c", "exec": [ "var DC2_APM = pm.environment.get(\"DC2_APM\");", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");", "", "if (DC2_APM === 'true' && DC_COUNTER === '1') {", "postman.setNextRequest(\"start\");", "pm.collectionVariables.set('DC_COUNTER', '2' );", "", "pm.test(\"Application deleted in DC1. Beginning DC2 Deletion\", function () {", " pm.response.to.have.status(200);", "});", "", "", "} else if (DC2_APM === 'false' && DC_COUNTER === '1') {", "pm.test(\"Application deleted in DC1 \", function () {", " pm.expect(pm.environment.get(\"DC2_APM\")).to.equal(\"false\");", "});", "", "} else {", "pm.test(\"Application deleted in DC2 \", function () {", " pm.expect(pm.environment.get(\"DC2_APM\")).to.equal(\"true\");", "});", "pm.collectionVariables.set('DC_COUNTER', '1' );", "}", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "9e3ff4f9-e261-4dfb-9104-87e1b3402c12", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "protocolProfileBehavior": {} } ], "event": [ { "listen": "prerequest", "script": { "id": "a8da0608-88fa-453b-a84c-a738dd6b2aeb", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "8dacabfd-e57f-4395-bae2-dcd59515b6da", "type": "text/javascript", "exec": [ "" ] } } ], "protocolProfileBehavior": {} }