{ "info": { "_postman_id": "fbd39c61-1a95-489a-a2bd-9449d50d3272", "name": "solution11-create", "description": "Based on Template 1.7", "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": { "exec": [ "pm.test(\"Setting Parameters\", function () {", " pm.response.to.have.status(200);", "});", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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\", \"solution11\");\r", "pm.collectionVariables.set(\"PARTITION_NAME\", \"solution11\");\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\", \"solution11.acme.com\");\r", "pm.collectionVariables.set(\"VS1_NAME\", \"solution11\");\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\", \"as.acme.com\");\r", "pm.collectionVariables.set(\"VS2_NAME\", \"as\");\r", "\r", "\r", "//This variable is used for switching between standard and modern for logon pages, webtops, and other objects that support those changes.\r", "pm.collectionVariables.set(\"CUSTOM_TYPE\", \"modern\");\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://10.1.1.4/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ] }, { "name": "Start-loop-Datacenters", "item": [ { "name": "start", "event": [ { "listen": "test", "script": { "exec": [ "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");\r", "\r", "\r", "pm.test(\"Starting configuratioon of Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Start Loop - Imperative Calls", "item": [ { "name": "start-objects", "event": [ { "listen": "test", "script": { "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", "}\r", "\r", "\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Websites", "item": [ { "name": "start Website", "item": [ { "name": "start-website-1", "event": [ { "listen": "test", "script": { "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", "if (VS === VS_COUNTER) {\r", " pm.test(\"Creating website \"+DNS_NAME, function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else if (VS<=VS_COUNTER) {\r", " pm.test(\"Continuing creation 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+\" 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": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Create Website address 10.1.20.6", "item": [ { "name": "bigip-create-node-iis", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");", "var DC2_APM = pm.environment.get(\"DC2_APM\");", "var DNS_COUNTER = pm.collectionVariables.get(\"DNS_COUNTER\");", "pm.collectionVariables.set(\"IIS_ADDRESS\"+DNS_COUNTER, \"10.1.20.6\")", "pm.collectionVariables.set(\"IIS_ADDRESS\", pm.collectionVariables.get(\"IIS_ADDRESS\"+DNS_COUNTER))", "", "if (DC2_APM === 'true' && DC_COUNTER === '2') {", " if (responseCode.code === 200) {", " pm.test(\"Node 10.1.20.6 Created\", function () {", " pm.response.to.have.status(200);", " }); ", " } else {", " pm.test(\"Node 10.1.20.6 Exists\", function () {", " pm.response.to.have.status(409);", " }); ", " }", " postman.setNextRequest(\"end-website\");", "} else {", " if (responseCode.code === 200) {", " pm.test(\"Node 10.1.20.6 Created\", function () {", " pm.response.to.have.status(200);", " });", " } else {", " pm.test(\"Node 10.1.20.6 Exists\", function () {", " pm.response.to.have.status(409);", " });", " }", "}", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\"name\": \"10.1.20.6\",\r\n\"address\": \"10.1.20.6\"\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/ltm/node", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "ltm", "node" ] } }, "response": [] }, { "name": "iis-create-website", "event": [ { "listen": "test", "script": { "exec": [ "var DNS_NAME = pm.collectionVariables.get(\"DNS_NAME\");", "var jsonData = pm.response.json();", "", "for (var i = 0; i < jsonData.length; i++) {", "", "\t\tif (jsonData[i].status === \"Success\") {", "\t\t\t", " pm.test(\"Website \"+DNS_NAME+\" created\", function () {", " pm.expect(jsonData[i].status).to.eql(\"Success\");", " });", "\t\t\t", "\t\t}", "}", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\t\"site_name\":\"{{DNS_NAME}}\",\n\t\"http_port\":\"80\",\n\t\"https_port\":\"443\",\n\t\"computer_ip\":\"10.1.20.6\",\n\t\"template_number\": \"2\",\n\t\"authentication\": \"none\",\n\t\"customization\": {\n\t\t\"background\": \"green\"\n\n\t}\n}" }, "url": { "raw": "http://10.1.20.6:81/website", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "website" ] } }, "response": [] }, { "name": "end-website", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "End Website", "item": [ { "name": "end-website-1", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] }, { "name": "LTM Objects", "item": [ { "name": "start LTM objects", "item": [ { "name": "start-ltm-1", "event": [ { "listen": "test", "script": { "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", "pm.test(\"Creating LTM objects for Virtual Server \"+VS_NAME+\" in Data Center \"+DC_COUNTER, function () {\r", " pm.response.to.have.status(200);\r", "});\r", "\r", "\r", "if (VS === VS_COUNTER) {\r", " \r", "} else {\r", " postman.setNextRequest(\"end-ltm-1\");\r", "}\r", "\r", "\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "DNS Resolver", "item": [ { "name": "bigip-create-DNS resolver", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", "pm.test(\"DNS Resolver Created\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"DNS Resolver Exists\", function () {", " pm.response.to.have.status(409);", "});", "", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\"name\":\"{{VS_NAME}}-dns\", \r\n \"forwardZones\": [\r\n {\r\n \"name\": \".\",\r\n \"nameservers\": [\r\n {\r\n \"name\": \"10.1.20.7:53\"\r\n }\r\n ]\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/net/dns-resolver", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "net", "dns-resolver" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "End LTM Objects", "item": [ { "name": "end-ltm-1", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] }, { "name": "APM Objects", "item": [ { "name": "start APM objects", "item": [ { "name": "start-apm-1", "event": [ { "listen": "test", "script": { "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(\"Creating 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(\"Proceeding to creation 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": { "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": [] } ] }, { "name": "AAA OAuth Provider", "item": [ { "name": "bigip-import ca.acme.com cert", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"ca.f5lab.local.crt installed\", function () {\r", " pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/octet-stream" }, { "key": "Content-Range", "value": "0-1263/1264", "type": "text" }, { "key": "Content-Length", "value": "1264", "type": "text" } ], "body": { "mode": "raw", "raw": "-----BEGIN CERTIFICATE-----\r\nMIIDazCCAlOgAwIBAgIQJ4DA+pop3K9HGUl4CIxjbjANBgkqhkiG9w0BAQsFADBI\r\nMRUwEwYKCZImiZPyLGQBGRYFbG9jYWwxFTATBgoJkiaJk/IsZAEZFgVmNWxhYjEY\r\nMBYGA1UEAxMPZGMxLmY1bGFiLmxvY2FsMB4XDTE5MTEyMDIyMDc0NVoXDTI5MTEy\r\nMDIyMTc0NVowSDEVMBMGCgmSJomT8ixkARkWBWxvY2FsMRUwEwYKCZImiZPyLGQB\r\nGRYFZjVsYWIxGDAWBgNVBAMTD2RjMS5mNWxhYi5sb2NhbDCCASIwDQYJKoZIhvcN\r\nAQEBBQADggEPADCCAQoCggEBANOejxrkrJD12YIeEkZNjRZ9/OZwFeX+QhVi1uHL\r\niILP+4+3ZiZ/dhVGQLncDfHlJm5hSXpzMMDK+LxmjnWfBcx8xurgDyL6E80ZTnIP\r\nBbVJ6Au2IWFXM62NK/qsE+5IF0ptAYzDiWjj75njoVQygMNkdWEPxu1N+Ar7WAR4\r\n5xghN2wE7d57iCZ53RmrIeGT6equiihns5nUssoOFh/ny9oR6+yudINlozllHhMB\r\nGRDCEeGC/0mY/LF50hP6vwEbl1ub0J1SlqlvTn3rrX7dumvtjSKxfQipwbCpG8Qz\r\nGi7ZsSe78Xg7VIGtDVk0Vh4+PbHVJ6GB8pUmFpQ4vVa6sY0CAwEAAaNRME8wCwYD\r\nVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNhpUMHsIixtS9g6\r\ny/FyNrayg9V6MBAGCSsGAQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBCwUAA4IBAQCr\r\nEjJWFyZR3VFoIvZxUztGiWSjELJGD0vH42hONh6GrzxHadhZcQFmQsi4SmS9TUhP\r\nqyj+mUzreWziMcogqTYisSmF6h/cyAujdnLPbR//spGSOvLlV+43P57FmpQ+c+bB\r\nV8CJq3e0uvxt2h/9v5Du20fE/Zb6iPESMSjzhEoCPosozELpEqwKTzwGLsyqgLSN\r\nWW/+Ov+DGr+cE8pHsXZy8yhkbDY5wrbHMCyrRuXFXwYLpoMcUKMOWUCq+K3TSQ2A\r\nmGUtzY3KMfC7YCJj+mrCniWmvncryUpkY3hPplglevWAFQx4hslOU618gt4IpBXy\r\nLlIC0DqyAVMHJqF7WozV\r\n-----END CERTIFICATE-----\r\n" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/file-transfer/uploads/ca.acme.com.crt", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "file-transfer", "uploads", "ca.acme.com.crt" ] } }, "response": [] }, { "name": "bigip-install ca.acme.com cert", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"ca.f5lab.local.crt imported\", function () {\r", " pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"command\":\"install\",\n\t\"name\":\"ca.acme.com\",\n\t\"from-local-file\":\"/var/config/rest/downloads/ca.acme.com.crt\"\n\t\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/sys/crypto/cert", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "sys", "crypto", "cert" ] } }, "response": [] }, { "name": "bigip-create-client provider", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", "", " pm.test(\"Client Provider Created\", function () {", " pm.response.to.have.status(200);", " });", "} else ", " pm.test(\"Client Provider Exists\", function () {", " pm.response.to.have.status(409);", " });", "", "setTimeout(function(){}, 3000);", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "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": "{\r\n \r\n \"name\": \"{{VS_NAME}}-provider\",\r\n \"partition\": \"Common\",\r\n \"allowSelfSignedJwkCert\": \"yes\",\r\n \"discoveryInterval\": 60,\r\n \"ignoreExpiredCert\": \"false\",\r\n \"introspect\": \"supported\",\r\n \"maxJsonNestingLayers\": 8,\r\n \"maxResponseSize\": 131072,\r\n \"openidCfgUri\": \"https://{{DNS2_NAME}}/f5-oauth2/v1/.well-known/openid-configuration\",\r\n \"saveJsonPayload\": \"disabled\",\r\n \"trustedCaBundle\": \"/Common/ca.acme.com\",\r\n \"type\": \"f5\",\r\n \"useAutoJwtConfig\": \"true\"\r\n\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/aaa/oauth-provider", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "aaa", "oauth-provider" ] } }, "response": [] }, { "name": "bigip-retrieve-discovery task id", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");", "var jsonData = JSON.parse(responseBody);", "var exist = 0", "", "", "for (var i = 0; i < jsonData.items.length; i++) {", "", "if ( jsonData.items[i].providerName === \"/Common/\"+VS_NAME+\"-provider\" ) {", " pm.collectionVariables.set(\"DISCOVER_ID\",jsonData.items[i].id);", " pm.test(\"Discovery Task ID Found\", function () {", " pm.response.to.have.status(200);", " });", " exist = 1", "} ", "} ", "", "if (exist === 0) {", " postman.setNextRequest(\"bigip-discover-provider\");", " pm.test(\"Discovery Task does not exist\", function () {", " pm.response.to.have.status(200);", " });", "}", "", "setTimeout(function(){}, 3000);", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "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" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}", "disabled": true } ], "body": { "mode": "raw", "raw": "{\r\n \r\n \"providerName\": \"{{VS_NAME}}-provider\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/access/oidc/discover", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "access", "oidc", "discover" ] } }, "response": [] }, { "name": "bigip-cancel-provider discover task", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " pm.test(\"Discovery Task Stopped\", function () {", " pm.response.to.have.status(200);", " });", "} ", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "PATCH", "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": "{\r\n \r\n \"status\":CANCEL_REQUESTED\"\r\n \r\n}\r\n\r\n" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/access/oidc/discover/{{DISCOVER_ID}}", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "access", "oidc", "discover", "{{DISCOVER_ID}}" ] } }, "response": [] }, { "name": "bigip-delete-provider discover task", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", " pm.test(\"Discovery Task Deleted\", function () {", " pm.response.to.have.status(200);", " });", "} " ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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/access/oidc/discover/{{DISCOVER_ID}}", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "access", "oidc", "discover", "{{DISCOVER_ID}}" ] } }, "response": [] }, { "name": "bigip-discover-provider", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "pm.collectionVariables.set(\"DISCOVER_ID\",jsonData.id);", "", "if (responseCode.code === 202) { ", " pm.test(\"Discovery Task Created\", function () {", " pm.response.to.have.status(202);", " });", "} else if (responseCode.code === 400) {", " pm.test(\"Task exists\", function () {", " pm.expect(pm.response.text()).to.include(\"Duplicate item. Key already exists\");", " });", "}", "", "", "setTimeout(function(){}, 3000);", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "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": "{\r\n \r\n \"providerName\": \"{{VS_NAME}}-provider\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/access/oidc/discover", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "access", "oidc", "discover" ] } }, "response": [] }, { "name": "bigip-retrieve-provider endpoints", "event": [ { "listen": "test", "script": { "exec": [ "", "if (responseCode.code === 200) {", " var jsonData = JSON.parse(responseBody);", " str = \"f5-oauth.local\";", " if (jsonData.authenticationUri.includes(str)) {", " pm.test(\"Unable to retrive Endpoints. Ensure integrated Authorization Server solution is deployed prior to deploying this solution \", function () {", " pm.response.to.have.status(400);", " });", " postman.setNextRequest(\"null\");", " } else {", "", " pm.test(\"Endpoints Retrieved\", function () {", " pm.response.to.have.status(200);", " });", " pm.collectionVariables.set(\"AUTH_URI\",jsonData.authenticationUri);", " pm.collectionVariables.set(\"TOKEN_URI\",jsonData.tokenUri);", " ", " } ", "", "}" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "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" }, { "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/oauth-provider/~Common~{{VS_NAME}}-provider", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "aaa", "oauth-provider", "~Common~{{VS_NAME}}-provider" ] } }, "response": [] } ] }, { "name": "OAuth Client", "item": [ { "name": "bigip-create-customization group-OAuth Client", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {\r", " pm.test(\"Customization Group Created\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else \r", " pm.test(\"Customization Group Exists\", function () {\r", " pm.response.to.have.status(409);\r", " });" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}_oauth_authz_client_app_customization\",\r\n \"partition\": \"Common\",\r\n \"source\": \"/Common/standard\",\r\n \"type\": \"oauth-authz-client-app\"\r\n \r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group", "" ] } }, "response": [] }, { "name": "bigip-create-OAuth Client", "event": [ { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);\r", "pm.collectionVariables.set(\"CLIENT_ID\",jsonData.clientId);\r", "pm.collectionVariables.set(\"CLIENT_SECRET\",jsonData.clientSecret);\r", "\r", "if (responseCode.code === 200) {\r", " pm.test(\"OAuth Client Created\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else if (responseCode.code === 409) {\r", " pm.test(\"OAuth Client Exists\", function () {\r", " pm.response.to.have.status(409);\r", " });\r", " postman.setNextRequest(\"bigip-retreive-OAuth Client\");\r", "} else\r", " pm.test(\"OAuth Client not found\", function () {\r", " pm.response.to.have.status(200);\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": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \r\n \"name\": \"{{VS_NAME}}\",\r\n \"partition\": \"Common\",\r\n \"accessTokenLifetime\": 5,\r\n \"appName\": \"{{VS_NAME}}\",\r\n \"authCodeLifetime\": 5,\r\n \"authType\": \"secret\",\r\n \"customizationGroup\": \"/Common/{{VS_NAME}}_oauth_authz_client_app_customization\",\r\n \"generateJwtRefreshToken\": \"true\",\r\n \"generateRefreshToken\": \"true\",\r\n \"grantCode\": \"enabled\",\r\n \"grantPassword\": \"disabled\",\r\n \"grantToken\": \"disabled\",\r\n \"idTokenLifetime\": 5,\r\n \"jwtAccessTokenLifetime\": 5,\r\n \"jwtRefreshTokenLifetime\": 60,\r\n \"openidConnect\": \"enabled\",\r\n \"redirectUris\": [\r\n \"https://{{DNS_NAME}}/oauth/client/redirect\"\r\n ],\r\n \"refreshTokenLifetime\": 480,\r\n \"refreshTokenUsageLimit\": 64,\r\n \"reuseAccessToken\": \"false\",\r\n \"reuseRefreshToken\": \"false\",\r\n \"useProfileTokenMgmtSettings\": \"true\"\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/oauth/oauth-client-app", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "oauth", "oauth-client-app" ] } }, "response": [] }, { "name": "bigip-retreive-OAuth Client", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "var jsonData = pm.response.json();\r", "\r", "\r", "for (var i = 0; i < jsonData.items.length; i++) {\r", "\r", "\tif (jsonData.items[i].name === VS_NAME) {\r", " pm.collectionVariables.set(\"CLIENT_ID\",jsonData.items[i].clientId);\r", " pm.collectionVariables.set(\"CLIENT_SECRET\",jsonData.items[i].clientSecret);\r", " pm.collectionVariables.set(\"CLIENT_REDIRECT_URI\",jsonData.items[i].redirectUris);\r", "\r", " pm.test(\"Existing client information retrieved\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " \r", "\t}\r", "}\r", "" ], "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://{{BIGIP_MGMT}}/mgmt/tm/apm/oauth/oauth-client-app", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "oauth", "oauth-client-app" ] } }, "response": [] }, { "name": "bigip-modify-OAuth Clients list", "event": [ { "listen": "test", "script": { "exec": [ " if (responseCode.code === 409)\r", " pm.test(\"OAuth Client Exists on Auth Server\", function () {\r", " pm.response.to.have.status(409);\r", " });\r", "else if (responseCode.code === 200) {\r", " pm.test(\"OAuth Client added to Auth Server\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else {\r", " pm.test(\"OAuth Client unable to be added to Authorization Server. Ensure you deploy Integrated Authorization Server solution first and then redploy this solution. Stopping automation\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"null\");\r", "}" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"{{VS_NAME}}\",\r\n \"partition\": \"solution10\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/profile/oauth/~Common~{{VS2_NAME}}-oauth/client-apps", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "profile", "oauth", "~Common~{{VS2_NAME}}-oauth", "client-apps" ] } }, "response": [] }, { "name": "bigip-Apply Policy on AS", "event": [ { "listen": "test", "script": { "exec": [ "\r", "pm.test(\"Apply Policy Successful\", function () {\r", " pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "PATCH", "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": "{\r\n \"generationAction\": \"increment\" \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/profile/access/~Common~{{VS2_NAME}}-psp", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "profile", "access", "~Common~{{VS2_NAME}}-psp" ] } }, "response": [] } ] }, { "name": "OAuth Server", "item": [ { "name": "bigip-create-OAuth Server", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "if (responseCode.code === 200) {\r", "pm.test(\"OAuth Server \"+VS_NAME+\" created\", function () {\r", " pm.response.to.have.status(200);\r", "});\r", "} else \r", "pm.test(\"OAuth Server \"+VS_NAME+\" exists\", function () {\r", " pm.response.to.have.status(409);\r", "});\r", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": " {\r\n\r\n \"name\": \"{{VS_NAME}}\",\r\n \"partition\": \"Common\", \r\n \"clientId\": \"{{CLIENT_ID}}\",\r\n \"clientSecret\": \"{{CLIENT_SECRET}}\",\r\n \"clientServersslProfileName\": \"/Common/serverssl\",\r\n \"dnsResolverName\": \"/Common/{{VS_NAME}}-dns\", \r\n \"mode\": \"client\",\r\n \"providerName\": \"/Common/{{VS_NAME}}-provider\", \r\n \"tokenValidationInterval\": 60\r\n }" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/aaa/oauth-server", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "aaa", "oauth-server" ] } }, "response": [] } ] }, { "name": "End APM Objects", "item": [ { "name": "end-apm-1", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] }, { "name": "PSP", "item": [ { "name": "start PSP", "item": [ { "name": "start-psp-1", "event": [ { "listen": "test", "script": { "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(\"Creating 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 creation 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", "}" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Baseline Policy", "item": [ { "name": "Create Transaction", "item": [ { "name": "bigip-create transaction", "event": [ { "listen": "test", "script": { "exec": [ "", "var jsonData = JSON.parse(responseBody);", "pm.collectionVariables.set(\"TRANSID\", jsonData.transId);", "", "", "pm.test(\"Transaction Created\", function () {", " pm.response.to.have.status(200);", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/transaction", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "transaction" ] } }, "response": [] } ] }, { "name": "Baseline Customization Groups", "item": [ { "name": "bigip-create-customization group-logout", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"{{VS_NAME}}-psp_logout\",\r\n \"partition\": \"Common\",\r\n \"source\": \"/Common/{{CUSTOM_TYPE}}\",\r\n \"type\": \"logout\"\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group" ] } }, "response": [] }, { "name": "bigip-create-customization group-eps", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_eps\",\r\n \"partition\": \"Common\",\r\n \"source\": \"/Common/{{CUSTOM_TYPE}}\",\r\n \"type\": \"eps\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group" ] } }, "response": [] }, { "name": "bigip-create-customization group-error map", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_errormap\",\r\n \"partition\": \"Common\",\r\n \"source\": \"/Common/{{CUSTOM_TYPE}}\",\r\n \"type\": \"errormap\"\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group" ] } }, "response": [] }, { "name": "bigip-create-customization group-framework", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n \r\n \"name\": \"{{VS_NAME}}-psp_framework_installation\",\r\n\t \"partition\": \"Common\",\r\n \"source\": \"/Common/{{CUSTOM_TYPE}}\",\r\n \"type\": \"framework-installation\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group" ] } }, "response": [] }, { "name": "bigip-create-customization group-general ui", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_general_ui\",\r\n \"partition\": \"Common\",\r\n \"source\": \"/Common/{{CUSTOM_TYPE}}\",\r\n \"type\": \"general-ui\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group" ] } }, "response": [] } ] }, { "name": "Deny Ending", "item": [ { "name": "bigip-create-customization group-end deny", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_end_deny_ag\",\r\n \"partition\": \"Common\",\r\n \"source\": \"/Common/{{CUSTOM_TYPE}}\",\r\n \"type\": \"logout\"\r\n \r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/customization-group", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "customization-group" ] } }, "response": [] }, { "name": "bigip-create-agent-deny ending", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\n\"name\": \"{{VS_NAME}}-psp_end_deny_ag\",\n\"partition\": \"Common\",\n\"customizationGroup\": \"/Common/{{VS_NAME}}-psp_end_deny_ag\"\n\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/agent/ending-deny/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "agent", "ending-deny", "" ] } }, "response": [] }, { "name": "bigip-create-policy item-Deny ending", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{TRANSID}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_end_deny\",\r\n \"partition\": \"Common\",\r\n \"caption\": \"Deny\",\r\n \"color\": 2,\r\n \"itemType\": \"ending\",\r\n \"agents\": [\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_end_deny_ag\",\r\n\t\t\t\"partition\": \"Common\",\r\n \"type\": \"ending-deny\"\r\n\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/policy-item/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "policy-item", "" ] } }, "response": [] } ] }, { "name": "Allow Ending", "item": [ { "name": "bigip-create-agent-allow ending", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{TRANSID}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\"name\": \"{{VS_NAME}}-psp_end_allow_ag\",\n\"partition\": \"Common\"\n\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/agent/ending-allow/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "agent", "ending-allow", "" ] } }, "response": [] }, { "name": "bigip-create-policy item-allow ending", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{TRANSID}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_end_allow\",\r\n \"partition\": \"Common\",\r\n \"caption\": \"Allow\",\r\n \"color\": 1,\r\n \"itemType\": \"ending\",\r\n \"agents\": [\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_end_allow_ag\",\r\n\t\t\t\"partition\": \"Common\",\r\n \"type\": \"ending-allow\"\r\n\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/policy-item/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "policy-item", "" ] } }, "response": [] } ] }, { "name": "Policy-Item OAuth Client", "item": [ { "name": "bigip-create-agent-OAuth client", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\n \n \"name\": \"{{VS_NAME}}-psp_act_oauth_client_ag\",\n \"partition\": \"Common\",\n \"authRedirectRequest\": \"/Common/F5AuthRedirectRequestJWT\",\n \"grantType\": \"authorization-code\",\n \"openidConnect\": \"enabled\",\n \"openidFlowType\": \"code\",\n \"openidHybridResponseType\": \"code-idtoken\",\n \"openidUserinfoRequest\": \"/Common/F5UserinfoRequest\",\n \"redirectionUri\": \"https://%{session.server.network.name}/oauth/client/redirect\",\n \"server\": \"/Common/{{VS_NAME}}\",\n \"tokenRefreshRequest\": \"/Common/F5TokenRefreshRequest\",\n \"tokenRequest\": \"/Common/F5TokenJWTRequestByAuthzCode\",\n \"tokenValidationMode\": \"external\",\n \"type\": \"client\"\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/agent/aaa-oauth/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "agent", "aaa-oauth", "" ] } }, "response": [] }, { "name": "bigip-create-policy item-Oauth client", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n \r\n \"name\": \"{{VS_NAME}}-psp_act_oauth_client\",\r\n \"partition\": \"Common\",\r\n \"caption\": \"OAuth Client\",\r\n \"color\": 1,\r\n \"itemType\": \"action\",\r\n \"loop\": \"false\",\r\n \"agents\": [\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_act_oauth_client_ag\",\r\n \"partition\": \"Common\",\r\n \"type\": \"aaa-oauth\"\r\n \r\n }\r\n ],\r\n \"rules\": [\r\n {\r\n \"caption\": \"Successful\",\r\n \"expression\": \"expr {[mcget {session.oauth.client.last.authresult}] == 1}\",\r\n \"nextItem\": \"/Common/{{VS_NAME}}-psp_end_allow\"\r\n \r\n },\r\n {\r\n \"caption\": \"fallback\",\r\n \"nextItem\": \"/Common/{{VS_NAME}}-psp_end_deny\"\r\n \r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/policy-item/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "policy-item", "" ] } }, "response": [] } ] }, { "name": "Start Item", "item": [ { "name": "bigip-create-policy item-start", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp_ent\",\r\n \"partition\": \"Common\",\r\n \"caption\": \"Start\",\r\n \"color\": 1,\r\n \"itemType\": \"entry\",\r\n \"loop\": \"false\",\r\n \"rules\": [\r\n {\r\n \"caption\": \"fallback\",\r\n \"nextItem\": \"/Common/{{VS_NAME}}-psp_act_oauth_client\"\r\n\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/policy-item/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "policy-item", "" ] } }, "response": [] } ] }, { "name": "Create Policy", "item": [ { "name": "bigip-create-policy", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp\",\r\n \"partition\": \"Common\",\r\n \"defaultEnding\": \"{{VS_NAME}}-psp_end_deny\",\r\n \"maxMacroLoopCount\": 1,\r\n \"oneshotMacro\": \"false\",\r\n \"startItem\": \"{{VS_NAME}}-psp_ent\",\r\n \"type\": \"access-policy\",\r\n \"items\": [\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_act_oauth_client\",\r\n \"partition\": \"Common\"\r\n },\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_end_allow\",\r\n \"partition\": \"Common\"\r\n },\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_end_deny\",\r\n \"partition\": \"Common\"\r\n },\r\n {\r\n \"name\": \"{{VS_NAME}}-psp_ent\",\r\n \"partition\": \"Common\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/policy/access-policy/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "policy", "access-policy", "" ] } }, "response": [] } ] }, { "name": "Create Profile", "item": [ { "name": "profile-no sso", "item": [ { "name": "bigip-create-profile", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "type": "text", "value": "{{TRANSID}}" } ], "body": { "mode": "raw", "raw": "{\r\n\r\n \"name\": \"{{VS_NAME}}-psp\",\r\n \"partition\": \"Common\",\r\n \"acceptLanguages\": [\r\n \"en\"\r\n ],\r\n \"accessPolicy\": \"/Common/{{VS_NAME}}-psp\",\r\n \"customizationGroup\": \"/Common/{{VS_NAME}}-psp_logout\",\r\n \"epsGroup\": \"/Common/{{VS_NAME}}-psp_eps\",\r\n \"errormapGroup\": \"/Common/{{VS_NAME}}-psp_errormap\",\r\n \"frameworkInstallationGroup\": \"/Common/{{VS_NAME}}-psp_framework_installation\",\r\n \"generalUiGroup\": \"/Common/{{VS_NAME}}-psp_general_ui\",\r\n \"accessPolicyTimeout\": 300,\r\n \"defaultLanguage\": \"en\",\r\n \"httponlyCookie\": \"false\",\r\n \"inactivityTimeout\": 900,\r\n \"logoutUriTimeout\": 5,\r\n \"maxConcurrentSessions\": 0,\r\n \"maxConcurrentUsers\": 0,\r\n \"maxFailureDelay\": 5,\r\n \"maxInProgressSessions\": 128,\r\n \"maxSessionTimeout\": 604800,\r\n \"minFailureDelay\": 2,\r\n \"modifiedSinceLastPolicySync\": \"false\",\r\n \"persistentCookie\": \"false\",\r\n \"restrictToSingleClientIp\": \"false\",\r\n \"scope\": \"profile\",\r\n \"secureCookie\": \"true\",\r\n \"type\": \"all\",\r\n \"useHttp_503OnError\": \"false\",\r\n \"userIdentityMethod\": \"http\",\r\n \"logSettings\": [\r\n \"/Common/default-log-setting\"\r\n ]\r\n\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/apm/profile/access/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "apm", "profile", "access", "" ] } }, "response": [] } ] } ] }, { "name": "Commit Transaction", "item": [ { "name": "bigip-commit-transaction", "event": [ { "listen": "test", "script": { "exec": [ "\r", "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");\r", "\r", "if (responseCode.code === 200) {\r", "\r", " pm.test(VS_NAME+\"-psp created\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else \r", " pm.test(VS_NAME+\"-psp exists\", function () {\r", " pm.response.to.have.status(409);\r", " });\r", "\r", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "PUT", "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": "{\n \"state\":\"VALIDATING\"\t\n\t\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/transaction/{{TRANSID}}/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "transaction", "{{TRANSID}}", "" ] } }, "response": [] } ] }, { "name": "Apply Policy", "item": [ { "name": "bigip-apply policy", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "\r", "\r", "pm.test(\"Apply Policy Successful for \" +VS_NAME+\"-psp\", function () {\r", " pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "PATCH", "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": "{\r\n \"generationAction\": \"increment\" \r\n}" }, "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": "End PSP", "item": [ { "name": "end-psp-1", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] }, { "name": "Virtual Server Address Assignment", "item": [ { "name": "bigip-Check Scope for existing assignment", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");\r", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var jsonData = pm.response.json();\r", "var EXIST = 0\r", "\r", "\r", "\r", "if(!jsonData.length) {\r", " if ( jsonData.Description === VS_NAME ) {\r", " pm.collectionVariables.set(\"BIGIP_ADDRESS\"+VS_COUNTER, jsonData.IPAddress.IPAddressToString );\r", " pm.collectionVariables.set(\"BIGIP_ADDRESS\", pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER));\r", " var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER);\r", " postman.setNextRequest(\"end-address\");\r", " var EXIST = 1;\r", " if (responseCode.code === 200) {\r", " pm.test(\"Existing Address \"+ADDR+\" assigned to \"+VS_NAME, function () {\r", " pm.response.to.have.status(200);\r", " });\r", " }\r", " }\r", "} else {\r", "\r", " for (var i = 0; i < jsonData.length; i++) {\r", "\r", " if ( jsonData[i].Description === VS_NAME ) { \r", " pm.collectionVariables.set(\"BIGIP_ADDRESS\"+VS_COUNTER, jsonData[i].IPAddress.IPAddressToString );\r", " pm.collectionVariables.set(\"BIGIP_ADDRESS\", pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER));\r", " var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER);\r", " postman.setNextRequest(\"end-address\");\r", " var EXIST =1;\r", "\r", " if (responseCode.code === 200) {\r", " pm.test(\"Existing Address \"+ADDR+\" assigned to \"+VS_NAME, function () {\r", " pm.response.to.have.status(200);\r", " });\r", " }\r", " } \r", " }\r", "} \r", "\r", "if (EXIST === 0) {\r", " if (responseCode.code === 200) {\r", " pm.test(\"No Address assigned to \"+VS_NAME , function () {\r", " pm.response.to.have.status(200);\r", " }); \r", " }\r", "}\r", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "url": { "raw": "http://10.1.20.6:81/addr/scope-status?scope={{BIGIP_SCOPE}}", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "addr", "scope-status" ], "query": [ { "key": "scope", "value": "{{BIGIP_SCOPE}}" } ] } }, "response": [] }, { "name": "bigip-Check for next available address", "event": [ { "listen": "test", "script": { "exec": [ "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var jsonData = pm.response.json();\r", "\r", "\r", "pm.collectionVariables.set(\"BIGIP_ADDRESS\"+VS_COUNTER,jsonData.address);\r", "pm.collectionVariables.set(\"BIGIP_ADDRESS\", pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER));\r", "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER)\r", "\r", "pm.test(\"Next availble address is \"+ADDR, function () {\r", " pm.expect(jsonData.address).not.eql(null);\r", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "http://10.1.20.6:81/addr/available?scope={{BIGIP_SCOPE}}", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "addr", "available" ], "query": [ { "key": "scope", "value": "{{BIGIP_SCOPE}}" } ] } }, "response": [] }, { "name": "bigip-Check bigip for existing address", "event": [ { "listen": "test", "script": { "exec": [ "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\");\r", "var jsonData = pm.response.json();\r", "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS\"+VS_COUNTER)\r", "var exist = 0\r", "\r", "\r", " if (responseCode.code === 200) {\r", " if(!jsonData.length) {\r", " for (var i = 0; i < jsonData.items.length; i++) {\r", " if ( jsonData.items[i].destination.includes(ADDR)) { \r", " var VS_NAME = jsonData.items[i].name \r", " \r", " pm.test(ADDR+\" in use by Virtual server \"+VS_NAME, function () {\r", " pm.response.to.have.status(200);\r", " });\r", "\r", " pm.collectionVariables.set(\"EXISTING_VS\", VS_NAME); \r", "\r", " var exist = 1 \r", " }\r", " }\r", " }\r", " if (exist === 0) {\r", " pm.test(\"Address \"+ADDR+\" not configured on BIG-IP\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"bigip-checkout-address\");\r", " }\r", " \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": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/tm/ltm/virtual/", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "tm", "ltm", "virtual", "" ] } }, "response": [] }, { "name": "bigip-checkout-address-exists", "event": [ { "listen": "test", "script": { "exec": [ "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS\");", "var VS_NAME = pm.collectionVariables.get(\"EXISTING_VS\");", "var jsonData = pm.response.json();", "", "pm.test(\"Address \"+ADDR+\" checked out for \"+VS_NAME+\". Looking for next available Address\", function () {", " pm.expect(jsonData.status).not.eql(\"Fail\");", "});", "postman.setNextRequest(\"bigip-Check Scope for existing assignment\");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\"scope\":\"{{BIGIP_SCOPE}}\",\n\"address\":\"{{BIGIP_ADDRESS}}\",\n\"name\":\"{{EXISTING_VS}}\"\n}" }, "url": { "raw": "http://10.1.20.6:81/addr/checkout", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "addr", "checkout" ] } }, "response": [] }, { "name": "bigip-checkout-address", "event": [ { "listen": "test", "script": { "exec": [ "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS\");", "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");", "var jsonData = pm.response.json();", "", "pm.test(\"Address \"+ADDR+\" checked out for \"+VS_NAME, function () {", " pm.expect(jsonData.status).not.eql(\"Fail\");", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\"scope\":\"{{BIGIP_SCOPE}}\",\n\"address\":\"{{BIGIP_ADDRESS}}\",\n\"name\":\"{{VS_NAME}}\"\n}" }, "url": { "raw": "http://10.1.20.6:81/addr/checkout", "protocol": "http", "host": [ "10", "1", "20", "6" ], "port": "81", "path": [ "addr", "checkout" ] } }, "response": [] }, { "name": "end-address", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "End Loop - Imperative Calls", "item": [ { "name": "loop-objects", "event": [ { "listen": "test", "script": { "exec": [ "var VIPS = pm.collectionVariables.get(\"VIPS\");", "var VS_COUNTER = pm.collectionVariables.get(\"VS_COUNTER\")", "var DNS_COUNTER = pm.collectionVariables.get(\"DNS_COUNTER\")", "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");", "", "if (VS_COUNTER < VIPS ) {", " pm.test(\"Objects for Virutal Server \"+VS_NAME+\" completed. Creating loop for next virtual server \" , function () {", " pm.response.to.have.status(200);", " });", " VS_COUNTER++", " DNS_COUNTER++", "", "pm.collectionVariables.set(\"VS_COUNTER\", VS_COUNTER)", "pm.collectionVariables.set(\"DNS_COUNTER\", DNS_COUNTER)", "", "postman.setNextRequest(\"start-objects\");", "", "", "} else {", " pm.test(\"Objects for Virtual Server \"+VS_NAME+\" Ccmpleted. All objects created\" , function () {", " pm.response.to.have.status(200);", " });", " pm.collectionVariables.set(\"VS_COUNTER\", 1)", " pm.collectionVariables.set(\"DNS_COUNTER\", 1)", "}", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Applications", "item": [ { "name": "SIngle Tenant-1 VIP-no ServerSSL-Attach PSP", "item": [ { "name": "bigip-create-application", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS_NAME\");", "", "pm.test(\"Application \"+VS_NAME+\" created\", function () {", " pm.response.to.have.status(200);", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"class\": \"ADC\",\r\n \"action\": \"deploy\",\r\n \"persist\": true,\r\n \"declaration\": {\r\n \"class\": \"ADC\",\r\n \"schemaVersion\": \"3.14.0\",\r\n \"id\": \"APM\",\r\n \"{{PARTITION_NAME}}\": {\r\n \"class\": \"Tenant\",\r\n \"{{VS1_NAME}}\": {\r\n \"class\": \"Application\",\r\n \"template\": \"generic\",\r\n \"{{VS1_NAME}}\": {\r\n \"class\": \"Service_HTTPS\",\r\n \"virtualAddresses\": [\r\n \"{{BIGIP_ADDRESS1}}\"\r\n ],\r\n \"virtualPort\": 443,\r\n \"serverTLS\": \"{{VS1_NAME}}-clientssl\",\r\n \"pool\": \"iis-pool\",\r\n \t\t\"snat\": \"auto\",\r\n \t\t\"profileAccess\": {\r\n \t\t\t\"bigip\": \"/Common/{{VS1_NAME}}-psp\"\r\n \t\t }\r\n },\r\n \"{{VS1_NAME}}-clientssl\": {\r\n \"class\": \"TLS_Server\",\r\n \"certificates\": [\r\n {\r\n \"certificate\": \"tlsserver_local_cert\"\r\n }\r\n ]\r\n },\r\n \"tlsserver_local_cert\": {\r\n \"class\": \"Certificate\",\r\n \"certificate\": {\"bigip\":\"/Common/acme.com-wildcard\"},\r\n \"privateKey\": {\"bigip\":\"/Common/acme.com-wildcard\"}\r\n },\r\n \"iis-pool\": {\r\n \"class\": \"Pool\", \r\n \"members\": [\r\n {\r\n \"serverAddresses\": [\r\n \"{{IIS_ADDRESS1}}\"\r\n ],\r\n \"servicePort\": 80\r\n }\r\n ],\r\n \"monitors\": [\r\n \"tcp\"\r\n ]\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n}" }, "url": { "raw": "https://{{BIGIP_MGMT}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{BIGIP_MGMT}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] }, { "name": "External DNS", "item": [ { "name": "Single Application", "item": [ { "name": "Create DC1 External DNS Configuration for SIngle App", "item": [ { "name": "bigip5-Test AS3 is running", "event": [ { "listen": "test", "script": { "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(\"end-dns-dc1\");", " pm.test(\"Proceeding to DC2 DNS Configuration\", function () {", " pm.response.to.have.status(200);", " });", "", "} else {", "", " ", "}", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": [] }, { "name": "bigip5-Create-DC1", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", "", "pm.test(\"DC1 Created\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"DC1 Exists\", function () {", " pm.response.to.have.status(409);", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\"name\":\"DC1\"\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/datacenter", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "datacenter" ] } }, "response": [] }, { "name": "bigip5-Create-bigip1 server", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", "", "pm.test(\"bigip1 server Created\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"bigip1 server Exists\", function () {", " pm.response.to.have.status(409);", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"bigip1.f5lab.local\",\r\n \"datacenter\": \"/Common/DC1\",\r\n \"enabled\": true,\r\n \"exposeRouteDomains\": \"no\",\r\n \"iqAllowPath\": \"yes\",\r\n \"iqAllowServiceCheck\": \"yes\",\r\n \"iqAllowSnmp\": \"yes\",\r\n \"limitCpuUsage\": 0,\r\n \"limitCpuUsageStatus\": \"disabled\",\r\n \"limitMaxBps\": 0,\r\n \"limitMaxBpsStatus\": \"disabled\",\r\n \"limitMaxConnections\": 0,\r\n \"limitMaxConnectionsStatus\": \"disabled\",\r\n \"limitMaxPps\": 0,\r\n \"limitMaxPpsStatus\": \"disabled\",\r\n \"limitMemAvail\": 0,\r\n \"limitMemAvailStatus\": \"disabled\",\r\n \"linkDiscovery\": \"disabled\",\r\n \"monitor\": \"/Common/bigip\",\r\n \r\n \"product\": \"bigip\",\r\n \"virtualServerDiscovery\": \"disabled\",\r\n \"addresses\": [\r\n {\r\n \"name\": \"10.1.10.4\",\r\n \"deviceName\": \"bigip1.f5lab.local\",\r\n \"translation\": \"none\"\r\n }\r\n ]\r\n\r\n }\r\n" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server" ] } }, "response": [] }, { "name": "bigip5-Create-bigip5 server", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", "", "pm.test(\"bigip5 server Created\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"bigip5 server Exists\", function () {", " pm.response.to.have.status(409);", "});", "", "setTimeout(function(){}, 2000);" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"bigip5.f5lab.local\",\r\n \"datacenter\": \"/Common/DC1\",\r\n \"enabled\": true,\r\n \"exposeRouteDomains\": \"no\",\r\n \"iqAllowPath\": \"yes\",\r\n \"iqAllowServiceCheck\": \"yes\",\r\n \"iqAllowSnmp\": \"yes\",\r\n \"limitCpuUsage\": 0,\r\n \"limitCpuUsageStatus\": \"disabled\",\r\n \"limitMaxBps\": 0,\r\n \"limitMaxBpsStatus\": \"disabled\",\r\n \"limitMaxConnections\": 0,\r\n \"limitMaxConnectionsStatus\": \"disabled\",\r\n \"limitMaxPps\": 0,\r\n \"limitMaxPpsStatus\": \"disabled\",\r\n \"limitMemAvail\": 0,\r\n \"limitMemAvailStatus\": \"disabled\",\r\n \"linkDiscovery\": \"disabled\",\r\n \"monitor\": \"/Common/bigip\",\r\n \r\n \"product\": \"bigip\",\r\n \"virtualServerDiscovery\": \"disabled\",\r\n \"addresses\": [\r\n {\r\n \"name\": \"10.1.10.11\",\r\n \"deviceName\": \"bigip5.f5lab.local\",\r\n \"translation\": \"none\"\r\n }\r\n ]\r\n\r\n }\r\n" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server" ] } }, "response": [] }, { "name": "bigip5-Add bigip1 application VS to Server", "event": [ { "listen": "test", "script": { "exec": [ "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");", "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS1\")", "", "if (responseCode.code === 200) {", "", "pm.test(\"Virtual Server \"+VS_NAME+\" with IP Address \"+ADDR+\" added to Server bigip1.f5lab.local\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"Virtual Server \"+VS_NAME+\" exists on server bigip1.f5lab.local\", function () {", " pm.response.to.have.status(409);", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n\"name\": \"/{{PARTITION_NAME}}/{{PATH_NAME}}/{{VS1_NAME}}\",\r\n\"destination\": \"{{BIGIP_ADDRESS1}}:443\"\r\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server/~Common~bigip1.f5lab.local/virtual-servers/", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server", "~Common~bigip1.f5lab.local", "virtual-servers", "" ] } }, "response": [] }, { "name": "bigip5-Create WideIP using AS3", "event": [ { "listen": "test", "script": { "exec": [ "var DNS_NAME = pm.collectionVariables.get(\"DNS1_NAME\");\r", "\r", "\r", "if (responseCode.code === 200) {\r", "\r", "pm.test(\"Wide IP \"+DNS_NAME+\" Created\", function () {\r", " pm.response.to.have.status(200);\r", "});\r", "} else \r", "pm.test(\"Wide IP \"+DNS_NAME+\" exists\", function () {\r", " pm.response.to.have.status(409);\r", "});\r", "\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\r\n \"class\": \"ADC\",\r\n \"schemaVersion\": \"3.6.0\",\r\n \"id\": \"GSLB_Sample\",\r\n \"{{PARTITION_NAME}}-gslb\": {\r\n \"class\": \"Tenant\",\r\n \"{{VS1_NAME}}\": {\r\n \"class\": \"Application\",\r\n \"template\": \"generic\",\r\n \"testDomain\": {\r\n \"class\": \"GSLB_Domain\",\r\n \"domainName\": \"{{DNS1_NAME}}\",\r\n \"resourceRecordType\": \"A\",\r\n \"poolLbMode\": \"ratio\",\r\n \"lastResortPool\": {\"use\": \"{{VS1_NAME}}-pool\"},\r\n \"lastResortPoolType\": \"A\",\r\n \"pools\": [\r\n { \"use\": \"{{VS1_NAME}}-pool\" }\r\n ]\r\n },\r\n \"{{VS1_NAME}}-pool\": {\r\n \"class\": \"GSLB_Pool\",\r\n \"enabled\": true,\r\n \"lbModeAlternate\": \"ratio\",\r\n \"lbModeFallback\": \"ratio\",\r\n \"manualResumeEnabled\": false,\r\n \"verifyMemberEnabled\": true,\r\n \"members\": [\r\n \t{\r\n \t\"ratio\":10,\r\n \t\"server\": {\r\n \t\t\"bigip\": \"/Common/bigip1.f5lab.local\"\r\n \t\t},\r\n \t\t\"virtualServer\":\"/{{PARTITION_NAME}}/{{PATH_NAME}}/{{VS1_NAME}}\"\r\n \t}\r\n ],\r\n \"resourceRecordType\": \"A\"\r\n }\r\n }\r\n }\r\n \r\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "end-dns-dc1", "event": [ { "listen": "test", "script": { "exec": [ "var DC2_APM = pm.environment.get(\"DC2_APM\");", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");", "", "if (DC2_APM === 'true' && DC_COUNTER === '2') {", " ", "} else {", "", " postman.setNextRequest(\"end-dns-dc2\");", " pm.collectionVariables.set('DC_COUNTER', '1' );", " pm.test(\"Skipping DC2 DNS Configuration\", function () {", " pm.response.to.have.status(200);", " });", "", "}", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": [] } ] }, { "name": "Add DC2 External DNS Configuration for Single App", "item": [ { "name": "start-dns-dc2", "event": [ { "listen": "test", "script": { "exec": [ "var DC2_APM = pm.environment.get(\"DC2_APM\");", "var DC_COUNTER = pm.collectionVariables.get(\"DC_COUNTER\");", "", "if (DC2_APM === 'true' && DC_COUNTER === '2') {", " ", "} else {", "", " postman.setNextRequest(\"end-dns-dc2\");", " pm.collectionVariables.set('DC_COUNTER', '1' );", " pm.test(\"Skipping DC2 DNS Configuration\", function () {", " pm.response.to.have.status(200);", " });", "", "}", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": [] }, { "name": "bigip5-exist-bigip2", "event": [ { "listen": "test", "script": { "exec": [ "\r", "var jsonData = pm.response.json();\r", "\r", " for (var i = 0; i < jsonData.items.length; i++) {\r", "\r", " if (jsonData.items[i].name === \"bigip2.f5lab.local\") {\r", " pm.test(\"BIGIP2 already exists\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", " postman.setNextRequest(\"bigip5-Add bigip2 Application VS to Server\");\r", " }\r", " }\r", "\r", "\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "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", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server" ] } }, "response": [] }, { "name": "bigip_add - bigip2 to bigip5", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"bigip_add command successfully run\", function () {\r", "pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\t\"command\":\"run\",\r\n\t\"options\":[\r\n\t\t{\r\n\t\t\t\"ssh-password\":\"admin\",\r\n\t\t\t\"admin@10.1.1.5\":\"\"\r\n\t\t}\r\n\t]\r\n} " }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/bigip_add", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "bigip_add" ] } }, "response": [] }, { "name": "bigip2.f5lab.local - big3d_install", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"big3d_install command successfully run\", function () {\r", "pm.response.to.have.status(200);\r", "});" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\t\"command\":\"run\",\r\n\t\"options\":[\r\n\t\t{\r\n\t\t\t\"ssh-password\":\"admin\",\r\n\t\t\t\"admin@10.1.1.5\":\"\"\r\n\t\t}\r\n\t]\r\n} " }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/big3d_install", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "big3d_install" ] } }, "response": [] }, { "name": "bigip5-Create-DC2", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {", "", "pm.test(\"DC2 Created\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"DC2 Exists\", function () {", " pm.response.to.have.status(409);", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n\"name\":\"DC2\"\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/datacenter", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "datacenter" ] } }, "response": [] }, { "name": "Add Server - BIG-IP2 to BIG-IP5", "event": [ { "listen": "test", "script": { "exec": [ "if (responseCode.code === 200) {\r", "\r", " pm.test(\"BIG-IP2 added\", function () {\r", " pm.response.to.have.status(200);\r", " });\r", "} else\r", " pm.test(\"BIG-IP2 already Exists\", function () {\r", " pm.response.to.have.status(409);\r", " });\r", "\r", "setTimeout(function(){}, 2000);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\":\"bigip2.f5lab.local\",\n\t\"datacenter\": \"/Common/DC2\",\n\t\"virtualServerDiscovery\": \"disabled\",\n\t \"addresses\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\":\"10.1.10.5\",\n\t\t\t\t\t\"deviceName\": \"bigip2.f5lab.local\",\n\t\t\t\t\t\"translation\": \"none\"\n\t\t\t\t}\n\t\t\t]\n\t\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server" ] } }, "response": [] }, { "name": "bigip5-Add bigip2 Application VS to Server", "event": [ { "listen": "test", "script": { "exec": [ "", "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");", "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS1\")", "", "if (responseCode.code === 200) {", "", "pm.test(\"Virtual Server \"+VS_NAME+\" with IP Address \"+ADDR+\" added to server bigip2.f5lab.local\", function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"Virtual Server \"+VS_NAME+\" exists on server bigip2.f5lab.local\", function () {", " pm.response.to.have.status(409);", "});", "", "setTimeout(function(){},5000);" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\"name\": \"/{{PARTITION_NAME}}/{{PATH_NAME}}/{{VS1_NAME}}\",\r\n\"destination\": \"{{BIGIP_ADDRESS1}}:443\"\r\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/server/~Common~bigip2.f5lab.local/virtual-servers/", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "server", "~Common~bigip2.f5lab.local", "virtual-servers", "" ] } }, "response": [] }, { "name": "bigip5-Add bigip2 application to WideIP Pool", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var NAME = pm.collectionVariables.get(\"DNS1_NAME\");", "var VS_NAME = pm.collectionVariables.get(\"VS1_NAME\");", "var ADDR = pm.collectionVariables.get(\"BIGIP_ADDRESS1\")", "", "", "", "if (responseCode.code === 200) {", "", "pm.test(\"Virtual Server \"+VS_NAME+\" with IP Address \"+ADDR+\" added to Wide IP \"+NAME, function () {", " pm.response.to.have.status(200);", "});", "} else ", "pm.test(\"Virtual Server \"+VS_NAME+\" exists on Wide IP \"+NAME, function () {", " pm.response.to.have.status(409);", "});", "", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "admin", "type": "string" }, { "key": "username", "value": "admin", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "type": "text", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n\"name\":\"bigip2.f5lab.local:/{{PARTITION_NAME}}/{{PATH_NAME}}/{{VS1_NAME}}\"\r\n\t\r\n\t\r\n}" }, "url": { "raw": "https://10.1.1.11/mgmt/tm/gtm/pool/a/~{{PARTITION_NAME}}-gslb~{{VS1_NAME}}~{{VS1_NAME}}-pool/members", "protocol": "https", "host": [ "10", "1", "1", "11" ], "path": [ "mgmt", "tm", "gtm", "pool", "a", "~{{PARTITION_NAME}}-gslb~{{VS1_NAME}}~{{VS1_NAME}}-pool", "members" ] } }, "response": [] }, { "name": "end-dns-dc2", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": [] } ] } ] } ] }, { "name": "End loop Datacenters", "item": [ { "name": "loop", "event": [ { "listen": "test", "script": { "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 created in DC1. Beginning DC2 Deployment\", function () {", " pm.response.to.have.status(200);", " });", "", "", "} else if (DC2_APM === 'false' && DC_COUNTER === '1') {", " pm.test(\"Application created in DC1 \", function () {", " pm.expect(pm.environment.get(\"DC2_APM\")).to.equal(\"false\");", " });", "", "} else {", " pm.test(\"Application created 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": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Display OAuth Client Setting", "item": [ { "name": "display client settings", "event": [ { "listen": "test", "script": { "exec": [ "var id = pm.collectionVariables.get(\"CLIENT_ID\");", "var secret = pm.collectionVariables.get(\"CLIENT_SECRET\");", "var auth_uri = pm.collectionVariables.get(\"AUTH_URI\");", "var token_uri = pm.collectionVariables.get(\"TOKEN_URI\");", "var client_redirect_uri = pm.collectionVariables.get(\"CLIENT_REDIRECT_URI\");", "", "pm.test(\"CALLBACK URL: \" +client_redirect_uri, function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"AUTH URL: \" +auth_uri, function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"ACCESS TOKEN URL: \" +token_uri, function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"CLIENT ID: \" +id, function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"CLIENT SECRET: \"+secret, function () {", " pm.response.to.have.status(200);", "});", "", "", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "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": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "VIPS", "value": "" }, { "key": "PATH_NAME", "value": "" }, { "key": "PARTITION_NAME", "value": "" }, { "key": "DNS1_NAME", "value": "" }, { "key": "VS1_NAME", "value": "" }, { "key": "DNS2_NAME", "value": "" }, { "key": "VS2_NAME", "value": "" }, { "key": "CUSTOM_TYPE", "value": "" }, { "key": "BIGIP_MGMT", "value": "" }, { "key": "BIGIP_SCOPE", "value": "" }, { "key": "DC_COUNTER", "value": "" }, { "key": "VS_COUNTER", "value": "" }, { "key": "DNS_COUNTER", "value": "" }, { "key": "VS_NAME", "value": "" }, { "key": "DNS_NAME", "value": "" }, { "key": "IIS_ADDRESS1", "value": "" }, { "key": "IIS_ADDRESS", "value": "" }, { "key": "DISCOVER_ID", "value": "" }, { "key": "AUTH_URI", "value": "" }, { "key": "TOKEN_URI", "value": "" }, { "key": "CLIENT_ID", "value": "" }, { "key": "CLIENT_SECRET", "value": "" }, { "key": "TRANSID", "value": "" }, { "key": "BIGIP_ADDRESS1", "value": "" }, { "key": "BIGIP_ADDRESS", "value": "" }, { "key": "CLIENT_REDIRECT_URI", "value": "" } ] }