Using Data Group List in iRule in a Partition
Another note: we had to remove the "$::" form the data groups.
Is there a syntax for referencing UAT Data Groups in iRules?
V10.2 LTM
This fails to use the UAT- Data Groups that are in the UAT partition:
iRule in UAT partition.
======================================================
Apply SNAT as specified in snatPoolVip for all
packets originated from dataGroupSnatSipHa members.
Exclude packets addressed to members of
dataGroupSnatExcluded.
======================================================
when CLIENT_ACCEPTED {
if { [matchclass [IP::remote_addr] equals $::/UAT/UAT-dataGroupSnatSipHa] }
{
if { [matchclass [IP::local_addr] equals $::/UAT/UAT-dataGroupSnatExcluded] }
{
}
else
{
snatpool UAT-snatPoolSipVip
}
}
}
This works with the XXX- data groups in the Common Partition.
iRule in UAT partition.
======================================================
Apply SNAT as specified in snatPoolVip for all
packets originated from dataGroupSnatSipHa members.
Exclude packets addressed to members of
dataGroupSnatExcluded.
======================================================
when CLIENT_ACCEPTED {
if { [matchclass [IP::remote_addr] equals XXX-dataGroupSnatSipHa] }
{
if { [matchclass [IP::local_addr] equals XXX-dataGroupSnatExcluded] }
{
}
else
{
snatpool UAT-snatPoolSipVip
}
}
}