Forum Discussion
Manuel_Miras_16
Nimbostratus
Sep 10, 2014Show list Pool for all partitions
Hi, Can i show pools of all partition witch python using module pycontrol?
It´s posible a example
Thanks
Michael_Yates
Nimbostratus
Sep 10, 2014You 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();
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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