Forum Discussion

hdavid_35729's avatar
hdavid_35729
Icon for Nimbostratus rankNimbostratus
Apr 24, 2013

pool members of pool within an IApp

Hello,

 

 

i would like to iterate over the pools to find out where the running service on my server is used and put offline before shutdown/restart.

 

i could find a way to iterate over pool, using interfaces.getLocalLBPool().get_list(), and interfaces.getLocalLBPool().get_member(new String[] { poolname }).

 

i could get and set the status of member.

 

but i could not find anywhere the documentation or example how to iterate of pool embedded into iApps. any code examples ?

 

regards,

 

Henri

 

1 Reply

  • iApp objects are stored in their own folders. By default, you will be connected to the "/Common" folder and when you query any objects, it will list the objects in that folder only. You can change the behavior of the calls to return all folder items as well as child folder items by calling the System.Session.set_recursive_query_state() method and setting the value to STATE_ENABLED. Off the top of my head, I can't remember the names for the folder paths for iApps but it does also contain the iApp service name itself. Here's some procedures that may help you

     

    1. Query all pool objects on the system

     

    1.a Set the active folder to "/" with the System.Session.set_active_folder() method.

     

    1.b Set the recursive query state to STATE_ENABLED with the System.Session.set_recursive_query_state()

     

    1.c Make a call to the LocalLB.Pool.get_list() method. It will return fully qualified object names (ie. /Common/mypool). You should see your iApps pools in there.

     

    1.d make sure you undo any changes you want to the query settings.

     

    2. Query list of all iApps

     

    2.a The Management.ApplicationService.get_list() will return the names of all your deployed iApps (ie. Application Services).

     

    From 2 and 1 you should be able to programmatically set your active folder to the iApp you are concerned with and then make all iControl calls to get the objects contained in that iApp.

     

    Hope this helps...

     

    -Joe