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 [llength $fields]
while { $fdx < $field_count } {
set field [lindex $fields $fdx]
puts "$field [tmsh::get_field_value $obj $field]"
incr fdx
}
}
proc script::run {} {
foreach vip [tmsh::get_config /ltm virtual] {
puts [tmsh::get_name $vip]
print_fields vip
puts "\n"
}
}
When I run the script, I notice that not all my fields are present. For example, this vip when listed in tmsh:
root@golgotha(Active)(tmos) list ltm virtual cacti-vip
ltm virtual cacti-vip {
connection-limit 1500
destination 10.10.20.50:http
ip-protocol tcp
mask 255.255.255.255
pool testpooln
profiles {
http { }
tcp { }
}
rules {
table_mgmt
hashtest_distribution
}
snat automap
translate-port disabled
}
Shows all the fields except the profiles:
root@golgotha(Active)(tmos) run cli script parttest.tcl
cacti-vip
connection-limit 1500
destination 10.10.20.50:http
ip-protocol tcp
mask 255.255.255.255
pool testpooln
rules table_mgmt hashtest_distribution
snat automap
translate-port disabled
Is there another process I need to follow for the profiles? Each of those objects looks to have its own {}, is that maybe throwing it off?