11.4 iapp namespace
Hi,
I'm developing some iApp templates based on the f5.http. I need to be able to let the user decide if a specific pool member is enabled or disabled when the iApp is deployed.
I already added in the presentation section a choice field to enable or disable the member:
table members {
editchoice addr display "large" tcl {
package require iapp 1.0.0
return [iapp::get_items ltm node]
}
string port display "small" required default "80" validator "PortNumber"
string connection_limit display "small" required
default "0" validator "NonNegativeNumber"
optional ( lb_method == "ratio-member"
|| lb_method == "ratio-node"
|| lb_method == "ratio-session"
|| lb_method == "ratio-least-connections-member"
|| lb_method == "ratio-least-connections-node"
|| lb_method == "dynamic-ratio-member"
|| lb_method == "dynamic-ratio-node" ) {
string ratio default "1" validator "NonNegativeNumber"
display "small"
}
optional ( options.advanced == "yes" && use_pga == "yes" ) {
string priority default "0" required
validator "NonNegativeNumber" display "small"
}
optional ( options.advanced == "yes" ) {
choice state display "xlarge" default "enabled"
}
}
The pool is configured with this statement in the template:
array set pool_arr {
1,0 { [iapp::conf create ltm pool ${app}_pool \
[iapp::substa pool_ramp_pga_arr($advanced,$do_slow_ramp,$do_pga)] \
[iapp::substa pool_lb_queue_arr($advanced)] \
[iapp::substa monitor_arr($new_pool,$new_monitor,$advanced)] \
[iapp::pool_members $::pool__members]] \
[iapp::conf modify ltm pool ${app}_pool \
] }
0,0 { [expr { $::net__server_mode ne "tunnel" ? \
$::pool__pool_to_use : $::pool__pool_to_use_wom }] }
* { none translate-address disabled }
}
As the pool members are configured with the "iapp::pool_members" routine, it would be best if this configures the state of the member too. I haven't found the source of this routine so i don't know if it is capable of doing this.
Is there any documentation on the iapp:: namespace and it's source code?
If the routine is not capable of setting the state - any ideas on how to configure the member state besides iterating over the $::pool__members variable?
Greetings,
Eric