Forum Discussion
myLogin_24886
Nimbostratus
Oct 10, 2007How to Create a empty pool using java?
Hi,
I wrote following code to create a LBPool but it only works if i have at least one member(s). My application need to create a empty pool and add it to a VirtualServer.
Code segmenet
String[] pool_names = { "TestPool1" };
iControl.LocalLBLBMethod [] lb_methods =
{ iControl.LocalLBLBMethod.LB_METHOD_ROUND_ROBIN };
iControl.CommonIPPortDefinition member =
new iControl.CommonIPPortDefinition();
//member.setAddress("123.89.0.9");
iControl.CommonIPPortDefinition[][]members =
{ { member} };
m_pool.create( pool_names, lb_methods, members );
Thanks
- Try passing in the member structure with a size of one with the first element null.
String [] pool_names = { "TestPool1" }; iControl.LocalLBLBMethod [] lb_methods = new iControl.LocalLBLBMethod[1]; lb_methods[0] = iControl.LocalLBLBMethod.LB_METHOD_ROUND_ROBIN; iControl.CommonIPPortDefinition [][] members = new iControl.CommonIPPortDefinition[1][0]; m_pool.create(pool_names, lb_methods, members);
- Great, glad to help!
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