Forum Discussion

Manuel_Miras_16's avatar
Manuel_Miras_16
Icon for Nimbostratus rankNimbostratus
Sep 10, 2014

Show list Pool for all partitions

Hi, Can i show pools of all partition witch python using module pycontrol? It´s posible a example Thanks

 

2 Replies

  • You will have to loop through each Partition and add them to a list before dumping them to a list.

    Here is a C example doing the same thing for a list of Virtual Servers (pools is almost the exact same):

            Interfaces f5Interfaces = new Interfaces();
            List partitionList = new List();
            List results = new List();
    
            if (f5Interfaces.initialize(connection.hostname, connection.username, connection.password))
            {
                ManagementPartitionAuthZPartition[] tempPartitionList = f5Interfaces.ManagementPartition.get_partition_list();
                partitionList.AddRange(tempPartitionList.Select(partition => partition.partition_name));
    
                foreach (string partition in partitionList)
                {
                    f5Interfaces.ManagementPartition.set_active_partition(partition);
                    String[] queryVirtualList = f5Interfaces.LocalLBVirtualServer.get_list();