Forum Discussion
fxt_31120
Jul 04, 2012Nimbostratus
How to find a Virtual server by ip+port
Hi everybody,
I'm looking for a Icontrol cmdlet or a tips for search if my @ip+port is already used by a Virtual server.
Right now I use a combo of 2 functions but it's not efficient at all (8 to 10...
Michael_Yates
Jul 10, 2012Nimbostratus
Hi FXT,
Everything is pretty much based on the Virtual Server Name, so you can call to get a list of Virtual Servers:
iControl Virtual Server:
string[] virtualServerList = f5Interface.LocalLBVirtualServer.get_list();
You will need to iterate through the list providing the Virtual Server Names to get the destination information.
iControl Virtual Server - Get Destination
CommonIPPortDefinition[] getVirtualServerInfo = _f5Interface.LocalLBVirtualServer.get_destination(new[] {virtualServer});
The CommonIPPortDefinition contains the the IP Address and the Port that you can compare against, so you can get both of the pieces of information that you are wanting with two queries (Virtual Server List and then Virtual Server Destination Information.
iControl Common IP Port Definition.
Hope this helps.
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