Forum Discussion
Larry_Dalton_53
Nimbostratus
Dec 21, 2008Fetch ip of pool
How can I fetch the IP of a pool using the Perl SOAP SDK on LTP version 9x?
Dec 29, 2008
The hierarchy is this: The top level object is a Virtual Server which is defined by an IP Address and port (or muliple ports if it's a wildcard virtual). A Virtual Server has a Pool as an attribute of it. A pool consists of Pool Members which are defined by an IP Address and Port.
So, is your question, given a pool, what is the IP address of the Virtual Servers that reference that pool as a resource? Keep in mind that more than one Virtual Server can reference a pool. If that is your question, then there is no single API to do the reverse lookup for you. You'll have to do something like this pseudocode:
string [] vs_list = LocalLB.VirtualServer.get_list();
string [] def_pools = LocalLB.VirtualServer.get_default_pool_name(vs_list);
IPPortDefinition [] vs_dests = LocalLB.VirtualServer.get_destination(vs_list);
string pool_to_match = "mypool";
print "Virtual Servers containing pool " + pool_to_match;
for(int i=0; i {
if ( def_pools[ i ].Equals(pool) )
{
print "Virtual Server " + vs_list[ i ] + " " + vs_dests[ i ].address + ":" + vs_dests[ i ].port;
}
}
Make sense?
-Joe
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