omniplex
Dec 22, 2008Nimbostratus
GTM Pools
Is there a trick to disabling a GTM pool used by a wide IP?
I can enable them just fine when they have been manually disabled, but for some reason the iControl interface just ignores the disable state and nothing happens.
Here is copy of the code in question:
@gtmPools = ('prod1','prod2','prod3','prod4');
@gtmEnabled=(1,1,1,1);
@gtmDisabled=(0,0,0,0);
$gtm = SOAP::Lite
-> uri('urn:iControl:GlobalLB/Pool')
-> proxy("https://$gtmHost:443/iControl/iControlPortal.cgi");
eval { $LBVirtual->transport->http_request->header
(
'Authorization' =>
'Basic ' . MIME::Base64::encode("$sUID:$sPassword", '')
); };
$soapResponse = $gtm->set_enabled_state(
SOAP::Data->name(pool_names => [@gtmPools]),
SOAP::Data->name(states => [@gtmDisabled])
);
@gtmStatus = @{$soapResponse->result};
The only difference between enable and disable code is the variable @gtmEnabled is used instead.
EDIT: I guess it would help to mention that this is perl.