Forum Discussion
Sarvjit_81591
Nimbostratus
Jul 14, 2008Programmatically select iRule
Is there any way to Programmatically select an existing iRule.
Assuming we have one iRule attached to a virtual server, I would like to (based on URI/host/whatever) select an existing iRule that is not attached to this particular virtual server.
Any help is appreciated.
Thanks
Sarvjit
3 Replies
- Colin_Walker_12Historic F5 AccountRight now there isn't a way to next iRules like this. The closest you could probably come right now is to set up a second virtual with the iRule enabled that you want to programmatically select, then select that virtual as a target in the case you want that iRule enabled.
That is a pretty kludgey kludge, though, and would result in a bunch of nearly identical Virtuals, assuming you want to programmatically select more than one iRule.
Colin - Sarvjit_81591
Nimbostratus
Thanks for the quick reply.
How do you select the virtual server as the target? We are using 9.3.x, I know in 9.4 we have the option to use "virtual vsname".
I assume we have to upgrade to 9.4....
Thanks
Sarvjit - hoolio
Cirrostratus
There isn't a way in 9.3. You can only use the virtual command in 9.4 or higher.
Rather than dynamically adding an iRule based on some tests, it would probably be cleaner to add the rule to the VIP and enable specific functionality based on the host, URI or other properties of the request.
Aaron
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
