Forum Discussion

Rene_C_'s avatar
Rene_C_
Icon for Nimbostratus rankNimbostratus
Nov 08, 2013

iControl with Java - Retrieve List of Virtual Servers does not include Applications

Hi,

i connect to the F5 using the Java Wrapper API; Now, when i get the list of Virtual-Servers via

iControlInterfaces.getLocalLBVirtualServer().get_list()
it only returns the virtual servers that are not created with an application (i.e. with the f5.microsoft_exchange_2010_2013_cas template).

I could not find any way to further "open" the list; How can i retrieve these too?

Many thanks in advance! Rene

3 Replies

  • Julian_Balog_34's avatar
    Julian_Balog_34
    Historic F5 Account

    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.