Forum Discussion
How can I get virtual server partition details?
The easiest way would be to set your partition to begin with and then query the partition for its list of Virtual Servers.
This is all in C, but the methodology would be the same, but I would create a custom class made up of the Virtual Server Name and the Partition (and whatever else you want to collect). Then collect all of the Virtual Servers from each partition and match them all up. Then query your results.
In v11, this is much simpler since the Partition Name becomes part of the object name for each Virtual Server.
Get Partition List:
ManagementPartitionAuthZPartition[] tempPartitionList = f5Interface.ManagementPartition.get_partition_list(); results.AddRange(tempPartitionList.Select(partition => partition.partition_name));
Then loop through the Partition List:
if (f5Interface.initialize(loadBalancerName, _loadBalancerUserName, _loadBalancerUserNamePassword)) { f5Interface.ManagementPartition.set_active_partition(partitionName); string[] virtualServerList = f5Interface.LocalLBVirtualServer.get_list(); results.AddRange(virtualServerList); }
Hope this helps.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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