Forum Discussion
Anthony_Gerace_
Nov 15, 2004Historic F5 Account
How to retrieve the rule details with query_all_rules
Hi!
I am attempting to write a script that will display the contents of all rules on a given system. In trying to use the query_all_rules method I'm having difficulty with retrieving the...
Nov 15, 2004
Anthony, here is code illustrating the use of ITCMLocalLB::Rule::query_all_rules in Perl:
sub getRules()
{
$soapResponse = $LocalLBRule->query_all_rules();
if ( $soapResponse->fault )
{
print $soapResponse->faultcode,
"(faultstring) ", $soapResponse->faultstring,"\n";
print $soapResponse->faultcode,
"(faultdetail) ", $soapResponse->faultdetail, "\n";
}
else
{
@rule_names = @{$soapResponse->result};
@params = $soapResponse->paramsout;
@rule_details = @{@params[0]};
$i = 0;
foreach $rule_name (@rule_names)
{
$rule_detail = @rule_details[$i];
print "Rule $i\n";
print "Name: $rule_name\n";
print "Details: $rule_detail\n";
print "----------------------\n";
$i++;
}
}
}
-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