Forum Discussion
Takuya_Kishimot
Mar 20, 2014Historic F5 Account
Can iControl REST delete a connection?
Hi,
Can iControl REST delete a connection?
I'd like to do like "delete sys connection ss-server-addr 10.1.1.1" by iControl REST.
Can it do that?
Kevin_Stewart
Employee
Apr 27, 2014Creating/deleting pools and nodes is pretty straight forward, but I don't believe there's a way with the DELETE command to delete connections. It would seem the semantics of the command are intended just for objects, and not for states. I did find another way, albeit a little wacky.
-
Create a TMSH script (from within TMSH):
create cli script delconn -
Edit this script to do your dirty work:
modify script delconn { proc script::run {} { tmsh::delete sys connection ss-server-addr [lindex $tmsh::argv 1] } } -
Trigger a cli run command from REST:
curl -sk -u admin:admin -H "Content-Type: application/json" -X POST https://x.x.x.x/tm/mgmt/cli/script -d '{"command":"run","utilCmdArgs":"delconn 127.0.0.1"}'
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects