Forum Discussion
Michel_van_der_
Nimbostratus
Apr 13, 2005Compatibility issue
I'm using some perl SOAP::Lite calls, specifically
ITCMLocalLB:Pool:get_member_list which presumably is
implemented as a compatibility call. But instead of
getting something like:...
Apr 14, 2005
Looks like you found a bug in the compatility methods. In the case of these methods we aren't converting the native long value of an IPAddress into it's string representation. I'll get this logged as a bug to be corrected in the next release. In the mean time, you can work around it with the following code (assuming IPv4 addresses)
sub getIPAddress
{
my ($ipaddr) = @_;
my $value = $ipaddr;
Look for a "." in the value to determine whether
we need to convert to a string
if ( $ipaddr !~ /\./) {
my $a = ($ipaddr >> 24) & 0x000000FF;
my $b = ($ipaddr >> 16) & 0x000000FF;
my $c = ($ipaddr >> 8 ) & 0x000000FF;
my $d = ($ipaddr ) & 0x000000FF;
$value = "$a.$b.$c.$d";
}
return $value;
}
sub main {
my ($ip, $url, $r, $p, $m);
$ip = $ARGV[0];
$user = $ARGV[1];
$pwd = $ARGV[2];
$url = "http://$ip/iControl/iControlPortal.cgi";
$r = getF5Pools($url);
$r = getF5PoolsMembers($url, $r);
for $p ( @$r ) {
print "Pool: " .
$p->[0] . " ";
for $m ( @{$p->[1]} ) {
print &getIPAddress($m->{'address'}) . ":" . $m->{'port'} . " ";
}
print "\n";
}
}
Sorry for the inconvenence...
-Joe
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
