{ "variables": [], "info": { "name": "F5 Programmability: Class 1 - Service Provider", "_postman_id": "ccd559d1-dc1f-9015-c6c8-8f8cefce7236", "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { "name": "Lab 1.2 - API Authentication & 'example' Templates", "item": [ { "name": "Step 1: HTTP BASIC Authentication", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:ltm:ltmcollectionstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "auth": { "type": "basic", "basic": { "username": "", "password": "", "showPassword": false } }, "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Step 2: Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"token.userName\", ", " \"value\":\"admin\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authn/login", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\":\"\",\n \"password\":\"\",\n \"loginProviderName\":\"tmos\"\n}" } }, "response": [] }, { "name": "Step 3: Verify Authentication Works", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items\", ", " \"value\":\"0\",", " \"op\":\">=\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authz/tokens", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Step 4: Set Authentication Token Timeout", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"timeout\", ", " \"value\":\"36000\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authz/tokens/{{bigip_a_auth_token}}", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"timeout\":\"36000\"\n}" } }, "response": [] }, { "name": "Step 5: Get 'example' of a Pool Resource", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:ltm:pool:poolcollectionstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/pool/example", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"baseRegKey\":\"\",\n \"addOnKeys\":[],\n \"automaticActivation\":false\n}" } }, "response": [] } ] }, { "name": "Lab 1.3 - Review/Set Device Settings", "item": [ { "name": " Step 1: Get System Global-Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/global-settings", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"baseRegKey\":\"\",\n \"addOnKeys\":[],\n \"automaticActivation\":false\n}" } }, "response": [] }, { "name": " Step 2: Set System Global-Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"hostname\", ", " \"value\":\"bigip-a.f5.local\" ", " },", " {", " \"path\":\"guiSetup\",", " \"value\":\"disabled\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/global-settings", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"guiSetup\": \"disabled\",\n \"hostname\": \"\"\n}" } }, "response": [] }, { "name": " Step 3: Get System DNS Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:dns:dnsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/dns", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"baseRegKey\":\"\",\n \"addOnKeys\":[],\n \"automaticActivation\":false\n}" } }, "response": [] }, { "name": " Step 4: Set System DNS Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"nameServers.0\", ", " \"value\": \"4.2.2.2\"", " },", " { ", " \"path\":\"nameServers.1\", ", " \"value\": \"8.8.8.8\"", " },", " { ", " \"path\":\"search.0\", ", " \"value\": \"localhost\"", " },", " { ", " \"path\":\"search.1\", ", " \"value\": \"f5.local\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/dns", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"nameServers\": [\n \"4.2.2.2\",\n \"8.8.8.8\"\n ],\n \"search\": [\n \"localhost\"\n ]\n}" } }, "response": [] }, { "name": " Step 5: Get System NTP Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:ntp:ntpstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/ntp", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"baseRegKey\":\"\",\n \"addOnKeys\":[],\n \"automaticActivation\":false\n}" } }, "response": [] }, { "name": " Step 6: Set System NTP Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"servers.0\", ", " \"value\": \"0.pool.ntp.org\"", " },", " { ", " \"path\":\"servers.1\", ", " \"value\": \"1.pool.ntp.org\"", " },", " { ", " \"path\":\"timezone\", ", " \"value\": \"America/Los_Angeles\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/ntp", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"servers\": [\n \"0.pool.ntp.org\",\n \"1.pool.ntp.org\"\n ],\n \"timezone\": \"America/Los_Angeles\"\n}" } }, "response": [] }, { "name": " Step 7: Set root User Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"generation\", ", " \"value\":\"0\",", " \"op\": \">=\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authn/root", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"oldPassword\":\"default\",\n \"newPassword\":\"\"\n}" } }, "response": [] }, { "name": " Step 8: Set admin User Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\":\"admin\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/user/admin", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"password\":\"\"\n}" } }, "response": [] } ] }, { "name": "Lab 1.3A - SNMP & Syslog", "description": "", "item": [ { "name": "Step 1: Get SNMP settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/snmp", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"baseRegKey\":\"\",\n \"addOnKeys\":[],\n \"automaticActivation\":false\n}" }, "description": "" }, "response": [] }, { "name": "Step 2: Update SNMP setting", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/snmp", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"agentAddresses\": [\n \"udp6:161\",\n \"tcp6:161\"\n ],\n \"agentTrap\": \"enabled\",\n \"allowedAddresses\": [\n \"127\",\n \"0.0.0.0/0.0.0.0\"\n ],\n \"authTrap\": \"disabled\",\n \"bigipTraps\": \"enabled\",\n \"snmpv1\": \"enable\",\n \"snmpv2c\": \"enable\",\n \"sysContact\": \"name example \",\n \"sysLocation\": \"Network location 1\",\n \"sysServices\": 78,\n \"trapCommunity\": \"public\",\n \"trapSource\": \"none\"\n}" }, "description": "" }, "response": [ { "id": "dfdab7d0-3d88-47e7-8736-7e0284e71e6f", "name": "Set SNMP Settings", "originalRequest": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/snmp", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n\t\"allowedAddresses\": [\n\t\t\"127\"\n\t\t\"0.0.0.0/0.0.0.0\"\n\t]\n\t\"sysContact\": [\n\t\t\n\t]\n}" } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "_postman_previewtype": "text", "header": [ { "key": "Allow", "value": "", "name": "Allow", "description": "Valid actions for a specified resource. To be used for a 405 Method not allowed" }, { "key": "Cache-Control", "value": "no-store, no-cache, must-revalidate", "name": "Cache-Control", "description": "Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds" }, { "key": "Connection", "value": "Keep-Alive", "name": "Connection", "description": "Options that are desired for the connection" }, { "key": "Content-Length", "value": "1454", "name": "Content-Length", "description": "The length of the response body in octets (8-bit bytes)" }, { "key": "Content-Security-Policy", "value": "default-src 'self' https://sentinel.whitehatsec.com https://api.ctscloud.com https://key.ctscloud.com 'unsafe-inline' 'unsafe-eval'; img-src 'self' https://sentinel.whitehatsec.com https://api.ctscloud.com https://key.ctscloud.com http://127.4.1.1 http://127.4.2.1", "name": "Content-Security-Policy", "description": "Custom header" }, { "key": "Content-Type", "value": "application/json", "name": "Content-Type", "description": "The mime type of this content" }, { "key": "Date", "value": "11 Jan 2018 16:37:36 UTC", "name": "Date", "description": "The date and time that the message was sent" }, { "key": "Expires", "value": "-1", "name": "Expires", "description": "Gives the date/time after which the response is considered stale" }, { "key": "Keep-Alive", "value": "timeout=4, max=100", "name": "Keep-Alive", "description": "Custom header" }, { "key": "Local-Ip-From-Httpd", "value": "10.1.1.10", "name": "Local-Ip-From-Httpd", "description": "Custom header" }, { "key": "Postman-Token", "value": "1af61d3f-a5cb-4255-9d8d-27508fbd3355", "name": "Postman-Token", "description": "Custom header" }, { "key": "Pragma", "value": "no-cache", "name": "Pragma", "description": "Implementation-specific headers that may have various effects anywhere along the request-response chain." }, { "key": "Server", "value": "com.f5.rest.common.RestRequestSender", "name": "Server", "description": "A name for the server" }, { "key": "Strict-Transport-Security", "value": "max-age=16070400; includeSubDomains", "name": "Strict-Transport-Security", "description": "A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains." }, { "key": "X-Content-Type-Options", "value": "nosniff", "name": "X-Content-Type-Options", "description": "The only defined value, \"nosniff\", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type" }, { "key": "X-Forwarded-Host", "value": "10.1.1.10", "name": "X-Forwarded-Host", "description": "Custom header" }, { "key": "X-Forwarded-Proto", "value": "http", "name": "X-Forwarded-Proto", "description": "A de facto standard for identifying the originating protocol of an HTTP request, since a reverse proxy (load balancer) may communicate with a web server using HTTP even if the request to the reverse proxy is HTTPS" }, { "key": "X-Forwarded-Server", "value": "localhost.localdomain", "name": "X-Forwarded-Server", "description": "Custom header" }, { "key": "X-Frame-Options", "value": "SAMEORIGIN", "name": "X-Frame-Options", "description": "Clickjacking protection: \"deny\" - no rendering within a frame, \"sameorigin\" - no rendering if origin mismatch" }, { "key": "X-XSS-Protection", "value": "1; mode=block", "name": "X-XSS-Protection", "description": "Cross-site scripting (XSS) filter" }, { "key": "accept-encoding", "value": "gzip, deflate", "name": "accept-encoding", "description": "Custom header" } ], "cookie": [], "responseTime": 583, "body": "{\n\n \"allowedAddresses\": [\n \"127\",\n \"0.0.0.0/0.0.0.0\"\n ],\n \"snmpv1\": \"enable\",\n \"snmpv2c\": \"enable\",\n \"sysContact\": \"Name Example \",\n \"sysLocation\": \"Network location 1\",\n \"sysServices\": 78,\n \"trapCommunity\": \"public\",\n \"trapSource\": \"none\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 4: Create SNMP Traps Destination", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/snmp/traps", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n\t\"kind\": \"tm:sys:snmp:traps:trapsstate\",\n \"name\": \"/Common/i192_168_100_1_1\",\n \"fullPath\": \"/Common/i192_168_100_1_1\",\n \"generation\": 0,\n \"community\": \"public\",\n \"host\": \"192.168.100.1\",\n \"network\": \"mgmt\",\n \"port\": 161,\n \"securityLevel\": \"no-auth-no-privacy\",\n \"version\": \"2c\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 5: Get update for SNMP Traps Setting", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/snmp/traps", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"agentAddresses\": [\n \"udp6:161\",\n \"tcp6:161\"\n ],\n \"agentTrap\": \"enabled\",\n \"allowedAddresses\": [\n \"127\",\n \"0.0.0.0/0.0.0.0\"\n ],\n \"authTrap\": \"disabled\",\n \"bigipTraps\": \"enabled\",\n \"snmpv1\": \"enable\",\n \"snmpv2c\": \"enable\",\n \"sysContact\": \"name example \",\n \"sysLocation\": \"Network location 1\",\n \"sysServices\": 78,\n \"trapCommunity\": \"public\",\n \"trapSource\": \"none\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 6: Detele SNMP Traps", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/snmp/traps/~Common~i192_168_100_1_1", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"/Common/i192_168_100_1_1\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 7: Get Syslog Setting", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/syslog", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"/Common/i192_168_100_1_1\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 8: Update Syslog Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/syslog", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"remoteServers\": [\n {\n \"name\": \"/Common/remotesyslog1\",\n \"host\": \"192.168.1.1\",\n \"localIp\": \"none\",\n \"remotePort\": 514\n }\n ]\n}" }, "description": "" }, "response": [] }, { "name": "Step 9: Get Syslog remote HSL Setting", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/log-config/destination/remote-high-speed-log", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"/Common/i192_168_100_1_1\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 10: Create Syslog Remote Server Pool", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/pool", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"test-pool\",\n \"partition\": \"Common\",\n \"allowNat\": \"yes\",\n \"allowSnat\": \"yes\",\n \"ignorePersistedWeight\": \"disabled\",\n \"ipTosToClient\": \"pass-through\",\n \"ipTosToServer\": \"pass-through\",\n \"linkQosToClient\": \"pass-through\",\n \"linkQosToServer\": \"pass-through\",\n \"loadBalancingMode\": \"round-robin\",\n \"minActiveMembers\": 0,\n \"membersReference\": {\n \"isSubcollection\": true\n }\n}" }, "description": "" }, "response": [] }, { "name": "Step 11: Create Syslog Remote HSL Server", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/log-config/destination/remote-high-speed-log", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n\t\"name\": \"my-log-destination\",\n\t\"partition\": \"Common\",\n\t\"fullPath\": \"/Common/my-log-destination\",\n\t\"generation\": 217,\n\t\"distribution\": \"adaptive\",\n\t\"poolName\": \"/Common/test-pool\",\n\t\"protocol\": \"tcp\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 12: Get Syslog Remote HSL Servers", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/log-config/destination/remote-high-speed-log", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"/Common/i192_168_100_1_1\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 13: Create Syslog Publisher", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/log-config/publisher", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"my-publisher\",\n \"partition\": \"Common\",\n \"fullPath\": \"/Common/my-publisher\",\n \"generation\": 228,\n \"destinations\": [\n {\n \"name\": \"my-log-destination\",\n \"partition\": \"Common\"\n }\n ]\n}\n " }, "description": "" }, "response": [] }, { "name": "Step 14: Get Syslog Publishers", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:sys:global-settings:global-settingsstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/log-config/publisher", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"my-publisher\",\n \"partition\": \"Common\",\n \"fullPath\": \"/Common/my-publisher\",\n \"generation\": 228,\n \"destinations\": [\n {\n \"name\": \"my-log-destination\",\n \"partition\": \"Common\"\n }\n ]\n}\n " }, "description": "" }, "response": [] } ] }, { "name": "Lab 1.4 - Basic Network Connectivity", "item": [ { "name": " Step 1: Create a VLAN", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.name == \"Internal\" &&", " resp.tag == \"10\" &&", " resp.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " return 1;", " }", " else if(resp.name == \"External\" &&", " resp.tag == \"20\" &&", " resp.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " return 1;", " } else {", " tests[\"VLAN Configured Correctly'\"] = 0;", " return 0;", " }", "};", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan/?expandSubcollections=true", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "net", "vlan", "" ], "query": [ { "key": "expandSubcollections", "value": "true", "equals": true } ], "variable": [] }, "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Internal\",\n \"partition\": \"Common\",\n \"autoLasthop\": \"default\",\n \"cmpHash\": \"default\",\n \"mtu\": \"1500\",\n \"tag\": \"10\",\n \"interfaces\": \n [ \n {\n \"name\":\"1.1\",\n \"tagged\":false\n }\n ]\n}" } }, "response": [] }, { "name": " Step 2: Get VLANs", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.items.length != 2) {", " tests[\"Correct number of VLANs configured\"] = 0;", " } ", " ", " var internal_ok = false;", " var external_ok = false;", " tests[\"VLAN Internal Configured Correctly\"] = 0;", " tests[\"VLAN External Configured Correctly\"] = 0;", " ", " for(var i=0; i < resp.items.length; i++) {", " var vlan = resp.items[i];", " if(vlan.name == \"Internal\" &&", " vlan.tag == \"10\" &&", " vlan.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " internal_ok = true;", " }", " if(vlan.name == \"External\" &&", " vlan.tag == \"20\" &&", " vlan.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " external_ok = true;", " } ", " }", " ", " if(internal_ok && external_ok) {", " tests[\"VLANs Configured Correctly'\"] = 1;", " return 1;", " } else {", " tests[\"VLANs Configured Correctly'\"] = 0;", " return 0;", " }", " ", "};", "", "var check_vals = [", " { ", " \"path\":\"check_created_vlans\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan/?expandSubcollections=true", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "net", "vlan", "" ], "query": [ { "key": "expandSubcollections", "value": "true", "equals": true } ], "variable": [] }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": "Step 3: Create Internal Self IP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/\\/Common\\/Internal|External/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/self/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Self-Internal\",\n \"partition\": \"Common\",\n \"address\": \"10.1.10.10/24\",\n \"floating\": \"disabled\",\n \"trafficGroup\": \"/Common/traffic-group-local-only\",\n \"vlan\": \"/Common/External\",\n \"allowService\": [\n \"default\"\n ]\n}" } }, "response": [] }, { "name": "Step 4: Create External Self IP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/self/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Self-External\",\n \"partition\": \"Common\",\n \"address\": \"10.1.20.10/24\",\n \"floating\": \"disabled\",\n \"trafficGroup\": \"/Common/traffic-group-local-only\",\n \"vlan\": \"/Common/External\",\n \"allowService\": [\n \"default\"\n ]\n}" } }, "response": [] }, { "name": " Step 5: Get Self-Internal Self IP Attributes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/Internal\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/self/~Common~Self-Internal", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": " Step 6: Get Self IPs", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.items.length != 2) {", " tests[\"Correct number of Self-IPs configured\"] = 0;", " } ", " ", " var internal_ok = false;", " var external_ok = false;", " tests[\"Self-Internal Configured Correctly\"] = 0;", " tests[\"Self-External Configured Correctly\"] = 0;", " ", " for(var i=0; i < resp.items.length; i++) {", " var item = resp.items[i];", " if(item.name == \"Self-Internal\" &&", " item.address == \"10.1.10.10/24\" &&", " item.vlan == \"/Common/Internal\") {", " tests[\"Self-Internal Configured Correctly\"] = 1;", " internal_ok = true;", " }", " if(item.name == \"Self-External\" &&", " item.address == \"10.1.20.10/24\" &&", " item.vlan == \"/Common/External\") {", " tests[\"Self-External Configured Correctly\"] = 1;", " external_ok = true;", " } ", " }", " ", " if(internal_ok && external_ok) {", " tests[\"Self-IPs Configured Correctly'\"] = 1;", " return 1;", " } else {", " tests[\"VLANs Configured Correctly'\"] = 0;", " return 0;", " }", " ", "};", "", "var check_vals = [", " { ", " \"path\":\"check_created_vlans\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/net/self?expandSubcollections=true", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "net", "self" ], "query": [ { "key": "expandSubcollections", "value": "true", "equals": true } ], "variable": [] }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": " Step 7: Get Routes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:net:route:routecollectionstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route?expandSubcollections=true", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "net", "route" ], "query": [ { "key": "expandSubcollections", "value": "true", "equals": true } ], "variable": [] }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": " Step 8: Create a Route", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\":\"Default\" ", " },", " { ", " \"path\":\"gw\", ", " \"value\":\"10.1.20.1\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Default\",\n \"partition\": \"Common\",\n \"gw\": \"10.1.20.1\",\n \"mtu\": 0,\n \"network\": \"0.0.0.0/0\"\n}" } }, "response": [] }, { "name": " Step 9: Get Routes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items.0.name\", ", " \"value\":\"Default\" ", " },", " { ", " \"path\":\"items.0.gw\", ", " \"value\":\"10.1.20.1\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route?expandSubcollections=true", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "net", "route" ], "query": [ { "key": "expandSubcollections", "value": "true", "equals": true } ], "variable": [] }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] } ] }, { "name": "Lab 1.4A - Route Domain & Partition", "item": [ { "name": "Step 1: Create Partition 1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-1\",\n \"defaultRouteDomain\": 0\n}\n" } }, "response": [] }, { "name": "Step 2: Create Partition 2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-2\",\n \"defaultRouteDomain\": 0\n}\n" } }, "response": [] }, { "name": "Step 3: Create vlan-RD1 in partition 1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.name == \"Internal\" &&", " resp.tag == \"10\" &&", " resp.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " return 1;", " }", " else if(resp.name == \"External\" &&", " resp.tag == \"20\" &&", " resp.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " return 1;", " } else {", " tests[\"VLAN Configured Correctly'\"] = 0;", " return 0;", " }", "};", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"vlan-RD1\",\n \"tag\": \"100\",\n \"partition\": \"partition-1\",\n \"interfaces\": \n [ \n {\n \"name\":\"1.1\",\n \"tagged\":true\n }\n ]\n}\n" } }, "response": [] }, { "name": "Step 4: Create vlan-RD2 in partition 2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.name == \"Internal\" &&", " resp.tag == \"10\" &&", " resp.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " return 1;", " }", " else if(resp.name == \"External\" &&", " resp.tag == \"20\" &&", " resp.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " return 1;", " } else {", " tests[\"VLAN Configured Correctly'\"] = 0;", " return 0;", " }", "};", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"vlan-RD2\",\n \"tag\": \"200\",\n \"partition\": \"partition-2\",\n \"interfaces\": \n [ \n {\n \"name\":\"1.1\",\n \"tagged\":true\n }\n ]\n}\n" } }, "response": [] }, { "name": " Step 5: Get VLANs", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.items.length != 2) {", " tests[\"Correct number of VLANs configured\"] = 0;", " } ", " ", " var internal_ok = false;", " var external_ok = false;", " tests[\"VLAN Internal Configured Correctly\"] = 0;", " tests[\"VLAN External Configured Correctly\"] = 0;", " ", " for(var i=0; i < resp.items.length; i++) {", " var vlan = resp.items[i];", " if(vlan.name == \"Internal\" &&", " vlan.tag == \"10\" &&", " vlan.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " internal_ok = true;", " }", " if(vlan.name == \"External\" &&", " vlan.tag == \"20\" &&", " vlan.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " external_ok = true;", " } ", " }", " ", " if(internal_ok && external_ok) {", " tests[\"VLANs Configured Correctly'\"] = 1;", " return 1;", " } else {", " tests[\"VLANs Configured Correctly'\"] = 0;", " return 0;", " }", " ", "};", "", "var check_vals = [", " { ", " \"path\":\"check_created_vlans\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan/?expandSubcollections=true", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "net", "vlan", "" ], "query": [ { "key": "expandSubcollections", "value": "true", "equals": true, "description": "" } ], "variable": [] }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": "Step 6: Create RD1 with vlan-RD1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/\\/Common\\/Internal|External/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route-domain", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"RD-1\",\n \"partition\": \"partition-1\",\n \"id\": 1,\n \"strict\": \"enabled\",\n \"vlans\": [\n \"/partition-1/vlan-RD1\"\n ]\n}\n" } }, "response": [] }, { "name": "Step 7: Create RD2 with vlan-RD2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/\\/Common\\/Internal|External/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route-domain", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"RD-2\",\n \"partition\": \"partition-2\",\n \"id\": 2,\n \"strict\": \"enabled\",\n \"vlans\": [\n \"/partition-2/vlan-RD2\"\n ]\n}\n" } }, "response": [] }, { "name": "Step 8: Get update of Route Domain", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/\\/Common\\/Internal|External/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route-domain", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"RD-2\",\n \"partition\": \"Common\",\n \"id\": 2,\n \"strict\": \"enabled\",\n \"vlans\": [\n \"/Common/vlan-RD2\"\n ]\n}\n" } }, "response": [] }, { "name": "Step 9: Update Partition 1 default RD to RD-1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition/partition-1", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-1\",\n \"defaultRouteDomain\": 1\n}\n" } }, "response": [] }, { "name": "Step 10: Update Partition 2 default RD to RD-2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition/partition-2", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-2\",\n \"defaultRouteDomain\": 2\n}\n" } }, "response": [] }, { "name": "Step 11: cleanup-delete vlan-RD1 in partition 1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.name == \"Internal\" &&", " resp.tag == \"10\" &&", " resp.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " return 1;", " }", " else if(resp.name == \"External\" &&", " resp.tag == \"20\" &&", " resp.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " return 1;", " } else {", " tests[\"VLAN Configured Correctly'\"] = 0;", " return 0;", " }", "};", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan/~partition-1~vlan-RD1", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"vlan-RD2\",\n \"tag\": \"200\",\n \"partition\": \"partition-2\",\n \"interfaces\": \n [ \n {\n \"name\":\"1.1\",\n \"tagged\":true\n }\n ]\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 12: cleanup-delete vlan-RD2 in partition 2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vlan = function(resp) {", " if(resp.name == \"Internal\" &&", " resp.tag == \"10\" &&", " resp.interfacesReference.items[0].name == \"1.1\") {", " tests[\"VLAN Internal Configured Correctly\"] = 1;", " return 1;", " }", " else if(resp.name == \"External\" &&", " resp.tag == \"20\" &&", " resp.interfacesReference.items[0].name == \"1.2\") {", " tests[\"VLAN External Configured Correctly\"] = 1;", " return 1;", " } else {", " tests[\"VLAN Configured Correctly'\"] = 0;", " return 0;", " }", "};", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": check_vlan", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/vlan/~partition-2~vlan-RD2", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"vlan-RD2\",\n \"tag\": \"200\",\n \"partition\": \"partition-2\",\n \"interfaces\": \n [ \n {\n \"name\":\"1.1\",\n \"tagged\":true\n }\n ]\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 13: cleanup - Update Partition 2 default RD to 0", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition/partition-1", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-1\",\n \"defaultRouteDomain\": 0\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 14: cleanup - Update Partition 2 default RD to 0", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition/partition-2", "method": "PUT", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-2\",\n \"defaultRouteDomain\": 0\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 15: delete RD1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/\\/Common\\/Internal|External/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route-domain/~partition-1~RD-1", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"RD-2\",\n \"partition\": \"Common\",\n \"id\": 2,\n \"strict\": \"enabled\",\n \"vlans\": [\n \"/Common/vlan-RD2\"\n ]\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 16: delete RD2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-Internal\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.10.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/\\/Common\\/Internal|External/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/route-domain/~partition-2~RD-2", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"RD-2\",\n \"partition\": \"Common\",\n \"id\": 2,\n \"strict\": \"enabled\",\n \"vlans\": [\n \"/Common/vlan-RD2\"\n ]\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 17: cleanup-delete Partition 1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition/partition-1", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-1\",\n \"defaultRouteDomain\": 0\n}\n" }, "description": "" }, "response": [] }, { "name": "Step 18: cleanup-delete Partition 2", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\", ", " \"value\": \"Self-External\"", " },", " { ", " \"path\":\"address\", ", " \"value\": \"10.1.20.10/24\"", " },", " { ", " \"path\":\"vlan\", ", " \"value\": \"/Common/External\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/partition/partition-2", "method": "DELETE", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}", "description": "" }, { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"partition-1\",\n \"defaultRouteDomain\": 0\n}\n" }, "description": "" }, "response": [] } ] }, { "name": "Lab 1.5 - Building Imperative Workflows", "item": [ { "name": " Step 1: Get BIG-IP Software Version", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "// This is a Postman post-request request test script.", "//", "// The Javascript code below is executed AFTER a response is ", "// received by the Postman client. This code can do all sorts", "// of interesting things.", "", "// Parse the JSON response body and save the result in the resp variable", "var resp = JSON.parse(responseBody);", "", "// Set an environemnt variable based on the value in the response JSON", "postman.setEnvironmentVariable(\"lab1.5_sw_version\", resp.version);", "", "// Populate a Postman test item", "tests[\"Populate SW Version\"] = 0;", "if(resp.version.length > 0) {", " tests[\"Populate SW Version\"] = 1;", "}", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/software/volume/HD1.1", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": "Step 2: Get BIG-IP CPU Count", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "// This is a Postman post-request request test script.", "//", "// The Javascript code below is executed AFTER a response is ", "// received by the Postman client. This code can do all sorts", "// of interesting things.", "", "// Parse the JSON response body and save the result in the resp variable", "var resp = JSON.parse(responseBody);", "", "// Set an environemnt variable based on the value in the response JSON", "postman.setEnvironmentVariable(\"lab1.5_cpu_count\", resp.items.length);", "", "// Populate a Postman test item", "tests[\"Populate CPU Count\"] = 0;", "if(resp.items.length > 0) {", " tests[\"Populate CPU Count\"] = 1;", "}" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cloud/sys/cpu-info-stat", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] }, { "name": "Step 3: Get BIG-IP Base MAC Address", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "// This is a Postman post-request request test script.", "//", "// The Javascript code below is executed AFTER a response is ", "// received by the Postman client. This code can do all sorts", "// of interesting things.", "", "// Parse the JSON response body and save the result in the resp variable", "var resp = JSON.parse(responseBody);", "", "// Set an environemnt variable based on the value in the response JSON", "postman.setEnvironmentVariable(\"lab1.5_base_mac\", resp.items[0].baseMac);", "", "// Populate a Postman test item", "tests[\"Populate Base MAC\"] = 0;", "if(resp.items[0].baseMac.length > 0) {", " tests[\"Populate Base MAC\"] = 1;", "}", "", "// Dump out our results", "tests[\"BIG-IP SW Version: \" + postman.getEnvironmentVariable(\"lab1.5_sw_version\")] = 1;", "tests[\"BIG-IP CPU Count: \" + postman.getEnvironmentVariable(\"lab1.5_cpu_count\")] = 1;", "tests[\"BIG-IP Base MAC: \" + postman.getEnvironmentVariable(\"lab1.5_base_mac\")] = 1;", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cloud/net/sys-device", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\n}" } }, "response": [] } ] }, { "name": "Lab 1.6 - Build a Cluster", "item": [ { "name": "[BIGIP A] Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_a_auth_token\", value:\"token.token\"}", " ];", " ", "f5_populate_env_vars(populate_vars);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authn/login", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\":\"admin\",\n \"password\":\"{{bigip_admin_password}}\",\n \"loginProviderName\":\"tmos\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Set Authentication Token Timeout", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"timeout\", ", " \"value\":\"36000\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authz/tokens/{{bigip_a_auth_token}}", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"timeout\":\"36000\"\n}" } }, "response": [] }, { "name": "[Global] Create Shared JSON Objects", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_check_response();", "", "// DNS", "postman.setEnvironmentVariable('_rt_dns_servers', JSON.stringify(environment.bigip_dns_servers.split(',')));", "postman.setEnvironmentVariable('_rt_dns_search', JSON.stringify(environment.bigip_dns_search.split(',')));", "", "// NTP", "postman.setEnvironmentVariable('_rt_ntp_servers', JSON.stringify(environment.bigip_ntp_servers.split(',')));", "", "//BIGIP A Network", "var net_internal = environment.bigip_net_internal.split(',');", "var net_external = environment.bigip_net_external.split(',');", "", "var ip_internal = environment.bigip_net_internal_ips.split(',');", "var ip_external = environment.bigip_net_external_ips.split(',');", "", "postman.setEnvironmentVariable('_rt_internal_int', net_internal[0]);", "postman.setEnvironmentVariable('_rt_internal_tagstate', net_internal[1]);", "postman.setEnvironmentVariable('_rt_internal_tag', net_internal[2]);", "", "postman.setEnvironmentVariable('_rt_external_int', net_external[0]);", "postman.setEnvironmentVariable('_rt_external_tagstate', net_external[1]);", "postman.setEnvironmentVariable('_rt_external_tag', net_external[2]);", "", "postman.setEnvironmentVariable('_rt_a_internal_ip', ip_internal[0]);", "postman.setEnvironmentVariable('_rt_a_internal_hostip', ip_internal[0].split('/')[0]);", "postman.setEnvironmentVariable('_rt_internal_floatip', ip_internal[2]);", "postman.setEnvironmentVariable('_rt_a_external_ip', ip_external[0]);", "", "", "postman.setEnvironmentVariable('_rt_b_internal_ip', ip_internal[1]);", "postman.setEnvironmentVariable('_rt_b_internal_hostip', ip_internal[1].split('/')[0]);", "postman.setEnvironmentVariable('_rt_b_external_ip', ip_external[1]);", "", "", "console.log(\"dns_servers=\" + environment._rt_dns_servers);", "console.log(\"dns_search=\" + environment._rt_dns_search);", "console.log(\"ntp_servers=\" + environment._rt_ntp_servers);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/echo", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP B] Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_b_auth_token\", value:\"token.token\"}", " ];", " ", "f5_populate_env_vars(populate_vars);", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/shared/authn/login", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\":\"admin\",\n \"password\":\"{{bigip_admin_password}}\",\n \"loginProviderName\":\"tmos\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Set Authentication Token Timeout", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"timeout\", ", " \"value\":\"36000\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/shared/authz/tokens/{{bigip_b_auth_token}}", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"timeout\":\"36000\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Check License State", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"licensedDateTime\",", " \"value\":\"/.*/i\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);", "", "var resp = f5_parse_json_resp();", "", "if(!(\"licensedDateTime\" in resp)) {", " postman.setNextRequest(\"[BIGIP A] License Device\");", "} else {", " postman.setNextRequest(\"[BIGIP B] Check License State\");", "}", "", "f5_disable_poller();", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/shared/licensing/registration", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP A] License Device", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"commandResult\",", " \"value\":\"/New license installed/i\",", " \"op\":\"regex\"", " },", " { ", " \"path\":\"commandResult\",", " \"value\":\"/successfully loaded/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "f5_poll_until_all_tests_pass(\"[BIGIP B] Check License State\");" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/util/bash", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"utilCmdArgs\":\"-c 'SOAPLicenseClient --basekey \\\"{{bigip_a_regkey}}\\\" --addkey \\\"{{bigip_a_addonkey}}\\\" --verbose'\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Check License State", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"licensedDateTime\",", " \"value\":\"/.*/i\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);", "", "var resp = f5_parse_json_resp();", "", "if(!(\"licensedDateTime\" in resp)) {", " postman.setNextRequest(\"[BIGIP B] License Device\");", "} else {", " postman.setNextRequest(\"[BIGIP A] Check Root User Enabled\");", "}", "", "f5_disable_poller();", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/shared/licensing/registration", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP B] License Device", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"commandResult\",", " \"value\":\"/New license installed/i\",", " \"op\":\"regex\"", " },", " { ", " \"path\":\"commandResult\",", " \"value\":\"/successfully loaded/i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "f5_poll_until_all_tests_pass(\"[BIGIP A] Check Root User Enabled\");", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/util/bash", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"utilCmdArgs\":\"-c 'SOAPLicenseClient --basekey \\\"{{bigip_b_regkey}}\\\" --addkey \\\"{{bigip_b_addonkey}}\\\" --verbose'\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Check Root User Enabled", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"systemauth.disablerootlogin\"", " }", " ];", "", "f5_check_response(check_vals);", "", "var resp = f5_parse_json_resp();", "", "if(resp.value == 'true') {", " postman.setNextRequest(\"[BIGIP A] Set admin User Password\");", "} else {", " postman.setNextRequest(\"[BIGIP A] Set root User Password\");", "}", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/db/systemauth.disablerootlogin", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP A] Set root User Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_check_response();", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/authn/root", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"oldPassword\":\"default\",\n \"newPassword\":\"{{bigip_root_password}}\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Set admin User Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"admin\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/auth/user/admin", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"password\":\"{{bigip_admin_password}}\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Set System Global-Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"hostname\",", " \"value\":environment.bigip_a_hostname", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/global-settings", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"guiSetup\": \"disabled\",\n \"hostname\": \"{{bigip_a_hostname}}\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Set System DNS Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"nameServers\",", " \"value\":JSON.parse(environment._rt_dns_servers).length,", " \"op\":\"length\",", " \"optional\":true ", " },", " { ", " \"path\":\"search\",", " \"value\":JSON.parse(environment._rt_dns_search).length,", " \"op\":\"length\"", " } ", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/dns", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"nameServers\": {{_rt_dns_servers}},\n \"search\": {{_rt_dns_search}}\n}" } }, "response": [] }, { "name": " [BIGIP A] Set System NTP Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"servers\",", " \"value\":JSON.parse(environment._rt_ntp_servers).length,", " \"op\":\"length\",", " \"optional\":true ", " },", " { ", " \"path\":\"timezone\",", " \"value\":environment.bigip_timezone", " } ", " ];", "", "f5_check_response(check_vals);" ] } }, { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/ntp", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"servers\": {{_rt_ntp_servers}},\n \"timezone\": \"{{bigip_timezone}}\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Check Root User Enabled", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"systemauth.disablerootlogin\"", " }", " ];", "", "f5_check_response(check_vals);", "", "var resp = f5_parse_json_resp();", "", "if(resp.value == 'true') {", " postman.setNextRequest(\"[BIGIP B] Set admin User Password\");", "} else {", " postman.setNextRequest(\"[BIGIP B] Set root User Password\");", "}", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/db/systemauth.disablerootlogin", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP B] Set root User Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_check_response();", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/shared/authn/root", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"oldPassword\":\"default\",\n \"newPassword\":\"{{bigip_root_password}}\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Set admin User Password", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"admin\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/auth/user/admin", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"password\":\"{{bigip_admin_password}}\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Set System Global-Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"hostname\",", " \"value\":environment.bigip_b_hostname", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/global-settings", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"guiSetup\": \"disabled\",\n \"hostname\": \"{{bigip_b_hostname}}\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Set System DNS Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"nameServers\",", " \"value\":JSON.parse(environment._rt_dns_servers).length,", " \"op\":\"length\",", " \"optional\":true ", " },", " { ", " \"path\":\"search\",", " \"value\":JSON.parse(environment._rt_dns_search).length,", " \"op\":\"length\"", " } ", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/dns", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"nameServers\": {{_rt_dns_servers}},\n \"search\": {{_rt_dns_search}}\n}" } }, "response": [] }, { "name": " [BIGIP B] Set System NTP Settings", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"servers\",", " \"value\":JSON.parse(environment._rt_ntp_servers).length,", " \"op\":\"length\",", " \"optional\":true ", " },", " { ", " \"path\":\"timezone\",", " \"value\":environment.bigip_timezone", " } ", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/ntp", "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"servers\": {{_rt_ntp_servers}},\n \"timezone\": \"{{bigip_timezone}}\"\n}" } }, "response": [] }, { "name": "[BIGIP B] Create Internal VLAN", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"Internal\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/net/vlan/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Internal\",\n \"partition\": \"Common\",\n \"autoLasthop\": \"default\",\n \"cmpHash\": \"default\",\n \"mtu\": \"1500\",\n \"tag\": \"{{_rt_internal_tag}}\",\n \"interfaces\": \n [ \n {\n \"name\":\"{{_rt_internal_int}}\",\n \"tagged\":{{_rt_internal_tagstate}}\n }\n ]\n}" } }, "response": [] }, { "name": "[BIGIP B] Create External VLAN", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"External\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/net/vlan/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"External\",\n \"partition\": \"Common\",\n \"autoLasthop\": \"default\",\n \"cmpHash\": \"default\",\n \"mtu\": \"1500\",\n \"tag\": \"{{_rt_external_tag}}\",\n \"interfaces\": \n [ \n {\n \"name\":\"{{_rt_external_int}}\",\n \"tagged\":{{_rt_external_tagstate}}\n }\n ]\n}" } }, "response": [] }, { "name": "[BIGIP B] Create Internal Self IP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"Self-Internal\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/net/self/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Self-Internal\",\n \"partition\": \"Common\",\n \"address\": \"{{_rt_b_internal_ip}}\",\n \"floating\": \"disabled\",\n \"trafficGroup\": \"/Common/traffic-group-local-only\",\n \"vlan\": \"/Common/Internal\",\n \"allowService\": [\n \"default\"\n ]\n}" } }, "response": [] }, { "name": "[BIGIP B] Create External Self IP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"Self-External\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/net/self/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Self-External\",\n \"partition\": \"Common\",\n \"address\": \"{{_rt_b_external_ip}}\",\n \"floating\": \"disabled\",\n \"trafficGroup\": \"/Common/traffic-group-local-only\",\n \"vlan\": \"/Common/External\",\n \"allowService\": [\n \"default\"\n ]\n}" } }, "response": [] }, { "name": "[BIGIP B] Create Default Route", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"Default\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/net/route", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Default\",\n \"partition\": \"Common\",\n \"gw\": \"{{bigip_net_defaultgw}}\",\n \"mtu\": 0,\n \"network\": \"0.0.0.0/0\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Set CMI Device Parameters", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":environment.bigip_a_hostname", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/device/~Common~{{bigip_a_hostname}}", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"configsyncIp\": \"{{_rt_a_internal_hostip}}\",\n \"mirrorIp\": \"{{_rt_a_internal_hostip}}\",\n \"mirrorSecondaryIp\": \"any6\",\n \"unicastAddress\": [\n {\n \"effectiveIp\": \"{{_rt_a_internal_hostip}}\",\n \"effectivePort\": 1026,\n \"ip\": \"{{_rt_a_internal_hostip}}\",\n \"port\": 1026\n }\n ]\n}" } }, "response": [] }, { "name": "[BIGIP B] Set CMI Device Parameters", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":environment.bigip_b_hostname", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/cm/device/~Common~{{bigip_b_hostname}}", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"configsyncIp\": \"{{_rt_b_internal_hostip}}\",\n \"mirrorIp\": \"{{_rt_b_internal_hostip}}\",\n \"mirrorSecondaryIp\": \"any6\",\n \"unicastAddress\": [\n {\n \"effectiveIp\": \"{{_rt_b_internal_hostip}}\",\n \"effectivePort\": 1026,\n \"ip\": \"{{_rt_b_internal_hostip}}\",\n \"port\": 1026\n }\n ]\n}" } }, "response": [] }, { "name": "[BIGIP A] Add BIGIP-B Device to CMI Trust", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"Root\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/add-to-trust", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"name\":\"Root\",\n \"caDevice\":true,\n \"device\":\"{{bigip_b_mgmt}}\",\n \"deviceName\":\"{{bigip_b_hostname}}\",\n \"username\":\"admin\",\n \"password\":\"{{bigip_admin_password}}\"\n}" } }, "response": [] }, { "name": "[BIGIP A] Initial Sync of device_trust_group", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"options.0.to-group\",", " \"value\":\"device_trust_group\"", " }", " ];", "", "f5_check_response(check_vals);", "", "f5_sleep(10000);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/config-sync", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"options\":[{\n \t\"to-group\":\"device_trust_group\",\n \t\"force-full-load-push\": true\n }]\n}" } }, "response": [] }, { "name": "[BIGIP A] Initial Sync of datasync-global-dg", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"options.0.to-group\",", " \"value\":\"datasync-global-dg\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/config-sync", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"options\":[{\n \t\"to-group\":\"datasync-global-dg\",\n \t\"force-full-load-push\": true\n }]\n}" } }, "response": [] }, { "name": "[BIGIP B] Initial Sync of datasync-global-dg", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"options.0.from-group\",", " \"value\":\"datasync-global-dg\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/cm/config-sync", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"options\":[{\n \t\"from-group\":\"datasync-global-dg\"\n }]\n}" } }, "response": [] }, { "name": "[BIGIP A] Verify Initial Sync Completed", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.color.description\",", " \"value\":\"green\"", " },", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.status.description\",", " \"value\":\"In Sync\"", " }", " ];", "", "f5_check_response(check_vals);", "f5_poll_until_all_tests_pass(\"[BIGIP A] Create Device Group\");" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/syncStatus", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP A] Create Device Group", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"DeviceGroup1\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/device-group", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"DeviceGroup1\",\n \"type\":\"sync-failover\",\n \"autoSync\":\"enabled\",\n \"devices\": [ \"{{bigip_a_hostname}}\",\"{{bigip_b_hostname}}\" ]\n}" } }, "response": [] }, { "name": "[BIGIP A] Initial Sync of DeviceGroup1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"options.0.to-group\",", " \"value\":\"DeviceGroup1\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/config-sync", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"options\":[{\"to-group\":\"DeviceGroup1\"}]\n}" } }, "response": [] }, { "name": "[BIGIP A] Check Sync Group Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.color.description\",", " \"value\":\"green\"", " },", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.mode.description\",", " \"value\":\"high-availability\"", " }, ", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.status.description\",", " \"value\":\"In Sync\"", " }", " ];", "", "f5_check_response(check_vals);", "f5_poll_until_all_tests_pass(\"[BIGIP A] Change Traffic Group to use HA Order Failover\");" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/syncStatus", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP A] Change Traffic Group to use HA Order Failover", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"traffic-group-1\"", " },", " {", " \"path\":\"haOrder\",", " \"value\":\"2\",", " \"op\":\"length\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/traffic-group/traffic-group-1", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"haOrder\": [\n \"/Common/{{bigip_a_hostname}}\",\n \"/Common/{{bigip_b_hostname}}\"\n ]\n}" } }, "response": [] }, { "name": "[BIGIP A] Get Traffic Group Failover States", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var cmiBaseUri = \"https://localhost/mgmt/tm/cm/traffic-group/traffic-group-1/~Common~traffic-group-1:~Common~\";", "var cmiAUri = cmiBaseUri + environment.bigip_a_hostname.replace(/\\./g,'\\\\.') + \"/stats\"", "var cmiBUri = cmiBaseUri + environment.bigip_b_hostname.replace(/\\./g,'\\\\.') + \"/stats\"", "", "var populate_vars = [", " { ", " \"name\":\"_rt_bigip_a_failoverstate\",", " \"value\":\"entries.\" + cmiAUri + \".nestedStats.entries.failoverState.description\"", " },", " { ", " \"name\":\"_rt_bigip_b_failoverstate\",", " \"value\":\"entries.\" + cmiBUri + \".nestedStats.entries.failoverState.description\"", " } ", " ];", " ", "var check_vals = [", " { ", " \"path\":\"entries.\" + cmiAUri + \".nestedStats.entries.trafficGroup.description\",", " \"value\":\"/Common/traffic-group-1\"", " },", " { ", " \"path\":\"entries.\" + cmiBUri + \".nestedStats.entries.trafficGroup.description\",", " \"value\":\"/Common/traffic-group-1\"", " } ", " ];", "", "f5_populate_env_vars(populate_vars);", "f5_check_response(check_vals);", "", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/traffic-group/traffic-group-1/stats", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP B] Failover Traffic Group to BIGIP A", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"trafficGroup\",", " \"value\":\"traffic-group-1\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/failover", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"trafficGroup\":\"traffic-group-1\",\n \"standby\":true\n}" } }, "response": [] }, { "name": "[BIGIP A] Verify Traffic Group Failover States", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var cmiBaseUri = \"https://localhost/mgmt/tm/cm/traffic-group/traffic-group-1/~Common~traffic-group-1:~Common~\";", "var cmiAUri = cmiBaseUri + environment.bigip_a_hostname.replace(/\\./g,'\\\\.') + \"/stats\"", "var cmiBUri = cmiBaseUri + environment.bigip_b_hostname.replace(/\\./g,'\\\\.') + \"/stats\"", "", "var check_vals = [", " { ", " \"path\":\"entries.\" + cmiAUri + \".nestedStats.entries.failoverState.description\",", " \"value\":\"active\"", " },", " { ", " \"path\":\"entries.\" + cmiBUri + \".nestedStats.entries.failoverState.description\",", " \"value\":\"standby\"", " } ", " ];", "", "f5_check_response(check_vals);", "f5_poll_until_all_tests_pass(\"[BIGIP A] Create Internal Floating Self IP\");", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/traffic-group/traffic-group-1/stats", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "[BIGIP A] Create Internal Floating Self IP", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"Self-Internal-Floating\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/net/self/", "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Self-Internal-Floating\",\n \"partition\": \"Common\",\n \"address\": \"{{_rt_internal_floatip}}\",\n \"floating\": \"enabled\",\n \"trafficGroup\": \"/Common/traffic-group-1\",\n \"vlan\": \"/Common/Internal\",\n \"allowService\": [\n \"default\"\n ]\n}" } }, "response": [] }, { "name": "[BIGIP A] Verify Sync Group Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_enable_poller();", "", "var check_vals = [", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.color.description\",", " \"value\":\"green\"", " },", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.mode.description\",", " \"value\":\"high-availability\"", " }, ", " { ", " \"path\":\"entries.https://localhost/mgmt/tm/cm/sync-status/0.nestedStats.entries.status.description\",", " \"value\":\"In Sync\"", " }", " ];", "", "f5_check_response(check_vals);", "f5_poll_until_all_tests_pass(\"Cleanup Environment\");" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/cm/syncStatus", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Cleanup Environment", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_check_response();", "postman.setNextRequest(null);" ] } }, { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_clear_runtime_vars(true);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/shared/echo", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "_F5_POLL_DELAY", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "f5_poll_next();", "" ] } } ], "request": { "url": "{{_f5_poll_apiurl}}/{{_f5_poll_wait}}", "method": "GET", "header": [], "body": { "mode": "raw", "raw": "" } }, "response": [] } ] }, { "name": "Lab 1.7 - Build a Basic LTM Config using Transactions", "item": [ { "name": "Step 1: Create a Transaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_transaction_id\", value:\"transId\"}", " ];", " ", "f5_populate_env_vars(populate_vars);", "" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n\t\n}" } }, "response": [] }, { "name": "Step 2: Add To Transaction: Create a HTTP Monitor", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"1\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/monitor/http", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_monitor\",\n \"send\":\"GET / HTTP/1.0\\r\\n\\r\\n\",\n \"recv\":\"\"\n}" } }, "response": [] }, { "name": "Step 3: Add to Transaction: Create a Pool", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"2\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/pool", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_pool\",\n \"monitor\":\"/Common/Lab1.7_monitor\",\n \"members\": [\"10.1.10.100:8000\",\"10.1.10.100:8001\"]\n}" } }, "response": [] }, { "name": "Step 4: Add to Transaction: Create a HTTP Profile", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"3\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/profile/http", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_http\",\n \"insertXforwardedFor\":\"enabled\",\n \"serverAgentName\":\"Lab_1.7\"\n}" } }, "response": [] }, { "name": "Step 5: Add to Transaction: Create a TCP Profile", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"4\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/profile/tcp", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_tcp_clientside\",\n \"nagle\":\"disabled\",\n \"sendBufferSize\":\"16000\"\n}" } }, "response": [] }, { "name": "Step 6: Add to Transaction: Create a Virtual Server", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"5\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/virtual", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_vs\",\n \"destination\":\"10.1.20.120:80\",\n \"ipProtocol\":\"tcp\",\n \"pool\":\"Lab1.7_pool\",\n \"sourceAddressTranslation\": { \"type\":\"automap\" },\n \"profiles\": [\n { \"name\":\"/Common/Lab1.7_tcp_clientside\", \"context\":\"clientside\" },\n { \"name\":\"/Common/tcp-wan-optimized\", \"context\":\"serverside\" },\n \"/Common/Lab1.7_http\"\n ]\n}" } }, "response": [] }, { "name": "Step 7: View the Transaction Queue", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items\",", " \"value\":\"5\",", " \"op\":\"length\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n}" } }, "response": [] }, { "name": "Step 8: View Queued Command 4 from Transaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"4\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands/4", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n}" } }, "response": [] }, { "name": "Step 9: Change Eval Order 4 -> 1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"1\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands/4", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\r \"evalOrder\": 1\r}" } }, "response": [] }, { "name": "Step 10: View the Transaction Queue Changes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items\",", " \"value\":\"5\",", " \"op\":\"length\"", " },", " {", " \"path\":\"items.0.uri\",", " \"value\":\"https://localhost/mgmt/tm/ltm/profile/tcp\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n}" } }, "response": [] }, { "name": "Step 11: Commit the Transaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\",", " \"value\":\"tm:transactionstate\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"state\":\"VALIDATING\"\n}" } }, "response": [] }, { "name": "Step 12: View the Transaction Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"state\",", " \"value\":\"COMPLETED\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n}" } }, "response": [] } ] }, { "name": "Lab 1.7A - Build AFM with CGNAT", "description": "", "item": [ { "name": "Step 1: Get AFM Security Reporting Settings", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/analytics/settings", "method": "GET", "header": [ { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"tcp-test\",\n \"collectCity\": \"enabled\",\n \"collectContinent\": \"enabled\",\n \"collectCountry\": \"enabled\",\n \"collectNexthop\": \"enabled\",\n \"collectPostCode\": \"enabled\",\n \"collectRegion\": \"enabled\",\n \"collectRemoteHostIp\": \"enabled\",\n \"collectRemoteHostSubnet\": \"enabled\",\n \"collectedByClientSide\": \"enabled\",\n \"collectedByServerSide\": \"enabled\",\n \"collectedStatsExternalLogging\": \"enabled\",\n \"collectedStatsInternalLogging\": \"enabled\",\n \"externalLoggingPublisher\": \"elk_pem_publisher\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 2: Update AFM Security Reporting Settings (Disable All)", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/analytics/settings", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"kind\": \"tm:security:analytics:settings:settingsstate\",\n \"selfLink\": \"https://localhost/mgmt/tm/security/analytics/settings?ver=12.1.3\",\n \"aclRules\": {\n \"collectClientIp\": \"disabled\",\n \"collectClientPort\": \"disabled\",\n \"collectDestIp\": \"disabled\",\n \"collectDestPort\": \"disabled\",\n \"collectServerSideStats\": \"disabled\"\n },\n \"collectedStatsExternalLogging\": \"disabled\",\n \"collectedStatsInternalLogging\": \"disabled\",\n \"dns\": {\n \"collectClientIp\": \"disabled\"\n },\n \"dosL2L4\": {\n \"collectClientIp\": \"disabled\"\n },\n \"l3L4Errors\": {\n \"collectClientIp\": \"disabled\",\n \"collectDestIp\": \"disabled\"\n },\n \"staleRules\": {\n \"collect\": \"disabled\"\n }\n}" }, "description": "" }, "response": [] }, { "name": "Step 3: Update AFM Security Reporting Settings (Enable All)", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/analytics/settings", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"kind\": \"tm:security:analytics:settings:settingsstate\",\n \"selfLink\": \"https://localhost/mgmt/tm/security/analytics/settings?ver=12.1.3\",\n \"aclRules\": {\n \"collectClientIp\": \"enabled\",\n \"collectClientPort\": \"enabled\",\n \"collectDestIp\": \"enabled\",\n \"collectDestPort\": \"enabled\",\n \"collectServerSideStats\": \"enabled\"\n },\n \"collectedStatsExternalLogging\": \"enabled\",\n \"collectedStatsInternalLogging\": \"enabled\",\n \"dns\": {\n \"collectClientIp\": \"enabled\"\n },\n \"dosL2L4\": {\n \"collectClientIp\": \"enabled\"\n },\n \"l3L4Errors\": {\n \"collectClientIp\": \"enabled\",\n \"collectDestIp\": \"enabled\"\n },\n \"staleRules\": {\n \"collect\": \"enabled\"\n }\n}" }, "description": "" }, "response": [] }, { "name": "Step 4: Request AFM Event Logger", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/log/profile/", "method": "GET", "header": [ { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"tcp-test\",\n \"collectCity\": \"enabled\",\n \"collectContinent\": \"enabled\",\n \"collectCountry\": \"enabled\",\n \"collectNexthop\": \"enabled\",\n \"collectPostCode\": \"enabled\",\n \"collectRegion\": \"enabled\",\n \"collectRemoteHostIp\": \"enabled\",\n \"collectRemoteHostSubnet\": \"enabled\",\n \"collectedByClientSide\": \"enabled\",\n \"collectedByServerSide\": \"enabled\",\n \"collectedStatsExternalLogging\": \"enabled\",\n \"collectedStatsInternalLogging\": \"enabled\",\n \"externalLoggingPublisher\": \"elk_pem_publisher\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 5: Create AFM Event Log Profile Base", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/log/profile/", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"kind\": \"tm:security:log:profile:profilestate\",\n \"name\": \"SP_AFM_Logger\",\n \"partition\": \"Common\",\n \"fullPath\": \"/Common/SP_AFM_Logger\",\n \"generation\": 199,\n \"selfLink\": \"https://localhost/mgmt/tm/security/log/profile/~Common~SP_AFM_Logger?ver=12.1.3\",\n \"dosNetworkPublisher\": \"/Common/local-db-publisher\",\n \"dosNetworkPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n },\n \"ipIntelligence\": {\n \"aggregateRate\": 4294967295,\n \"logPublisher\": \"/Common/local-db-publisher\",\n \"logPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n },\n \"logRtbh\": \"disabled\",\n \"logShun\": \"disabled\",\n \"logTranslationFields\": \"disabled\"\n },\n \"nat\": {\n \"endInboundSession\": \"disabled\",\n \"endOutboundSession\": {\n \"action\": \"disabled\"\n },\n \"errors\": \"disabled\",\n \"logPublisher\": \"/Common/local-db-publisher\",\n \"logPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n },\n \"lsnLegacyMode\": \"disabled\",\n \"quotaExceeded\": \"disabled\",\n \"startInboundSession\": \"disabled\",\n \"startOutboundSession\": {\n \"action\": \"disabled\"\n }\n },\n \"portMisuse\": {\n \"aggregateRate\": 4294967295,\n \"logPublisher\": \"/Common/local-db-publisher\",\n \"logPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n }\n },\n \"protocolDnsDosPublisher\": \"/Common/local-db-publisher\",\n \"protocolDnsDosPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n },\n \"protocolSipDosPublisher\": \"/Common/local-db-publisher\",\n \"protocolSipDosPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n },\n \"trafficStatistics\": {\n \"activeFlows\": \"disabled\",\n \"logPublisher\": \"/Common/local-db-publisher\",\n \"logPublisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n },\n \"missedFlows\": \"disabled\",\n \"reapedFlows\": \"disabled\",\n \"syncookies\": \"disabled\",\n \"syncookiesWhitelist\": \"disabled\"\n },\n \"networkReference\": {\n \"link\": \"https://localhost/mgmt/tm/security/log/profile/~Common~SP_AFM_Logger/network?ver=12.1.3\",\n \"isSubcollection\": true\n },\n \"protocolDnsReference\": {\n \"link\": \"https://localhost/mgmt/tm/security/log/profile/~Common~SP_AFM_Logger/protocol-dns?ver=12.1.3\",\n \"isSubcollection\": true\n },\n \"protocolSipReference\": {\n \"link\": \"https://localhost/mgmt/tm/security/log/profile/~Common~SP_AFM_Logger/protocol-sip?ver=12.1.3\",\n \"isSubcollection\": true\n },\n \"protocolTransfer\": [\n {\n \"name\": \"SP_AFM_Logger\",\n \"partition\": \"Common\",\n \"publisher\": \"/Common/local-db-publisher\",\n \"publisherReference\": {\n \"link\": \"https://localhost/mgmt/tm/sys/log-config/publisher/~Common~local-db-publisher?ver=12.1.3\"\n }\n }\n ]\n }" }, "description": "Update PEM Classification profile to inculde AVR and External Logging" }, "response": [] }, { "name": "Step 6: Query Source LSN Pools", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/nat/source-translation", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": "{" }, "description": "" }, "response": [] }, { "name": "Step 7: Create Source LSN Pool", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/nat/source-translation", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"kind\": \"tm:security:nat:source-translation:source-translationstate\",\n \"name\": \"Lab_1.7a_LSN\",\n \"partition\": \"Common\",\n \"fullPath\": \"/Common/Lab_1.7a_LSN\",\n \"generation\": 224,\n \"selfLink\": \"https://localhost/mgmt/tm/security/nat/source-translation/~Common~Lab_1.7a_LSN?ver=12.1.3\",\n \"clientConnectionLimit\": 0,\n \"egressInterfacesEnabled\": true,\n \"hairpinMode\": \"disabled\",\n \"icmpEcho\": \"disabled\",\n \"inboundMode\": \"none\",\n \"mapping\": {\n \"mode\": \"address-pooling-paired\",\n \"timeout\": 300\n },\n \"patMode\": \"napt\",\n \"portBlockAllocation\": {\n \"blockIdleTimeout\": 3600,\n \"blockLifetime\": 0,\n \"blockSize\": 64,\n \"clientBlockLimit\": 1,\n \"zombieTimeout\": 0\n },\n \"type\": \"dynamic-pat\",\n \"egressInterfaces\": [\n \"/Common/External\"\n ],\n \"egressInterfacesReference\": [\n {\n \"link\": \"https://localhost/mgmt/tm/net/vlan/~Common~External?ver=12.1.3\"\n }\n ],\n \"addresses\": [\n {\n \"name\": \"10.128.10.20/32\"\n }\n ],\n \"ports\": [\n {\n \"name\": \"1024-65365\"\n }\n ]\n }" }, "description": "" }, "response": [] }, { "name": "Step 8: Create Source NAT Policy", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/nat/policy", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"kind\": \"tm:security:nat:policy:policystate\",\n \"name\": \"Lab1.7a_LSN_Policy\",\n \"partition\": \"Common\",\n \"fullPath\": \"/Common/Lab1.7a_LSN_Policy\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 9: Create Source NAT Rule", "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/nat/policy/Lab1.7a_LSN_Policy/rules", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"kind\": \"tm:security:nat:policy:rules:rulesstate\",\n \"name\": \"source_LSN\",\n \"fullPath\": \"source_LSN\",\n \"placeAfter\": \"first\",\n \"ipProtocol\": \"any\",\n \"logProfile\": \"/Common/SP_AFM_Logger\",\n \"logProfileReference\": {\n \"link\": \"https://localhost/mgmt/tm/security/log/profile/SP_AFM_Logger?ver=12.1.3\"\n },\n \"status\": \"enabled\",\n \"translation\": {\n \"source\": \"/Common/Lab_1.7a_LSN\",\n \"sourceReference\": {\n \"link\": \"https://localhost/mgmt/tm/security/nat/source-translation/Lab_1.7a_LSN?ver=12.1.3\"\n }\n },\n \"destination\": {},\n \"source\": {\n \"addresses\": [\n {\n \"name\": \"10.128.50.0/24\"\n }\n ]\n }\n }" }, "description": "" }, "response": [] }, { "name": "Step 10: Create Simple AFM Policy for Forwarding Virtual Server", "request": { "auth": { "type": "basic", "basic": { "username": "admin", "password": "admin", "showPassword": false } }, "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/firewall/policy", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"kind\": \"tm:security:firewall:policy:policystate\",\n \"name\": \"Lab1.7a_afm_policy\"\n }" }, "description": "" }, "response": [] }, { "name": "Step 11: Add Rules to AFM Policy", "request": { "auth": { "type": "basic", "basic": { "username": "admin", "password": "admin", "showPassword": false } }, "url": "https://{{bigip_a_mgmt}}/mgmt/tm/security/firewall/policy/Lab1.7a_afm_policy/rules", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"kind\": \"tm:security:firewall:policy:rules:rulesstate\",\n \"name\": \"allow_all\",\n \"fullPath\": \"allow_all\",\n \"generation\": 264,\n \"action\": \"accept\",\n \"placeAfter\": \"first\",\n \"ipProtocol\": \"any\",\n \"iruleSampleRate\": 1,\n \"log\": \"no\",\n \"status\": \"enabled\",\n \"destination\": {},\n \"source\": {\n \"identity\": {}\n }\n }" }, "description": "" }, "response": [] }, { "name": "Step 12: Create a Virtual Server", "request": { "auth": { "type": "basic", "basic": { "username": "admin", "password": "admin", "showPassword": false } }, "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/virtual", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7a_vs_afm\",\n \"destination\":\"0.0.0.0:0\"\n}" }, "description": "" }, "response": [] }, { "name": "Step 13: Apply AFM Policy to Virtual Server", "request": { "auth": { "type": "basic", "basic": { "username": "admin", "password": "admin", "showPassword": false } }, "url": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/virtual/Lab1.7a_vs_afm", "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" } ], "body": { "mode": "raw", "raw": " {\n \"fwEnforcedPolicy\": \"/Common/Lab1.7a_afm_policy\",\n \"securityNatPolicy\": {\n \"policy\": \"/Common/Lab1.7a_LSN_Policy\",\n \"useDevicePolicy\": \"no\",\n \"useRouteDomainPolicy\": \"no\"\n }\n }" }, "description": "" }, "response": [] } ] }, { "name": "Lab 2.2 - Deploying iApp Templates on BIG-IP", "item": [ { "name": "Step 1: Get Installed iApp Templates", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\",", " \"value\":\"tm:sys:application:template:templatecollectionstate\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/application/template", "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Step 2: Install App Svcs v2.0.004 iApp Template", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"name\",", " \"value\":\"appsvcs_integration_v2.0.004\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "url": "https://{{bigip_a_mgmt}}/mgmt/tm/sys/application/template", "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\"name\": \"appsvcs_integration_v2.0.004\", \"actions\": [{\"name\": \"definition\", \"htmlHelp\": \"\", \"implementation\": \"# Copyright (c) 2017 F5 Networks, Inc.\\n#\\n# Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n# you may not use this file except in compliance with the License.\\n# You may obtain a copy of the License at\\n#\\n# http://www.apache.org/licenses/LICENSE-2.0\\n#\\n# Unless required by applicable law or agreed to in writing, software\\n# distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n# See the License for the specific language governing permissions and\\n# limitations under the License.\\n#\\npackage require base64\\n\\nset startTime [clock seconds]\\nset bundler_timestamp [clock format $startTime -format {%Y%m%d%H%M%S}]\\n\\nset NAME \\\"F5 Application Services Integration iApp (Community Edition)\\\"\\nset TMPLNAME \\\"appsvcs_integration_v2.0.\\\"\\nset IMPLMAJORVERSION \\\"2.0\\\"\\nset IMPLMINORVERSION \\\"004\\\"\\nset IMPLVERSION [format \\\"%s.%s\\\" $IMPLMAJORVERSION $IMPLMINORVERSION]\\nset POSTDEPLOY_DELAY 0\\n\\nif { [tmsh::get_field_value [lindex [tmsh::get_config sys scriptd log-level] 0] log-level] eq \\\"debug\\\" } {\\n set iapp__logLevel 10\\n}\\n\\n# Print a timestamped debug message to /var/tmp/scriptd.out\\n# Input: headers = TCL list of headers for the log message\\n# msg = The message to log\\n# level = Integer indicated the log level for this message\\nproc debug { headers msg level } {\\n if { $::iapp__logLevel >= $level } {\\n set systemTime [clock seconds]\\n set brackets \\\"\\\"\\n if { [llength $headers] > 0 } {\\n set brackets [format \\\"\\\\[%s\\\\]\\\" [join $headers \\\"\\\\]\\\\[\\\"]]\\n }\\n set pre [format \\\"\\\\[%s %s\\\\]\\\\[%s\\\\]%s\\\" [clock format $systemTime -format %D] [clock format $systemTime -format %H:%M:%S] $::app $brackets]\\n puts [format \\\"%s %s\\\" $pre [string map [list \\\"\\\\n\\\" \\\"\\\\n$pre \\\" ] $msg]]\\n }\\n}\\n\\n# Credit for psplit: http://wiki.tcl.tk/1499\\n# Perform the equivalent of a split on a string except protect an escaped split character in the input\\n# Input: str = the string to split\\n# seps = the charater(s) to split by\\n# Return: list $strings\\nproc psplit { str seps {protector \\\"\\\\\\\\\\\"}} {\\n set out [list]\\n set prev \\\"\\\"\\n set current \\\"\\\"\\n foreach c [split $str \\\"\\\"] {\\n if { [string first $c $seps] >= 0 } {\\n if { $prev eq $protector } {\\n set current [string range $current 0 end-1]\\n append current $c\\n } else {\\n lappend out $current\\n set current \\\"\\\"\\n }\\n set prev \\\"\\\"\\n } else {\\n append current $c\\n set prev $c\\n }\\n }\\n\\n if { $current ne \\\"\\\" } {\\n lappend out $current\\n }\\n\\n return $out\\n}\\n\\n# Figure out which type of environment we are executing in.\\n# Return: list $mode $folder $partition $routedomainid $newdeploy\\n# Modes: 1 = Standalone\\n# 2 = iWorkflow UNUSED/LEGACY\\n# 3 = Cisco APIC\\n# 4 = VMware NSX\\nproc get_mode { } {\\n set folder [tmsh::pwd]\\n set app $tmsh::app_name\\n set partition [lindex [split $folder /] 1]\\n set newdeploy [catch {tmsh::get_config sys application service /$partition/$app.app/$app}]\\n debug [list get_mode] [format \\\"starting folder=%s partition=%s newdeploy=%s\\\" $folder $partition $newdeploy] 10\\n\\n if { ! $newdeploy } {\\n set ::asoobj [lindex [lindex [tmsh::get_config sys application service /$partition/$app.app/$app] 0] 4]\\n }\\n # Set the routedomain to the partition default-route-domain\\n if { [string tolower $::iapp__routeDomain] eq \\\"auto\\\"} {\\n set obj [tmsh::get_config auth partition $partition default-route-domain]\\n set routedomainid [tmsh::get_field_value [lindex $obj 0] default-route-domain]\\n debug [list get_mode set_route_domain] [format \\\"Using partition default-route-domain; routedomainid=%s\\\" $routedomainid] 10\\n } else {\\n set routedomainid $::iapp__routeDomain\\n debug [list get_mode set_route_domain] [format \\\"Using route domain override; routedomainid=%s\\\" $routedomainid] 10\\n }\\n\\n # Check for a mode override in $iapp__mode variable\\n if { [string tolower $::iapp__mode] ne \\\"auto\\\" } {\\n if { $::iapp__mode > 0 && $::iapp__mode < 4 } {\\n debug [list get_mode mode_override] [format \\\"Mode override detected. Setting mode to %s\\\" $::iapp__mode] 10\\n return [list $::iapp__mode $folder $partition $routedomainid $newdeploy]\\n } else {\\n error \\\"The mode override specified is invalid.\\\"\\n }\\n }\\n\\n # Check for a partition that starts with apic_ and return APIC mode (3) and RD if found\\n if { [string match -nocase \\\"apic_*\\\" $partition] || [string match -nocase \\\"apic-*\\\" $partition] } {\\n debug [list get_mode apic] \\\"partition starts with apic_, assuming APIC deployment mode (3)\\\" 10\\n set rdobjs [tmsh::get_config net route-domain \\\"/$partition/$partition\\\" id]\\n set routedomainid [tmsh::get_field_value [lindex $rdobjs 0] \\\"id\\\"]\\n debug [list get_mode apic] [format \\\"rdobjs=%s routedomainid=%s\\\" $rdobjs $routedomainid] 10\\n return [list 3 $folder $partition $routedomainid $newdeploy]\\n }\\n\\n # Check for an $app name that is formatted like this:\\n # edge-<#>_<#>_virtualserver-<#>-serviceprofile-<#>\\n # and return NSX mode (4)\\n if { [regexp -nocase {^edge-[0-9]+_[0-9]+_virtualserver-[0-9]+-serviceprofile-[0-9]+$} $::app] } {\\n debug [list get_mode nsx] \\\"app name matches NSX regexp, assuming NSX deployment mode (4)\\\" 10\\n return [list 4 $folder $partition $routedomainid $newdeploy]\\n }\\n\\n # Default is Standalone mode\\n debug [list get_mode standalone] \\\"no integration vendor found, assuming Standalone deployment mode (1)\\\" 10\\n return [list 1 $folder $partition $routedomainid $newdeploy]\\n}\\n\\n# Create a specfic option command and return it\\n# Input: $debug_id, $input_var, $option_string\\n# Return: string $cmd\\nproc generic_add_option { debug_id input_var option_string custom_format replace_commas } {\\n set cmd \\\" \\\"\\n if { [string length $input_var] > 0 } {\\n if { $replace_commas == 1 } {\\n set input_var [string map {\\\",\\\" \\\" \\\"} $input_var]\\n }\\n\\n if { [string length $custom_format] > 0 } {\\n set cmd [format $custom_format $input_var]\\n } else {\\n set cmd [format \\\" $option_string \\\\\\\"%s\\\\\\\"\\\" $input_var]\\n }\\n debug [lappend debug_id generic_add_option] [format \\\"cmd=%s\\\" $cmd] 10\\n }\\n return $cmd\\n}\\n\\n# Check to see if an ip has a routedomain included.\\n# Return: 0=false; 1=true\\nproc has_routedomain { ip } {\\n return [string match *%* $ip]\\n}\\n\\n# Replace a profile within a virtual server definition while preserving the existing context\\n# Input: $obj = tmsh obj representing profiles section of the VS get_config\\n# $oldprofile = name of the profile to replace\\n# $newprofile = name of the new profile\\n# Return: string $newprofiles (string suitable for providing to replace-all-with option)\\nproc replace_profile { obj oldprofile newprofile } {\\n set profiles [tmsh::get_field_value [lindex $obj 0] \\\"profiles\\\"]\\n set newprofiles \\\" { \\\"\\n foreach profile $profiles {\\n set junk [lindex $profile 0]\\n set name [lindex $profile 1]\\n set contextobj [lindex $profile 2]\\n set context [lindex $contextobj 1]\\n if { $name eq $oldprofile } {\\n debug [list replace_profile] [format \\\"replace profile '%s' with '%s' context=%s\\\" $name $newprofile $context] 10\\n append newprofiles [format \\\"%s { context %s } \\\" $newprofile $context]\\n } else {\\n debug [list replace_profile] [format \\\"preserve profile '%s' context=%s\\\" $name $context] 10\\n append newprofiles [format \\\"%s { context %s } \\\" $name $context]\\n }\\n }\\n append newprofiles \\\" } \\\"\\n return $newprofiles\\n}\\n\\n# Look at a tmsh profile object and determine if $option is a valid profile option\\n# Input: $obj = tmsh obj to check\\n# $option = option name to look for\\n# Return: 1=Valid option; 0=Invalid option\\nproc is_valid_profile_option { obj option } {\\n debug [list is_valid_profile_option obj] [format \\\"%s\\\" $obj] 11\\n debug [list is_valid_profile_option option] [format \\\"looking for %s\\\" $option] 11\\n set found 0\\n set fdx 0\\n set fields [tmsh::get_field_names value $obj]\\n set fields2 [tmsh::get_field_names nested $obj]\\n debug [list is_valid_profile_option fields] [format \\\"%s\\\" $fields] 11\\n debug [list is_valid_profile_option fields2] [format \\\"%s\\\" $fields2] 11\\n set field_count [llength $fields]\\n while { $fdx < $field_count } {\\n set field [lindex $fields $fdx]\\n if { $field == $option } {\\n return 1\\n }\\n incr fdx\\n }\\n set field_count [llength $fields2]\\n set fdx 0\\n while { $fdx < $field_count } {\\n set field [lindex $fields2 $fdx]\\n if { $field == $option } {\\n return 1\\n }\\n incr fdx\\n }\\n return 0\\n}\\n\\n# Process a string in the format key1=val1[;keyX=valX] and return an array\\n# Input: $string = string to process\\n# Return: array { key1 {val1} ... keyX{valX}}\\nproc process_kvp_string { string } {\\n debug [list process_kvp_string] \\\"processing string: $string\\\" 10\\n set pairs [psplit $string \\\";\\\"]\\n array set ret {}\\n foreach pair $pairs {\\n set key [lindex [split $pair =] 0]\\n set val [lindex [split $pair =] 1]\\n set ret($key) $val\\n debug [list process_kvp_string] \\\"pair=$pair key=$key val=$val\\\" 10\\n }\\n return [array get ret]\\n}\\n\\n# Create an object name\\n# Input: $append = string to append\\n# Return: $string\\nproc create_obj_name { append } {\\n return [format \\\"%s/%s_%s\\\" $::app_path $::app $append]\\n}\\n\\n# Safely change a variable to a new value. Updates the var value and modifies the ASO with the new value\\n# Input: $name = name of variable\\n# $value = new value of the variable\\n# Return: none\\nproc change_var { name value } {\\n debug [list change_var] \\\"updating variable $name to $value (executes post-deployment)\\\" 10\\n set varcmd [create_escaped_tmsh [format \\\"tmsh::modify sys application service %s/%s variables modify \\\\{ %s \\\\{ value \\\\\\\"%s\\\\\\\" \\\\} \\\\}\\\" $::app_path $::app $name $value]]\\n debug [list change_var tmsh_modify_deferred] $varcmd 1\\n lappend ::postfinal_deferred_cmds $varcmd\\n set [subst ::$name] $value\\n set ::aso_config($name) $value\\n return\\n}\\n\\n# Check to see if an incoming variable is different than whats stored in the ASO.\\n# Input: $name = name of variable\\n# Return: 1=value is different; 0=value not different OR not a redeploy\\nproc is_new_value { name } {\\n if { $::newdeploy } {\\n return 0\\n }\\n set varvalue [get_var $name]\\n debug [list is_new_value] [format \\\"name=%s asovalue=%s varvalue=%s\\\" $name $varvalue [set [subst ::$name]]] 10\\n if { [set [subst ::$name]] == $varvalue } {\\n return 0\\n }\\n return 1\\n}\\n\\n# Get the variable value in the ASO.\\n# Input: $name = name of variable\\n# $orig = return the original value, not the runtime updated one\\n# Return: $string = value of variable\\nproc get_var { name { orig 0 }} {\\n if { $::newdeploy == 1} {\\n return \\\"\\\"\\n }\\n debug [list get_var] [format \\\"start name=%s\\\" $name] 10\\n\\n if { $orig == 0 && [info exists ::aso_config($name)] } {\\n set varvalue $::aso_config($name)\\n debug [list get_var] [format \\\"name=%s value=%s\\\" $name $varvalue] 10\\n return $varvalue\\n }\\n\\n if { $orig == 1 && [info exists ::aso_config_orig($name)] } {\\n set varvalue $::aso_config_orig($name)\\n debug [list get_var original] [format \\\"name=%s value=%s\\\" $name $varvalue] 10\\n return $varvalue\\n }\\n return \\\"\\\"\\n}\\n\\n# Safely handle the removal of a virtual server option on redeployment\\n# Input: $name = name of variable\\n# $checkvalue = the string that disables the option\\n# $option = TMSH name of the option\\n# $module = the BIG-IP module that enables the option\\n# Return: 1=Option removed; 0=no action taken\\nproc handle_opt_remove_on_redeploy { name checkvalue option module } {\\n if { ! $::redeploy || $::pool__addr eq \\\"255.255.255.254\\\" } {\\n debug [list handle_opt_remove_on_redeploy $name] \\\"not a redeployment, skipping\\\" 10\\n return 0\\n }\\n\\n if { ! [is_provisioned $module] } {\\n debug [list handle_opt_remove_on_redeploy $name] [format \\\"%s not provisioned, skipping\\\" $module] 10\\n return 0\\n }\\n\\n set vsname [get_var vs__Name 1]\\n set vsobj [lindex [tmsh::get_config ltm virtual $::app_path/$vsname all-properties] 0]\\n if { [is_valid_profile_option $vsobj $option] == 0 } {\\n debug [list handle_opt_remove_on_redeploy $name] [format \\\"%s not available, skipping\\\" $option] 10\\n return 0\\n }\\n\\n if { [set [subst ::$name]] == $checkvalue && \\\\\\n [is_new_value $name] && \\\\\\n $::redeploy } {\\n debug [list handle_opt_remove_on_redeploy] [format \\\"%s %s on redeploy, setting %s to none\\\" $name $checkvalue $option] 10\\n set cmd [format \\\"ltm virtual %s/%s %s none\\\" $::app_path $vsname $option]\\n debug [list handle_opt_remove_on_redeploy tmsh_modify] $cmd 1\\n tmsh::modify $cmd\\n return 1\\n }\\n return 0\\n}\\n\\n# Check provisioning cache for whether a specified module is provisioned and at what levels\\n# Adapted from original code including the F5 iApp TCL helper library\\n# Input: $module = name of the module\\n# Output: $level = integer representation of the provisioning level. See levels array below\\nproc is_provisioned { module } {\\n array set levels {\\n none 0\\n minimum 1\\n nominal 2\\n dedicated 3\\n }\\n\\n if { [info exists ::__provision_cache($module)] } {\\n debug [list is_provisioned cache_hit] \\\"$module $::__provision_cache($module)\\\" 10\\n return [expr { $levels($::__provision_cache($module)) >= 1 }]\\n } else {\\n debug [list is_provisioned cache_miss] \\\"$module\\\" 10\\n return -1\\n }\\n}\\n\\n# Load provisioning cache with module provisioning levels\\n# Adapted from original code including the F5 iApp TCL helper library\\nproc load_provisioned { } {\\n array set levels {\\n none 0\\n minimum 1\\n nominal 2\\n dedicated 3\\n }\\n set obj [tmsh::get_config sys provision]\\n foreach mod $obj {\\n set modname [lindex $mod 2]\\n set modlevel [lindex $mod 3]\\n if { [llength $modlevel] == 2 } {\\n set modlevel [lindex $modlevel 1]\\n } else {\\n set modlevel none\\n }\\n set ::__provision_cache($modname) $modlevel\\n debug [list load_provisioned cache_set] \\\"$modname $modlevel\\\" 10\\n }\\n}\\n\\n# Consume an APL table and return a list containing the values of the var specified in $key\\n# Input: $table = the raw APL table\\n# $key = the name of the variable to add to the return list\\n# Output: $retlist = A list of strings\\nproc single_column_table_to_list { table key } {\\n set retlist {}\\n foreach row $table {\\n array unset column\\n\\n # extract the iApp table data - borrowed from f5.lbaas.tmpl\\n foreach column_data [lrange [split [join $row] \\\"\\\\n\\\"] 1 end-1] {\\n set name [lindex $column_data 0]\\n set column($name) [lrange $column_data 1 end]\\n }\\n if { [info exists column($key)] && [string length $column($key)] > 0 } {\\n lappend retlist \\\"$column($key)\\\"\\n }\\n\\n }\\n return $retlist\\n}\\n\\n# Process a string in the format