Forum Discussion

JoshBarrow's avatar
Sep 21, 2021

AS3 Patch Declaration Not Deploying

I've been battling with this thing for a couple weeks and cannot figure it out. Here is my declaration for the PATCH Method allowing us to create one-off VIrtual Servers inside of our F5.

 

{
    "class": "AS3",
    "action": "patch",
    "patchBody": [
      {
        "op": "add",
        "path": "{{path}}",
        "value": {
          "class": "Application",
            "{{application_name}}": {
            "class": "Service_HTTPS",
            "virtualAddresses": {{virtual_address::array}},
            "pool": "{{pool_name}}",
            "serverTLS": "{{client_profile_name}}",
            "profileHTTP": "basic",
            "layer4": "tcp",
            "profileTCP": "normal",
            "enable": true,
            "snat": "auto"
          },
          "{{pool_name}}": {
            "class": "Pool",
            "monitors": [
                "tcp"
            ],
            "members": [{
              "servicePort": {{pool_port::integer}},
              "serverAddresses": {{server_addresses::array}},
              "loadBalancingMode": "round-robin"
            }]
          },
          "{{client_profile_name}}": {
            "class": "TLS_Server",
            "certificates": [{
              "certificate": "{{webcert}}"
            }]
          },
          "{{webcert}}": {
            "class": "Certificate",
            "remark": "in practice we recommend using a passphrase",
            "certificate": "{{cert_metadata}}",
            "privateKey": "{{key_metadata}}",
            }
        }
    }
        ]
}

 

 

 

Unfortunately we are running into this error here and i'm not understanding why. Any help is appreciated. Thank you.

 

 

ERROR: Failed to render template. Details:

Failed to get data from /mgmt/shared/fast/render?userAgent=FASTGUI/NA: 400 Bad Request

{"code":400,"message":"request failed with null exception","originalRequestBody":"{\"code\":400,\"message\":\"Error: failed to render template: patch2/patch2\\nSyntaxError: Unexpected token , in JSON at position 811\\n at JSON.parse (<anonymous>)\\n at /var/config/rest/iapps/f5-appsvcs-templates/nodejs/fastWorker.js:1601:23\\n at /var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/modules/es.promise.js:118:22\\n at flush (/var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/internals/microtask.js:27:9)\\n at tryCatcher (/usr/share/rest/node/node_modules/bluebird/js/release/util.js:16:23)\\n at Promise._settlePromiseFromHandler (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:512:31)\\n at Promise._settlePromise (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:569:18)\\n at Promise._settlePromiseCtx (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:606:10)\\n at Async._drainQueue (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:138:12)\\n at Async._drainQueues (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:143:10)\\n at Immediate.Async.drainQueues (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:17:14)\\n at runCallback (timers.js:794:20)\\n at tryOnImmediate (timers.js:752:5)\\n at processImmediate [as _immediateCallback] (timers.js:729:5)\\n at /var/config/rest/iapps/f5-appsvcs-templates/nodejs/fastWorker.js:1628:35\\n at /var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/modules/es.promise.js:118:22\\n at flush (/var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/internals/microtask.js:27:9)\\n at tryCatcher (/usr/share/rest/node/node_modules/bluebird/js/release/util.js:16:23)\\n at Promise._settlePromiseFromHandler (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:512:31)\\n at Promise._settlePromise (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:569:18)\\n at P

 

 

No RepliesBe the first to reply