Forum Discussion
Using dict in iRules?
Wow, thanks for the detailed explanation ! 🙂
Currently, my data groups are not per customer, but rather per "item". So I have for example a data group that lists the allowed hostnames, i.e.:
customer1 : {"www.foo.com" "www.bar.com"}
customer1 : {"www.bar.com" "www.baz.com"}
etc.
a similar data group for accounts, etc. So basically for every connection I need to lookup multiple data groups to get the data I need. Like I mentioned in the original post, I found it possible to create a single data group based on a list of lists, per customer, such as:
customer1: { {"www.foo.com" "www.bar.com"} { "account1" "account2" } {".jpg" ".gif"} }
And then I access the different elements in that list by index, i.e. set accountslist [lindex $biglist $1], and then I use lsearch (without split) to check if a given account is in that list.
I will definitely look into your suggestion of using class match, thanks!
p.s. still, a shame that dict is not supported. Would have made it much easier for me...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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