Forum Discussion
Richard__Harlan
Dec 01, 2004Historic F5 Account
get_proxy_target
Haveing a little problem with get_proxy_target. Below is the code snip. Once this is done my whole iContorl script will be done. So any help would be great.
foreach $proxy_def (@proxy_def_list)
{
$proxy_address = $proxy_def->{"address"}.":".$proxy_def->{port};
($paddress,$pport) = split (/\:/,$proxy_address);
$pserv->{address} = $paddress;
$pserv->{port} = $pport;
$soapproxy = $proxy->get_proxy_target
(
SOAP::Data->name(proxies => $pserv)
);
$outputproxy = $soapproxy->result;
$target = $outputproxy->{"address"}.":".$outputproxy->{"port"};
print " [$proxy_count] = $proxy_address\n";
print " The proxy points to $target\n";
4 Replies
- The signature for get_proxy_target() is:
IPPortDefinition[] get_proxy_target( in IPPortDefinition[] proxies );
The inbound parameter is an array of IPPortDefinition structures, in your code you are passing a singular value. Change your code to the following and you should be set:$soapproxy = $proxy->get_proxy_target ( SOAP::Data->name(proxies => [$pserv]) );
One question I have is why are you converting the $proxy_def into a string, splitting the string, and then rebuilding the structure in $pserv? Can't you just pass in $proxy_def into the call like this:$soapproxy = $proxy->get_proxy_target ( SOAP::Data->name(proxies => [$proxy_def]) );
-Joe - Richard__HarlanHistoric F5 AccountIt worked. Thanks
To answer your question I do not know, got in the grove of doing it one way total missed the fact that I was doing the samething twice. Again thanks, it nice when you can move things off your plate. - Glad to help! Let us know how things are going?
-Joe - Richard__HarlanHistoric F5 AccountThings are going great thanks to you guys. The script I just finished now will allow us poll our 12 BigIP and dun all there data into our inventory database. Then we will be able to all information about our hosting environment. The BigIP has been the missing piece for a while. But now that we have that going we will be in very good shape. Thanks again
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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