I'm having some difficulty in correctly invoking LocalLB::PoolMember::get_statistics in a perl script. My understanding of the API reference is that the method accepts two parameters;
- pool_names: A list of strings that are the pool names for which the statistics should be retrieved which in perl I am passing as hash key/value pair with the value being a single pool name in list context. i.e.
pool_names => [ $pool ]
- members: A list of lists of IPPortDefinition values which I am passing as a hash key/value pair with the value being a list of lists of a single member. i.e.
members => [ [ 10.0.0.10%10:80 ] ]
The specific error message I am receiving is that either the pool_names or members element could not be found.
At first I thought that the problem may have been due to the method expecting an positional parameter list and me using a hash (no guaranteed order) as the error message was indicating that the pool_names parameter could not be found.
However after putting together an invocation not using a hash and ensuring that the parameter order was correct as per the API reference I am now receiving an error indicating that the members parameter can not be found.
My guess is that I am misunderstanding the parameter types in the API rereference so if anyone can point out what I may be doing wrong here it would be greatly appreciated.