Forum Discussion
smp_86112
Cirrostratus
Apr 28, 2010v9 matchclass and v10 class match iRule commands
I've got a v9 irule that takes action based on whether or not the client IP address is in a data class. The v9 iRule looks like this:
if { [matchclass [IP::remote_addr] equals $::allow...
hoolio
Cirrostratus
May 04, 2010This was the test class I was using on 10.1:
class my_test_class {
{
"item1"
"item10"
"item2"
"item4"
}
}
Using 'class get' seems to retrieve the "names" and null values for each class element. If I set a value for one of the class elements, the class looks like this:
class my_test_class {
{
"item1" { "item1_value" }
"item10"
"item2"
"item4"
}
}
And class get returns:
[class get my_test_class]: {item10 {}} {item2 {}} {item4 {}} {item1 item1_value}
So if you wanted to just get the value for item1 you could use something like this:
[lindex [class get my_test_class "item1"] 1]"
Aaron
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
