cancel
Showing results for 
Search instead for 
Did you mean: 

F5 AS3 picking up pre-existing elements

Mark_Ryan
Nimbostratus
Nimbostratus

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?

1 REPLY 1

Hi ,

 

did you see this thread on github? https://github.com/F5Networks/f5-appsvcs-extension/issues/135

It is a bit old, but I think it describes your issue. Did you try to reference the existing iRule using the Service_HTTP class? Does that work?

 

KR

Daniel