Forum Discussion
Richard__Harlan
Nov 08, 2004Historic F5 Account
Haveing a problem with Get_rule
I am writeing a script to get the rules that a virtual server is connected to. I am us get_list to get the list of the Virtual servers and there ports, but when I pass that information to get rules I get a 500 server error. Below is a code snip. Thanks
sub virtual()
{
$soap_response = $virtuallist->get_list();
if ( $soap_response->fault )
{
print $soap_response->faultcode, "(faultstring) ", $soap_response->faultstring,"\n";
print $soap_response->faultcode, "(faultdetail) ", $soap_response->faultdetail, "\n";
}
else
{
print "Available Virtuals Servers: \n";
my $virtualnumber = 0;
my @virtual_def_list = @{$soap_response->result};
foreach my $virtual_def (@virtual_def_list)
{
if ( $virtualonly != "1" ) {
$addressport = $virtual_def->{"address"}.":".$virtual_def->{port};
}
print "\t[$virtualnumber] = '", $addressport,"'\n";
$virtual_ipaddress = inet_aton($virtual_def->{address});
$dnshostname = gethostbyaddr($virtual_ipaddress, AF_INET);
print " Hostname = $dnshostname\n";
($vaddress,$vport) = split(/\:/,$addressport);
$vserv->{address} = $vaddress;
$vserv->{port} = $vport;
$vnode_def->{ipport} = $vserv;
$soaprule = $virtuallist->get_rule
(
SOAP::Data->name(virtual_server => $vnode_def)
);
$outputrule = ${$soaprule->result};
$virtualnumber++;
}
}
}
- Loc_Pham_101863Historic F5 AccountThe signature of ITCMLocalLB.VirtualServer.get_rule () method is:
String get_rule( in SessionCredentials creds, <== CORBA Specific in IPPortDefinition virtual_server );
$soaprule = $virtuallist->get_rule ( SOAP::Data->name (virtual_server => $virtual_def) );
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