Forum Discussion

Jon_Strabala_46's avatar
Jon_Strabala_46
Icon for Nimbostratus rankNimbostratus
Jul 02, 2011

F5 iRULEs lack user defined functions (e.g. TCL proc) how about a macro or pre-processing capability

Hi,

 

 

F5 iRULEs lack user defined functions or procedures (TCL proc)

 

 

 

As my IRULEs get more and more complex I find myself getting more and more frustrated that I can not write a TCL proc for recurring functions (code reuses). I know there must be deep technological reasons that I can not write a subroutine today- I sure want too (and I don't care if I run single threaded).

 

 

 

How about a macro or pre-processing capability (in the F5 iRULE editor ) and the F5 BIG-IP LTM system this really shouldn't be hard as several macro solutions for TCL already exist like a 'C' pre-processor.

 

 

 

Even having MACROs (without procedures) that merely allow me to inline a standard function over and over again would be a god send in iRULEs development.

 

 

 

Thanks

 

10 Replies

  • Hi Jon,

     

     

    I think there are whispers about proc support in some future version :). I'll let Joe comment on adding support for macros to the iRule editor.

     

     

    Aaron
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Procs are definitely something the core PD team is looking at intently for future versions, but we don't have any details as to when or if that will make the cut just yet. As far as the editor feature, I'm sold. Let the harassment commence until Joe adds it. ;)

     

     

    Colin
  • We need to start a whiskey fund to get procs done sooner :D

     

     

    Aaron
  • Greetings,

     

     

    Yeah, this really sucks not having procedures. It's very odd why they aren't there. Most other TCL stuff is here, so I can't see why this would be a drama.

     

     

    Regarding iRule Editor preprocessor type macros that would be cool, but much more important is fixing up:

     

    - correctly parsing responses back from the f5 when saving (rather than having to run 'tail -n 30 -f /var/log/ltm' all the time)

     

    - making it save when I click save, rather than having to click it twice (very weird why this happens, not sure if this is because I'm behind a proxy server or whatever, but it works very reliably as long as i click save twice)

     

    - getting it to find my missing braces. i find myself copying the code into another editor like Notepad++ just to find the braces '{' '}'

     

     

    Kind regards,

     

    Dave Seddon
  • Yeah, this really sucks not having procedures.

     

    Everyone definitely wants proc support. It's at least being considered.

     

     

    correctly parsing responses back from the f5 when saving (rather than having to run 'tail -n 30 -f /var/log/ltm' all the time)

     

    Can you clarify what you mean here? Are you using the iRule editor or the GUI?

     

     

    The iRule editor gives status when there is a load error. Generally the GUI provides similar feedback.

     

     

    If iControl, I think it could be useful to be able to open a new iRule Editor window which tails the ltm log for you. However, it would still be more functional to use 'less' from the CLI to search though the log file.

     

     

    making it save when I click save, rather than having to click it twice (very weird why this happens, not sure if this is because I'm behind a proxy server or whatever, but it works very reliably as long as i click save twice)

     

     

    Again, is this an issue you see with the GUI or iRule Editor? I've never not had an iRule save when clicking save via either method.

     

     

    getting it to find my missing braces

     

     

    I agree. This would make a great iRule Editor feature. I generally use a text editor which supports finding matching braces and then use the iRule editor to save the iRule and check for any errors. I also use regex find/replace functionality in a text editor. Both would be great additions for the iRule Editor.

     

     

    Aaron
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Agreed, those are all great points. Some of them are things we're already poking at, some are good additions to the list. Thanks for the input!

     

     

    Colin