convert irule from if...else to switch

Problem this snippet solves:

we tested that using "switch" statements the irule takes less time to perform. So i tried to create a script in python in order to do the conversion from if...else to switch automatically. Of course i am still improving it adding everytime new statements.

How to use this snippet:

go to: https://repl.it/@pirusti/IruleConverterToSwitch in main.py there is the code put your original(if...else)irule to "input.txt" and in "output.txt" file after running the script you'll find the new irule with "switch" statement.

Code :

https://repl.it/@pirusti/IruleConverterToSwitch
Published Jan 08, 2019
Version 1.0

Was this article helpful?

No CommentsBe the first to comment