Forum Discussion
nitass
Mar 20, 2013Employee
can we just use static global variable something like this?
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when RULE_INIT {
set static::pool PoolA
}
when HTTP_REQUEST {
pool foo$static::pool
}
when HTTP_RESPONSE {
log local0. "client [IP::client_addr]:[TCP::client_port] server [IP::server_addr]:[TCP::server_port] pool [LB::server pool]"
}
}
[root@ve10:Active] config b pool fooPoolA list
pool fooPoolA {
members 200.200.200.101:80 {}
}
[root@ve10:Active] config b pool fooPoolB list
pool fooPoolB {
members 200.200.200.111:80 {}
}
[root@ve10:Active] config tail -f /var/log/ltm
Mar 21 00:29:25 local/tmm info tmm[4950]: Rule myrule : client 172.28.19.251:46491 server 200.200.200.101:80 pool fooPoolA