Are there a way to select a pool member in stead of a pool in a irules?
I have the following irules which is working as I expected. But i don’t want to use pool but pool members. if { [IP::addr [IP::remote_addr] equals 192.168.100.1/32] } { set selected_pool [lsearch -inline [pools -list green] *_datacenter1] } else { set selected_pool [lsearch -inline [pools -list green] *_datacenter2] }
I wish to have something like this. but I haven’t figured it out to make it work in the irule editors
if { [IP::addr [IP::remote_addr] equals 192.168.100.1/32] } {
set selected_poolmember [lsearch -inline [poolmembers -list green] *_datacenter1]
} else {
set selected_poolmember [lsearch -inline [poolmembers -list green] *_datacenter2]
}