Forum Discussion
iControl with Java - Retrieve List of Virtual Servers does not include Applications
Unless you [explicitly] enable the recursive-state, you will only retrieve virtual server objects from the current (default) partition, i.e. /Common. LTM objects created through the deployment of an iApp Application Service (based on iApp templates), are created within their own application folder. Assuming you have an iApp Application Service named "my-app", the folder where the app-specific objects are created is /my-app.app.
To enable the recursive-state in your code, you'll have to call the System.Session.set_recursive_query_state() API and set the recursive state to 'STATE_ENABLED'. Then your get_list() APIs will return all objects, in all folders (i.e. partitions).
If you want to retrieve just app-specific objects (e.g. virtual servers for the "my-app" Application Service), you'll have to set the "active folder" corresponding to the Application Service (e.g. /my-app.app):
System.Session.set_active_folder(folder="/my-app.app")
So probably in your case, setting the active folder to "/" and enabling the recursive-state, will give you the full list of virtual servers.
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