Forum Discussion
can an irule call another irule
If I may add, procs would definitely be the way to go here. I might have also said that a sideband call might work, but that too requires v11. There still may be a way though, depending on how the main rule interacts with the VIPs, and at what (if any) event level it needs to fire. So lets say for example you have a main rule that gets triggered at HTTP_REQUEST, and your two almost identical iRules, which probably also trigger code at HTTP_REQUEST. You could add the main rule to each VIP and use a few conditions inside that iRule to determine when and what to run. For example:
VIP iRule:
when HTTP_REQUEST {
...doing something important here
}
Main iRule:
when HTTP_REQUEST priority 501 {
switch [virtual] {
"app1-vs" {
do something for app1
}
"app2-vs" {
do something for app2
}
}
}
In this way, you have a single main iRule that 1) gets triggered after your VIP-specific iRule, and 2) evaluates code based on the caller VIP.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com