Forum Discussion
Ethan_Erchinger
Nimbostratus
Mar 10, 2006Passing arguments or iRule introspection
Hello again,
Is there a way to pass an argument to an iRule? Such as in a virtual call "rule my_irule 1". Then in my_irule reference argv[1] or such.
If not, how about being able to determine who called this iRule, like $::Parent or something would be the name of a virtual that called this iRule.
Any ideas?
I'd like to reuse an iRule with multiple virtuals, but use different snatpools based on who's calling the iRule. Maybe I should simply base it off of IP::server_addr, which should differ between two different virtuals.
Thanks,
Ethan
- we currently don't support the ability to call rules from other rules. You can use variables to allow to to move context from one rule to another though. In your case, if you want to know which virtual the rule is run under, you can use the "virtual name" command.
when HTTP_REQUEST { log local0. "Virtual name: [virtual name]" }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects