Forum Discussion
boneyard
MVP
Mar 17, 2014irule development - fixed variables within iRule context
looking for some input how others are handling such a situation.
with irule development you are often working with at least two irules in a certain environment (single bigip). of course multiple...
cdougall_14195
Cirrus
Mar 18, 2014So here's the way that we use a shared iRule for whole subset of VIPs. This uses the Virtual name that the client connected to in order to identify a specific Data group with a matching (almost matching, a few mods) name.
set vsname [string trimright [join [lreplace [split [getfield [split [virtual name]] / [llength [split [virtual name] /] ] ] -] end end ""] -] -]
set dgnameTmp "[string trimright [string range [virtual name] 0 [string last - [virtual name]]] "-"]"
set dgname [append dgnameTmp "-DG"]
if {$static::log_debug}{
log local0. "Data Group Tmp Name is: $dgnameTmp"
log local0. "Data Group Name is: $dgname"
}
Long and short, if you Virtual was named "this-is-a-foo-house-80" your datagroup name would be "this-is-a-foo-house-DG". That way you can set any variables you want for that specific instance right there.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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