Dominic_Dinh
Aug 15, 2019Nimbostratus
How to Create a empty pool using C#?
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.
// Create member
var members = nodes.Select(t => new CommonIPPortDefinition
{
address = t.Address,
port = t.Port
}).ToArray();
var newMembers = new CommonIPPortDefinition[][] { members };
// Create pool with algorithms
m_interfaces.LocalLBPool.create(new string[] { name }, new LocalLBLBMethod[] { method }, newMembers);