Forum Discussion
iApp - error when creating pools
- Nov 24, 2015
iapp::pool_members will try to do the right thing based on what you give it. If there is a "port" or "port_secure" column in your table, it will use those port values. You can specify a port value to override those with the -port flag (e.g. iapp::pool_members -port 8080 $::members__pool_members). If you specify only IP addresses and omit the -port flag, it will assume port 80.
Hey Fred
yeah thanks. i tried to edit the article and make it more readable. but it wont let me save that. code actually looks like this.
presentation
section members {
Build a table of pool members
message members
table pool_members {
editchoice addr display "large" tcl {
package require iapp 1.1.3
return [iapp::get_items ltm node]
}
}
}
Implementation
iapp::template start
set object_name $tmsh::app_name
tmsh::create "/ltm monitor tcp MON-${object_name}_80 adaptive disabled defaults-from tcp description $object_name interval 5 ip-dscp 0 time-until-up 0 timeout 16"
tmsh::create "/ltm monitor tcp MON-${object_name}_443 adaptive disabled defaults-from tcp description $object_name interval 5 ip-dscp 0 time-until-up 0 timeout 16"
set servers $::members__pool_members
I am trying to append the port number as I only want the user to input the node addresses
( there will eventually be +10 of the same pools created but with different ports )
set newlist {}
set port :80
foreach item $servers {
set newitem $item$port
lappend newitem
lappend newlist $newitem
}
tmsh::create "/ltm pool POOL-${object_name}_80 description ${object_name}_80 members add { $newlist } monitor MON-${object_name}_80"
iapp::template stop
The append is meant to add the port to the node details as part of the presentation steps im only capturing the node address ( hope that makes sense )
thanks for the "puts" tip. ill give that go in the meantime
thanks
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