cancel
Showing results for 
Search instead for 
Did you mean: 
George_Watkins_
Historic F5 Account

Problem this snippet solves:

This example shows how to toggle ARP for all the virtual addresses on a unit.

Code :

proc script::run {} {
    set state [lindex $tmsh::argv 1]

    if { $state ne "disabled" && $state ne "enabled" } {
        puts "Requires one argument: \[enabled/disabled\] "
    } else {
        foreach {address} [tmsh::get_config /ltm virtual-address] {
            tmsh::modify /ltm virtual-address [tmsh::get_name $address] arp $state
            puts "ARP $state for virtual address [tmsh::get_name $address]"
        }
    }
}

proc script::help {} {
    tmsh::add_help "Enable/Disable ARP for all virtual addresses on this unit\n\ntoggle-virtual-address-arp \[enabled/disabled\]"
}
Comments
pushkar_misra_2
Altocumulus
Altocumulus

This Script works in the Common Partition only. It is not working for other partitions even though I create script in each partition.

 

Version history
Last update:
‎10-Mar-2015 12:13
Updated by:
Contributors