Hello.
I have some old code from a previous script which queries a 3DNS unit running v4.2ptf9
[…]
my $soap = SOAP::Lite
→ uri(‘urn:iControl:ITCMGlobalLB/Wideip’)
→ readable(1)
→ proxy(“https://$sHost:$sPort/iControl/iControlPortal.cgi”);
[…]
my $soap_response = $soap->get_pool_list
(
SOAP::Data->name ( wideip_name => $wip )
);
if ( $soap_response->fault ) {
print $soap_response->faultcode, "(faultstring) ", $soap_response->faultstring, “\n”;
print $soap_response->faultcode, "(faultdetail) ", $soap_response->faultdetail, “\n”; }
else
{
my @pool_def_list = @{$soap_response->result};
foreach my $pool_def (@pool_def_list) {
my $poolName = $pool_def->{“name”};
my $poolState = $pool_def->{“state”};
my $stateofpool = $StateCodes->{$poolState};
[…]
which uses :
my $StateCodes =
{
0 => “UNKNOWN”,
1 => “UP”,
2 => “UNAVAILABLE”,
3 => “DOWN”,
};
which I’m sure is wrong and should be using
my $StatusCodes =
{
0 => “ENABLED”,
1 => “DISABLED”,
2 => “DISABLE_PARENT”,
};
or similar
but looking at the new SDK PoolAttribute returned looks different:
====
A struct that gives a limited description of pool attributes.
name String
number_virtual_servers short
type LoadBalanceResultType
status EnableStatus
state StatColor
====
and similarly for get_pool_virtual_server_list
I’m sure it wasn’t like this before but this was a while ago and it could just be me going mad. I don’t have the SDK I used to check the return values - is there a previous one available? Can you confirm that this has changed?
many thanks
-r