Forum Discussion
Juha__Ranta_106
Nimbostratus
Jun 28, 2005How to iterate over DataGroup List elements ?
Hi,
How can I iterate / access elements of a datagroup ?
I have following 'string data group list' called 'my_str_class':
--- /config/bigip.conf ---
...
unRuleY_95363
Jun 29, 2005Historic F5 Account
Could you implement a version of matchclass that would return the matching value in 'class' instead returning numeric value (0, 1, ..)?
Matchclass actually already does this. It returns 0 if no match was found, otherwise it returns the index (base 1) of the element that matched. However, as you have already realized, there really isn't an effecient means to get that value without converting the class into a Tcl list (which is currently broken and has the side effect of destroying the efficiency of the class match).
At this point, I have created a new CR 50048 to add a new Tcl command for accessing an indexed element of a class while preserving its internal representation. This should help provide the missing piece you need. Additionally, we have CR34234 which would allow iRules to modify the contents of a class (eg, add new elements, delete elements, etc). However, I can't make any guarantees as to when these CR's will be implemented (though CR50048 is rather trivial and would likely make the next release).
Thanks for your suggestions, it really helps to improve the usability of our iRules.
As for your comment: PS: Please put more effort on writing a complete iRule documentation.
We are painfully aware of this point. However, I am only a developer with a very little time to spare. I will certainly pass your feedback on to the appropriate people. I'm sure they have already gotten the point though. We did create this forum in hopes that it would help mitigate this problem.
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