Forum Discussion

adurstewitz_188's avatar
adurstewitz_188
Icon for Nimbostratus rankNimbostratus
Feb 14, 2011

Java GTM Pool Member CommonIPPortDefinition

I'm trying to up-fit the sample PoolMemberControl code to get the properties of a GTM pool member.

 

 

LTM Code:

 

iControl.CommonIPPortDefinition [][] memberDefAofA =

 

m_interfaces.getLocalLBPool().get_member(pool_list);

 

 

 

 

Attempted GTM Code:

 

iControl.CommonIPPortDefinition [][] memberDefAofA = m_interfaces.getGlobalLBPool().get_member(pool_list);

 

 

 

However, do this gives me a type incompatibility. Does anyone know the right way/method to populate the CommonIPPortDefinition array with a GTM Pool Member?

 

 

 

Thanks,

 

Andrew J Durstewitz

 

3 Replies

  • Hi Andrew, the function prototype for the GlobalLB.Pool.get_member() method is different from the LocalLB.Pool.get_member() method. The API reference is here:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/GlobalLB__Pool__get_member.html

     

     

    It looks like this

     

     

    struct GlobalLB.Pool.PoolMemberDefinition {
      IPPortDefinition member;
      long order;
    };
    
    GlobalLB.Pool.PoolMemberDefinition [] [] GlobalLB.Pool.get_member(
      in String [] pool_names
    );

     

     

    The java code to call it would looks something like this:

     

     

    iControl.GlobalLBPoolPoolMemberDefinition [][] memberDefAofA = 
      m_interfaces.getGlobalLBPool().get_member(pool_list);

     

     

    All of the API references are available online in the iControl wiki at:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/APIReference.html

     

     

    Hope that helps...

     

     

    -Joe

     

  • Hi Joe -

     

     

    I'm with you so far, the only part I don't understand is how to get memberDefAofA into CommonIPPortDefinition so I can get the address information.

     

     

    Thanks!

     

     

    Andrew J Durstewitz
  • Here's how you iterate over the returned memberDefAofA 2-D array.

    // Iterate over the first dimension (each pool pass in as input).
    for(int i=0; i
    Hope this helps...
    -Joe