Technical Forum
Ask questions. Discover Answers.
Showing results for 
Search instead for 
Did you mean: 

How to POST multiple declaration with AS3 without overwrite the existent ?



I need to know how to configure multiple VIP without overwrite the existent.

For now I have this declaration:

    "class": "AS3",
    "action": "deploy",
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.0.0",
        "id": "example-declaration-01",
        "label": "Sample 1",
        "remark": "Simple HTTP application with round robin pool",
        "{{ Layer }}": {
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "{{ nomeServizio }}": {
                "class": "Application",
                "template": "generic",
            "{{ nomeServizio }}": {
              "class": "Service_HTTP",
              "iRules": [{"bigip": "/Common/dynamic_irule"}],
              "virtualPort": {{ virtualPort| int  }},
              "virtualAddresses": ["{{ IPvirtualServer }}"],
              "persistenceMethods": ["{{ metodoPersistenza }}"],
              "pool": "{{ item.nomePool }}"
            "{{ item.nomePool }}": {
              "class": "Pool",
              "monitors": {{ item.monitor }},
              "members": [{
                  "servicePort": {{ item.membersPort|int }},
                  "serverAddresses": {{ item.IPmembers|list }}

Now I POST this declaration using extra vars like "metodoPersistenza" etc in order to configure a VIP with external parameters, but if I try to POST this declaration again (with others extra vars) AS3 overwrites the previous VIP...

How can I do to configure multiple VIP in multiple declarations without overwriting the existent configurations?

Thanks in advance


F5 Employee
F5 Employee

When you use AS3, you are declaring what final state you want the BIG-IP to be in when the declaration is applied. Don't think of using AS3 to add vips like you would run it 4 times to add 4 vips. You would want to define all the vips in the same declaration and post it at once. All the vips you want to add would be under the tenant: "{{Layer}} in your case.

In your case, add another {{nomeServizio}} to the same declaration.


See here, an example that has 2 virtual servers configured in the same declaration, all under one tenant