single vs multi element classes in irules
Howdy,
I wrote a bit of code on 10.2.0 which looped through a class and used scan to extract three variables:
foreach limit_element [class get ${static::limit_prefix}_dgl] {
scan $limit_element {%[^ ] %d/%d} limit_uri conn_limit conn_timeout
[...]
}
etc. With a class with ONE element, this chokes, as the $limit_element value is only the value itself, e.g. "200/1", not the attribute name as well. With MORE elements in the list, it works great, and $limit_element is "/login 200/1" . Similarly this looks to be reflected in bigip.conf contents, as extra brackets exist etc.:
class http_request_limit_dgl {
{
"/login" { "200/1" }
"/sample_uri" { "5/10" }
}
}
class t1_http_request_limit_dglxx {
"/login" { "200/1" }
}
Can anyone comment on this?