Forum Discussion
Bas_van_Velzen_
Nimbostratus
Mar 09, 2016A 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 sho...
Kai_Wilke
MVP
Mar 09, 2016Hi Bas,
to recycle the return value of
[if] in such a way, it would be required to [set] the value within the {script} section...
set PORT [if {${APP} equals class-test} then { set x 81} else {set x 83}]
... but this doesn't make any sense at all. It would be better to use just...
if {${APP} equals class-test} then {
set PORT 81
} else {
set PORT 83
}
Note: I didn't get the point of "data-class"? Do you want to use LTM datagroups to resolve the APP to PORT information?
Cheers, Kai
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects