Forum Discussion
Antonio_Varni
Nimbostratus
Jun 26, 2010any way to set_active_partition 'all' or 'any' ?
I want to read all pool and virtual services into a mysql database. Now that I've started moving objects into their own partitions, I'm trying to find a way to get these objects 'all in 1 pass' instea...
Todd_Cromwell_9
Nimbostratus
May 30, 2012Ives beat me to it, though I have a caveat for that post: The Management::Partition interface is deprecated as of version 11.0.0 (see Management::Folder and System::Session as alternatives). Here is what I was going to demonstrate, as follows. Be aware that you may not want to do any create/write operations with "/" as your active folder.
>>> b.LocalLB.Pool.get_list()
['/Common/p2', '/Common/p1']
>>> b.System.Session.get_recursive_query_state()
'STATE_DISABLED'
>>> b.System.Session.set_recursive_query_state('STATE_ENABLED')
>>> b.System.Session.get_recursive_query_state()
'STATE_ENABLED'
>>> b.System.Session.get_active_folder()
'/Common'
>>> b.System.Session.set_active_folder(folder='/')
>>> b.System.Session.get_active_folder()
'/'
>>> b.LocalLB.Pool.get_list()
['/Common/C1114967.app/C1114967_pool', '/Common/p2', '/Common/p1', '/mypart/p3']
So you can get all your information that way. BTW Partition "[All]" maps to "/" internally (and it sets recursive query -- but again, the Partition interface is deprecated).
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