Forum Discussion
Mar 23, 2010
I don't see anything wrong with your code so there's not much I can do from my end to diagnose it further. I just wrote up some test code to verify that the methods worked. Could you test this console code out? It will query all the pools, then for each pool, query the pool members and the screen names for those members and then print it out to the console. If you are getting zero screen names in the output then there must be a bug on your version of BIG-IP.
namespace cstest
{
class Program
{
static void Main(string[] args)
{
iControl.Interfaces m_interfaces = new iControl.Interfaces();
m_interfaces.initialize("BIGIP_ADDRESS_GOES_HERE", "BIGIP_USER", "BIGIP_PASS");
String [] pool_list = m_interfaces.LocalLBPool.get_list();
iControl.CommonIPPortDefinition [][] member_listAofA = m_interfaces.LocalLBPool.get_member(pool_list);
// Loop over pools
for (int i = 0; i < member_listAofA.Length; i++)
{
int node_len = member_listAofA[ i ].Length;
String[] node_addresses = new String[node_len];
for (int j = 0; j < node_len; j++)
{
node_addresses[j] = member_listAofA[ i ][j].address;
}
String[] screen_names = m_interfaces.LocalLBNodeAddress.get_screen_name(node_addresses);
Console.WriteLine("POOL {0}", pool_list[ i ]);
for (int j = 0; j < node_len; j++)
{
Console.WriteLine(" {0} -> '{1}'", node_addresses[j], screen_names[j]);
}
}
}
}
}
You'll need to replace the parameters in the initialize method with your connection information. Let me know how this works out for you.
-Joe