Forum Discussion
Larry_Dalton_53
Nimbostratus
Dec 22, 2008Fetch ip of pool
How can I fetch the IP of a pool using the Perl SOAP SDK on LTP version 9x?
- JRahm
Admin
This example from the codeshare should get you started. It prints a cli equivalent of the network map in the gui, which includes the pool members within a pool assigned to each virtual. - Also, just so you are clear on symantics. A Pool has no IP Address : Port associated with it. A Virtual Server has an IP Address and a Pool is an attribute of the VS. A pool is a collection of Pool Members which in turn have a IP Address : Port specification.
- Larry_Dalton_53
Nimbostratus
The Perl LocalTrafficMap.pl yields the pool member's IP, but doesn't list the Virtual Server (VS) IP. What call would I make to pull that property? - 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.
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; } }
- Larry_Dalton_53
Nimbostratus
Not really. if there is no function to pull the IP of the virtual server, regardless of pool, then one should be added. Lets forget the pool, and its members. How do you get the IP(s) and port(s) assigned to the virtual server. The above code looks like the perl equiv of LocalTrafficMap.pl which I use. LocalLB.VirtualServer.get_vs_ip('vs-name') perhaps. - JRahm
Admin
You want the get_destination attribute. Check out Joe's PerlVirtualShow codeshare contribution: - My example did return the IP of the virtual server. Look at the get_destination() method.
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