Forum Discussion

Nataraj_65882's avatar
Nataraj_65882
Icon for Nimbostratus rankNimbostratus
Jul 09, 2013

How can I get virtual server partition details?

Hi,

 

I am using Java iControl api to retrieve information from F5 hosts. I am getting all virtual host list and trying to collect its partition information. Can you help me how can i get partiion information for list of virtual hosts?

 

Thanks in advance,

 

Nataraj G.

 

 

1 Reply

  • 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.