Forum Discussion
Updating "Default Pool" via Portal
Hi!
You could achieve this with iControl, but the catch is that you'd need to save the username and password in a file. Do you have any experience in scripting?
Also you might be able to do it with iStats and iRules. Jason Rahm wrote an excellent article on how to use iStats to execute tmsh commands:
https://devcentral.f5.com/articles/icall-triggers-invalidating-cache-from-irules
Then use this command:
modify ltm virtual [virtual server name] pool [pool name]
Instead of:
tmsh::modify wam application dc.wa_hero content-expiration-time now
You'd have to change the iRule too. Maybe something like this?
when HTTP_REQUEST {
if { [HTTP::path] eq "/setdefaultpool" } {
set defpool [URI::query [HTTP::uri] defpool]
if { [class match $defpool equals allowedpools] } {
ISTATS::set "WA policy string [virtual name]$defpool" 1
HTTP::respond 200 content "Set $defpool as default pool on [virtual name]."
} else { HTTP::respond 200 content "Please specify a valid pool /setdefaultpool?defpool=pool_name" }
}
}
Note that this is a bit messy and requires quite alot of config. I have not tested this but it should be possible.
Hopefully Kevin Stewart or Nitas comes up with something brilliant alternative!
/Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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