Forum Discussion

Pavel_70943's avatar
Pavel_70943
Icon for Nimbostratus rankNimbostratus
Apr 06, 2012

List all virtual servers

What is the syntax change on v11 with network partitions to list all virtual servers? In v10 with all virtual servers in /Common partition we had a .tcl script to control irules in virtuals, it doesn't work anymore in v11 and partition. Here is a short clip that lists all virtual servers that works in v10 without partitions and gives empty result in v11 with virtual servers in their specific partitions, not in /Common partition.

 

 

proc script::run {} {

 

puts "test"

 

foreach {vir} [tmsh::get_config /ltm virtual] {

 

puts [tmsh::get_name $vir]

 

}

 

}

 

 

 

 

Any hint how to read virtuals from other partitions? I tried to put the script into /partition_name/ folder, and run it from there, doesn't seem to help. Any ideas?

 

  • With help from support got this one working:

     

     

    proc script::run {} {

     

    puts "test"

     

    foreach {vir} [tmsh::get_config /ltm virtual /partition_name/*] {

     

    puts [tmsh::get_name $vir]

     

    }

     

    }