JimT
Jun 24, 2016Nimbostratus
Enable ASM policy based on pool selection in iRule
Hi,
Hope someone can point me in the right direction:
We have a virtual server with a default ASM policy assigned to it. When clients connect we want to set the ASM policy based on which pool you are assigned to using a datagroup. In the logs we see that the iRule is fired and the correct ASM policy is set, but then being "ovrewritten" by the default ASM policy.
when HTTP_REQUEST {
Skip the leading partition name from the pool name:
set pool [getfield [LB::server pool] "/" 3]
set asm_policy [class lookup ${pool} map_pool_to_asm_policy]
if { $asm_policy ne "" } {
ASM::enable "/Common/$asm_policy
}
}
Thanks