A if statement in a Set statement?
Hello,
Im new to this, what I'm trying to do is:
I have got an vip that load balances traffic from several applications which create's a massive irule, im trying to make the irule a bit shorter by using variables. only certain pools are configured on different ports which can be identified with certain applications names.
so for example "abc" uses port 81 and "def" uses port 83.
I figured out the first part to check which Application it is about. set APP [lindex [split [HTTP::uri] "/"] 1]
Now I want to set the port to the correct one, and my thought was using a data-class the statement below does not work because frankly i'm not very good at these. set PORT [ if {${APP} equals class-test} {81} else {83} ]
can anybody help me find the correct syntax for this?