Forum Discussion
1 Reply
- Michael_YatesNimbostratus
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.