Forum Discussion
JRahm
Jan 27, 2011Admin
Object not displaying all fields
I'm using a proc from the wiki that prints fields:
proc print_fields { objVar } {
upvar $objVar obj
set fdx 0
set fields [tmsh::get_field_names value $obj]
set field_count [lleng...
JRahm
Jan 28, 2011Admin
Very good information, helped me a request this morning putting wideIP info into csv format:
proc script::run {} {
foreach wip [tmsh::get_config \gtm wideip] {
append csvline "[tmsh::get_name $wip],"
foreach pl [tmsh::get_field_value $wip pools] {
append csvline "[tmsh::get_name $pl],"
foreach pm [tmsh::get_config \gtm pool] {
if { [tmsh::get_name $pl] == [tmsh::get_name $pm] } {
foreach fld [tmsh::get_field_value $pm members] {
append csvline "[tmsh::get_name $fld],"
}
}
}
}
puts "$csvline"
unset csvline
}
}
Output:
root@6400-1(Active)(tmos) run cli script getwips.tcl
testwip1.test,testpool1,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,testpool2,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,testpool3,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,
testwip2.test,testpool1,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,testpool2,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,testpool3,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,
testwip3.test,testpool1,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,testpool2,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,testpool3,1.1.1.1:http,1.1.1.2:http,1.1.1.3:http,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects