Forum Discussion
yuce_sungur_100
Nimbostratus
Aug 21, 2009iControl 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?
2 Replies
- L4L7_53191
Nimbostratus
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 - L4L7_53191
Nimbostratus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
