Forum Discussion
Dec 30, 2005
Not quite one command, but you could do it with two method calls.
If you want to disable all virtual servers, then you could use the LocalLB::VirtualServer::set_enabled_state() method passing in a list of all virtual servers returned from the LocalLB::VirtualServer::get_list() command.
pseudo code would look something like this (actual code will vary depending on your chosen language).
string [] vs_list = LocalLB::VirtualServer::get_list();
EnabledState [] state_list = new EnabledState[vs_list.Length];
for(int i=0; i{
state_list[ i ] = "STATE_DISABLED";
}
LocalLB::VirtualServer::set_enabled_state(vs_list, state_list);
To re-enable the virtuals, change the states to "STATE_ENABLED".
-Joe