Forum Discussion

Mark_Ryan's avatar
Mark_Ryan
Icon for Nimbostratus rankNimbostratus
Aug 11, 2021

F5 AS3 picking up pre-existing elements

Hi,

 

I'm currently getting to grips with AS3. Adding an iRule is straight forward.

 

{

"class": "ADC",

"schemaVersion": "3.26.0",

"Test": {

"class": "Tenant",

"kafka": {

"class": "Application",

"kafka_vip": {

"class": "Service_HTTP",

"iRules": ["kafkaiRule"],

"virtualAddresses": [

"10.0.1.10"

],

"pool": "web_pool"

},

"web_pool": {

"class": "Pool",

"monitors": [

"http"

],

"members": [{

"servicePort": 80,

"serverAddresses": [

"192.0.1.10",

"192.0.1.11"

]

}]

},

"kafkaiRule": {

        "class": "iRule",

        "iRule": "when CLIENT_ACCEPTED { }"

      }

}

}

}

 

But if I then delete the VIP and leave the iRule and try to re-add the VIP using the same iRule I get the following.

 

{

 "code": 422,

 "errors": [

  "/Test/kafka/kafka_vip/iRules/0: contains path to non-existent object kafkaiRule"

 ],

 "declarationFullId": "",

 "message": "declaration is invalid"

}

 

Here is the same declaration minus the iRule.

 

{

"class": "ADC",

"schemaVersion": "3.26.0",

"Test": {

"class": "Tenant",

"kafka": {

"class": "Application",

"kafka_vip": {

"class": "Service_HTTP",

"iRules": ["kafkaiRule"],

"virtualAddresses": [

"10.0.1.10"

],

"pool": "web_pool"

},

"web_pool": {

"class": "Pool",

"monitors": [

"http"

],

"members": [{

"servicePort": 80,

"serverAddresses": [

"192.0.1.10",

"192.0.1.11"

]

}]

}

}

}

}

 

Is this expected behaviour? How do I pick up pre-existing iRules, monitors, etc in the same path but not common?