Forum Discussion

yuce_sungur_100's avatar
yuce_sungur_100
Icon for Nimbostratus rankNimbostratus
Aug 21, 2009

iControl and ratio

Hi,

 

 

I have a python script which uses pycontrol to make some automated configuration on our F5 .

 

Even though it works pretty well with all the paramters are set correctly it seems like load balancing algorithm parameter of pool in not correct.

 

 

My piece of code is as below;

 

"

 

PObj.create(pool_names=[pool_name],

 

lb_methods='LB_METHOD_OBSERVED_NODE_ADDRESS '],

 

members=[depo['pool']]

 

)

 

 

"

 

 

 

it creates poolobject correctly with the right members but load balancing algorithm is still wrong,

 

 

 

Anyone ever had such a problem?

 

 

  • It looks like you're missing the opening square bracket in front of the LB_METHOD string: lb_methods='LB_METHOD_OBSERVED_NODE_ADDRESS '] should be lb_methods=['LB_METHOD_OBSERVED_NODE_ADDRESS ']

     

     

    That said I wouldn't expect this code to run at all so please paste in a 'working' version if this is just a typo that was created when you started the thread.

     

     

    -Matt
  • This works OK for me:

     
     In [29]: b.LocalLB_Pool.create(pool_names = ['mc-test'], lb_methods =['LB_METHOD_OBSERVED_NODE_ADDRESS'], members = [[{'address':'10.10.10.10', 'port':80}]]) 
      
     In [30]: b.LocalLB_Pool.get_lb_method(pool_names = ['mc-test']) 
     Out[30]: {'return': ['LB_METHOD_OBSERVED_NODE_ADDRESS']} 
      
     In [31]: b.LocalLB_Pool.get_version() 
     Out[31]: {'return': 'BIG-IP_v9.4.7'} 
     

    HTH,

    -Matt