Forum Discussion
pyControl v2 - get pools and partitions assignments
Thanks mhite. Unfortunately, call 'set_recursive_query_state' is not present on 10.2 and there seems to be no equivalent command (GlobalLB.Globals.set_use_recursion_bit_state is not the same). All others seems to be present: setting active folder -> Management.Partition.set_active_partition and getting pool list -> LocalLB.Pool.get_list.
In the meantime I did following code:
print '[*] available pools and partition assignments:'
partitionlist=f5.Management.Partition.get_partition_list()
poollist = f5.LocalLB.Pool.get_list()
print "%6s %50s %20s" % ("id", "pool", "partition")
for activepartition in partitionlist:
f5.Management.Partition.set_active_partition(activepartition.partition_name)
for pool in poollist:
try:
f5.LocalLB.Pool.get_object_status(pool_names = [pool])[0]
print "%6s %50s %20s" % (index, pool, activepartition.partition_name)
index=index+1
except:
continuebut as you can imagine it is taking too much time to complete (up to 3minutes with 4 partitions and 300 total pools).
Does anyone have better idea how to complete such assignment?
PS. When I go to Local Traffic -> Pools, following call is being made:
/tmui/Control/jspmap/tmui/locallb/pool/list.jsp?Filter=*So this must be possible from iControl v10.2.x too.
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