on 08-Jan-2019 02:33
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