Forum Discussion
Narendra_26827
Jul 07, 2011Nimbostratus
iRule to read key/value pair from Data Group lists
We
have a requirement with our product that load balancer should be able to send
requests to a particular pool ip based on a configuration file that we should
have in the load balancer. Example: ...
Narendra_26827
Jul 07, 2011Nimbostratus
Thanks Colin.
Can you suggest me how do i read the "sample1" key only from the data group lists not its value (192.168.1.10:80) in the iRule.
What i am trying to do is i am creating a class called sample_list
class sample_list {
{
"sample1" {"192.168.1.10 80"}
"sample2" {"192.168.1.11 80"}
}
}
Now from iRule i want to read only key first ("sample") from class sample_list so after reading "sample1" i will get the appropriate value "192.168.1.10 80"
what i am trying
set key $::sample_list
set value [class match -value $key contains sample_list]
If i get the key with associated value after reading class i can redirect them to appropriate pool member (via value)
Thanks.
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