Forum Discussion
Append to list stored in table key
Kay,
I am stuck with static array usage:
{ $temp(session_id_counter) < $static::conf(session_id_limit) }
I tried to define this array in RULE_INIT using:
set static::conf(session_id_limit) 5
but when saving I am getting such error:
Dec 16 16:56:50 bigip11 err tmm[5640]: 01220001:3: TCL error: /Common/test_kay_table_log - can't set "static::conf(session_id_limit)": variable isn't array while executing "set static::conf(session_id_limit) 5"
I can use set ::conf(session_id_limit) 5 but then iRule is demoted from CMP.
Can't find right way to define static array but for some strange reson when I use:
set static::conf_my(session_id_limit) 5
there is no error??
Piotr
- Kai_WilkeDec 16, 2015MVPHi Piotr, if "conf" is already defined as classic variable [set conf 1] then you can't change it or add stuff to it using [set conf(abc) 1]. Try [unset -nocomlain conf] then use [set conf(abc) 1] again. Cheers, Kai
- dragonflymrDec 16, 2015CirrostratusStrange, I can't see any set conf in my code. I assume that set conf is not the same as set static::conf, and I for sure do not have any static::conf defined. Weird. Piotr
- Kai_WilkeDec 16, 2015MVPSorry for confusion. The above command was just an example to show the behavior of classic and array variables. $conf is not the same as static::conf but may be the same as ::conf ;-) So change the "Try [unset -nocomlain conf] then use [set conf(abc) 1] again" to " Try [unset -nocomlain static::conf] then use [set static::conf(abc) 1] again". Alternativly you may crawl the variable of the static namespase using [info vars static::co*] and then check the contained variable with [array exists static::conf] Cheers, Kai BTW: Just created static::conf(abc) in my own environment. At least its working for me...
Recent Discussions
Related Content
* 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