How to inherit a generic irules?
I need to create hundreds of irule on GTM box like below. (one rule for each webserver). the only difference will be name of the webservers.
when DNS_REQUEST {
if {[DNS::rrtype] eq "A" and [active_members webserver1-pool] > 0} {
webserver1-pool
pool
} elseif {[DNS::rrtype] eq "AAAA" and [active_members webserver1-pool-v6]> 0} {
webserver1-pool-v6
pool
}
}
if
{[DNS::rrtype] eq "A" and [active_members $pool4] > 0} {
pool $pool4
}
elseif {[DNS::rrtype] eq "AAAA" and [active_members $pool6] > 0} {
pool $pool6
}
}
How can I write the rule to inherit this
generic-v6-irules so I can get the equivalent like the first irule? any suggestions? Thanks in advance!