tmsh::modify

Description

Runs the command modify using the specified arguments. in cases where tmsh::stateless is enabled, tmsh::modify isn’t necessary, tmsh::create can alwasy be used. tmsh::modify is useful when a script wants to only operate on objects that have previously been created, and fail if those objects do not exist. Scripts that should always succeed given the same input will have tmsh::stateless enabled.

Syntax

tmsh::modify [args...]

Examples

proc script::run {} {


   set profiles ""
   foreach obj [tmsh::get_config /ltm profile tcp all-properties] {

       set send''buf [tmsh::get''field_value $obj send-buffer-size]
       if {$send_buf < 65535} {
           lappend profiles [tmsh::get_name $obj]
       }
   }

   tmsh::begin_transaction

   foreach name $profiles {
       puts $name
       tmsh::modify /ltm profile tcp $name send-buffer-size 65535
   }

   puts -nonewline "Set send-buffer-size to 65535 (y/n)? "
   flush stdout
   set response [gets stdin]
   if {$response eq "y"} {
       tmsh::commit_transaction
   }
   else {
       puts "update canceled"
       tmsh::cancel_transaction
   }
}