Forum Discussion
sean_87481
Nimbostratus
Jan 12, 2009Getting VS list with name, address, port
Hello!
In perl, I am able to successfully use the get_list() method to get a list of virtual servers, but I want to pull out the address and port information as well.
It ...
sean_87481
Nimbostratus
Jan 12, 2009Okay, so here's my code snippet:
$soapResponse = $VirtualServer->get_list();
@g_vs_list = @{$soapResponse->result};
$stuff=$VirtualServer->get_destination(
SOAP::Data->name( virtual_servers => \@g_vs_list )
);
print "Address: " . $stuff[0][0] . "\n";
I'm definitely getting the results back, because $stuff is the correct size (number of entries). I think I'm just not accessing the subelements correctly.
The definitely says that a struct (which is an array) is returned. I'm assuming that the struct is returned in an array, so to access the first element address is $stuff[0][0] and port would be $stuff[0][1]. I also tried $stuff[0]->{"address"}, but that didn't work either.
Any suggestions?
Sean
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