Forum Discussion

bigipjr28_13978's avatar
bigipjr28_13978
Icon for Nimbostratus rankNimbostratus
Apr 17, 2014

Using tmsh commands in tcl script not working

I have been messing around with some tcl stuff. I want to change the order of vips in a pool on the GTM. How would I inject this command into the tcl script ?

 

Here is the cmd I want to use ultimately - tmsh::modify /gtm pool poolname members modify { :https { order 1 }}

 

Here the test bed script that I put together:

 

modify script flip.tcl {

 

proc script::run {} {

 

tmsh::modify /gtm pool poolmen members modify { :https { order 1 }}

 

}

 

Its saves without error but I executed I get this error:

 

flip.tcl: script failed to complete: can't eval proc: "script::run" members: required brace is missing "{" while executing "tmsh::modify /gtm pool sdx-pq1-pool members modify { 10.15.10.200:https { order 1 }}" (procedure "script::run" line 3) invoked from within "script::run" line:1 script did not successfully complete, status:1

 

any help will be great! thanks

 

  • leozou_80567's avatar
    leozou_80567
    Historic F5 Account
    some guy tell me : Try using backslash to escape each curly brace like this: proc script::run {} { tmsh::modify /gtm pool app1-pool members modify \{ Just_a_web_server:Just_a_webserver \{ order 2 \}\} I test. It works!