Forum Discussion
darragh_19954
Nimbostratus
Nov 08, 2007How do I access BIG-IP "Data Group List" class as a list in an iRule?
We are defining a class using the "Data Group List" in the BIG-IP GUI.
From within an iRule, one typically matches against an element of this list with some code like:
if { [match...
Nov 08, 2007
You can use any of the TCL list commands (llength, lindex, etc) with a data group. For looping through a class called ClassList, you could do the following:
set count [llength $::ClassList]
for {set i 0} {$i < $count} {incr i} {
set val [lindex $::ClassList $i]
log local0. "ClassList($i) : $val"
}Or you could do it with a foreach loop like this:
foreach val $::ClassList {
log local0. "ClassList Item : $val"
}Hope this helps...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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