Forum Discussion
gurrish_132043
Nimbostratus
Sep 23, 2013Import iRule from iRule
Hi!
I wonder if anyone knows if it's possible to import an iRule depending on incoming parameters?
My case is that I don't want to have to complicated iRules with lots of "ifs" in them.
I want ...
What_Lies_Bene1
Cirrostratus
Sep 23, 2013You could certainly compress all the if statements into a single switch statement quite easily which would simplify things somewhat. Let me know if you need some example code.
You can't call one iRule from another unfortunately but if you have large blocks of code that are similar perhaps stored procedures might help (v11.4 onwards): https://devcentral.f5.com/articles/getting-started-with-irules-procedures. If it's not attractive, being smart in general around naming conventions and common code etc. can often be just as good.
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